nanoCAD 3DScan Help

Calibrating the Camera

CAD drafting Calibrating the Camera 0       Ribbon: Point Clouds > Aerial Laser Scanning > CAD software Calibrating the Camera 1 Calibrate the camera

CAD drawing Calibrating the Camera 2       Menu: Point Clouds > ALS > CAD drafting Calibrating the Camera 3 Calibrate the camera

CAD software Calibrating the Camera 4       Toolbar: ALS > CAD drawing Calibrating the Camera 5 Calibrate the camera

CAD drafting Calibrating the Camera 6    Command line: PC_CALIBRATE_CAMERA

The Camera calibration dialog is designed to measure points on images, calculate calibration parameters, and save them to a camera file for orthotransformation of the images. Since the measurement process can be lengthy, a project file for storing the measurements and orientation elements is used for processing during calibration. The calibration process begins with creating a project.

Creating a calibration project.

The following information is entered in the dialog for creating camera calibration project:

·      1. The location of the project file to be created.

·      2. The camera file containing the camera’s internal orientation elements. These are either transferred to the calibrated camera file or used as approximate values in the refinement iterations during calibration.

·      3. The DEM file. Used to find the images that contain a new point, as well as to determine the height of ground points.

·      4. The image-time file. Used to find the external orientation elements of the image in the trajectory files. It is a text file in which the time and the image file name (without path and extension) are written line by line.

·      5. The folder with trajectory files. After selecting the folder, you need to specify the file format. A text trajectory format can be added by clicking the button.

·      6. Image folder. It’s easier to measure points when you can see which areas of the image overlap with neighboring images. For this purpose, the Mark overlap areas in photos mode is provided. To avoid damaging the original images, select an empty image folder and enable the Copy photos to photos folder from mode. If you don’t need to mark the images, or if they have already been marked previously when creating another project using the same photos, then you need to uncheck the Copy photos to photos folder from and Mark overlap areas in photos boxes.

After clicking the Run button, the photos (if necessary) are copied to the project folder, checked for correctness, and the overlapping areas are marked, if this mode is enabled. After creating the project, a panel with a table opens on the left, and two image windows on the right. A new point is added in the left window, and its position on neighboring images is indicated in the right window.

Table of points.

The table shows a list of points with customizable columns.

The first column is the point number. Unique point numbers are assigned automatically when a point is added.

The second column is the number of images on which the point was measured. To include a point in the calibration, it must be measured on at least two images.

The third column is the range of heights in the point’s vicinity. It is determined only for ground points. The height range is calculated as the difference between the minimum and maximum heights of the point’s projections from different images onto the DEM. If the height range in the point’s vicinity is large (more than 30 cm), the height of the point may be determined inaccurately, so it is not recommended to use such points.

The fourth column is the root mean square error on the image in pixels. It is calculated from the residual discrepancies on the image between the measurement and the projection of the averaged point from the ground onto the image.

The fifth column shows the root-mean-square error on the ground in meters. It is calculated from the discrepancies between the averaged point on the ground and the projections of measurements from the images onto the ground.

Below the table, the total root-mean-square error on the photos and on the ground is shown, calculated from all measurements of all points.

The table structure, units, and display accuracy of errors are configured in the dialog parameters by clicking the button.

Photos window.

In the left window, clicking the left mouse button adds a new point. This determines the photos on which this point appears. These images are loaded into the list of photos in the right window, and the presume position of this point on the first photo in the list is shown in the right window. It is necessary to specify the correct position of the point in the right window by clicking the left mouse button. After that, the process moves to the next photo and the process is repeated until all the photos on which the point appears have been measured.

To navigate the photo field, use drag and drop with the right mouse button pressed.

To remeasure a point on the left photo – Shift + left mouse button, on the right photo simply the left mouse button.

If the photos were marked during project creation, then you should not use the red areas on the photo. Red areas indicate areas that do not overlap with other photos or are not covered by DEM heights.

The delete button on the left photo deletes the point completely, while on the right it only deletes the point measurement on the current photo in the right window.

Points can be of two types: ground and aerial. For ground points, the height is determined by projecting the point measurement from the photo onto the DEM and is not calculated during calibration. For aerial points, the height is calculated, which reduces the value of the point by a third for solving the calibration problem. Therefore, it is necessary to use ground points as much as possible and only use aerial points if there are no suitable locations for ground points on the terrain. Ground points do not necessarily have to be located on the ground surface; the main thing is that the DEM in that location does not have sharp changes in elevation.

Points are displayed as circles. Red color indicates a measured point, blue indicates the estimated position of the point on the right image, and green indicates the current point.

If the Show discrepancies in photo mode is enabled in the program settings, the vector between the measurement and the projection of the midpoint is shown on the points. Its length can be used to estimate the orientation error with the current calibration parameters.

Measured points can be loaded from another project with the same set of photos. In addition, measurements can be loaded and saved to a TerraPhoto tpt measurement file. Data exchange with TerraPhoto via the cal camera file and the tpt measurement file allows combining the processing in NanoCAD and TerraPhoto.

Calculation of calibration parameters.

Once a sufficient number of points have been measured for calculations, a button will become available. Clicking it opens a dialog for calculating the calibration parameters. In this dialog, select the parameters to be calculated and click the Run button.

After processing, a calculation log is displayed showing the error in pixels per iteration, the final error, and the calculated parameters.

If you click the Apply button, the calculated parameters are saved to the project, and the refinement iterations during the next calibration will start from these values. If you click the Cancel button, the current camera parameters will not change.

Calibration can be performed several times by adding points and changing the calculated parameters. Changing the order and composition of the calculated parameters can yield different results. These experiments will help select the calculation technology to obtain the best resulting accuracy.

The protocols of all calibrations are saved in a summary protocol. In the viewing dialog, you can save the protocol to a file to compare it later with the protocol of another sequence of calibrations.

The final calculated parameters are saved to the camera file when you click the button. Using this file when creating orthophotos instead of the original camera file will improve the accuracy of the created orthophotos.