How to... (step-by-step instructions)
  1. Pix4D Documentation
  2. PIX4Dmapper
  3. How to... (step-by-step instructions)

How to calibrate a Fisheye Lens Camera - PIX4Dmapper

 

This article explains in detail the procedure of calibrating a Fisheye lens in PIX4Dmapper.

PIX4Dmapper requires as input the internal parameters of the camera used to acquire the images for processing. These parameters are used for the 3D reconstruction and therefore, it is crucial that they are accurate in order to achieve an optimal 3D reconstruction.

PIX4Dmapper has an internal camera database with the optimal parameters for many cameras. For cameras that do not exist in PIX4Dmapper ́s camera database, the optimal internal camera parameters can be computed in PIX4Dmapper while processing a good dataset. These parameters can then be used for all the projects acquired with the same camera. As small consumer-grade cameras are sensitive to vibration, temperature, etc., the software will, by default, optimize the internal parameters for each project starting from the same initial parameters.

To get the internal camera parameters for a perspective camera that does not exist in PIX4Dmapper's database:

Image requirements

A good dataset with the following properties is required:

  • Enough images (80 - 100 images).
  • High overlap and rich texture.
  • If possible, acquire a grid flight plan.
  • If possible, with GCPs.

Calibration procedure

1. Create a new project: Step 2. Creating a Project.
2. Import the images: Step 2. Creating a Project.
3. Configure the image properties:

3.1 (optional) Select the image coordinate system: Step 2. Creating a Project.
3.2 (optional, recommended) Import the image geolocation and orientation: How to select/change the image geolocation and orientation.
3.3 Edit the camera model. In the Select Camera Model section, click Edit.

3.3.1 In the Camera Model section, click Edit.
3.3.2 (Only for non-RGB cameras) Set the correct band configuration and weights: How to set the band weights for modified cameras (NIR, R,G and NIR,G, B) (steps 4 to 8).
3.3.3 If the flight plan is linear (grid, etc....) and the camera has a rolling shutter, choose Linear Rolling Shutter in the Camera Model Parameters section.
3.3.4 In the Camera Model Parameters section, select Fisheye Lens and set the following values:

      • Sensor Width [mm] or Pixel Size [um]: Set either the sensor width in millimeters or the pixel size in micrometers.
      • Principal Point x [pixel]: Set the principal point in the center of the image, i.e. set the value to ImageWidth/2.
      • Principal Point y [pixel]: Set the principal point in the center of the image, i.e. set the value to ImageHeight/2.
      • Polynomial Coefficients: Select the form of the polynomials to be 0-1-x-x-x. Set the coefficients to 0,1,0,0,0.
      • Camera Model with Symmetric Affine Transformation: Select the checkbox to have a symmetric model.
      • Affine transformation C = image width in pixels.
      • Affine transformation D = 0.
      • Affine transformation E = 0.
      • Affine transformation F = image width in pixels.

3.4 In the Edit Camera Model window, click OK.
3.5 In the Image Properties window, click Next.

4. Select the processing options template: Step 2. Creating a Project. If the images were acquired using a grid flight plan, select 3D Maps. If not, select 3D Models.
5. Select the output coordinate system and create the project: Step 2. Creating a Project.
6. (optional) Import GCPs without marking them: How to import and mark ground control points (GCPs).
7. In the Local Processing window, select step 1. Initial Processing, unselect step 2. Point Cloud and Mesh and 3. DSM, Orthomosaic, and Index and click Start.
8. (optional) If the project has image geolocation and GCPs in a known coordinate system, mark the GCPs using the rayCloud following How to import and mark ground control points (GCPs), reoptimize and regenerate the Quality Report (Menu Process > Generate Quality Report).
9. Verify the quality of the reconstruction by:

  • Assessing the Quality Report.
  • Selecting automatic tie points at different locations in the rayCloud and verifying the reprojection on the original images.
  • Selecting the GCPs in the rayCloud and verifying the reprojection on the original images.

10. If the reconstruction is not good enough, add and mark Manual Tie Points in the areas that are not well reconstructed and Reoptimize: How to import and mark Manual Tie Points (MTPs).
11. Generate the Quality Report by clicking Process > Generate Quality Report and repeat steps 9 and 10 till the reconstruction is good.
12. Once the reconstruction is good, save the optimized camera parameters so that they can be used as initial values for other projects:

12.1 Click Project > Image Properties Editor... to open the Image Properties Editor.
12.2 In the Selected Camera Model section, click Edit.
12.3 In the Camera Model section, click Edit.
12.4 In the Camera Model Parameters section, click Load Optimized Parameters and set the following values.

    • Principal Point x [pixel]: Set the principal point in the center of the image, i.e. set the value to ImageWidth/2.
    • Principal Point y [pixel]: Set the principal point in the center of the image, i.e. set the value to ImageHeight/2.

12.5 In the Camera Model section, click Save to DB.
12.6 In the Edit Camera Model window, click OK.

13. Remove the Manual Tie Points.
14. In the Processing bar, click Start to re-process step 1.
15. Verify the quality of the reconstruction by:

  • Assessing the Quality Report.
  • Selecting automatic tie points at different locations in the rayCloud and verifying the reprojection on the original images.
  • Selecting the GCPs in the rayCloud and verifying the reprojection on the original images.

16. If the reconstruction is not good, repeat steps 10 to 15.

The camera model is now saved in the user camera database. The next time that a project is created with the same camera, the camera parameters will be correctly detected.
For non-RGB cameras, the correct band configuration should be selected from the Bands dropdown list: Menu Project > Image Properties Editor... > Selected Camera Model > Edit Camera Model.