The best measurement results are achieved when the camera calibration data is present in the calibration database. In case camera calibration data is not found in the Pixpro database, the user is provided with the choice either to let the reconstruction determine the calibration data automatically, or to enter the calibration data manually. When the 3D reconstruction begins, the user is allowed to select whether to optimize intrinsics, or not. If the intrinsics optimization is not selected, the reconstruction is performed faster, and the calibration data is taken from the database. If the user prefers to optimize the intrinsics, the reconstruction takes longer since the autocalibration process is launched. To get faster and more consistent results having the calibration data is a necessity.
Getting calibration done by Pixpro¶
To get consistent reconstruction results Pixpro team can calibrate your specific camera and then add it to the database. Even if we have the existing camera model and lens already present in the database, to achieve maximum accuracy the specific camera intriniscs (then one that you have) can be found, because even the same model camera and lens combinations will have slightly different intrinsic values.
For that you can always contact support and provide us with a set of images made with the lens and camera in question. Image dataset provided for this calibration should be made in ideal conditions with no less than 50 images. Ideally angled and nadir images should comprise the set, for maximum calibration accuracy. Overlap, image sharpness, exposure should be up to the task of reconstructing the scene, if the image set will not be sufficient for the 3D reconstruction of the scene it will not be suitable for calibration. The scene itself can be anything, but buildings and surfaces with sharper angles and many visual features work the best.
After images have been provided and the calibration process complete Pixpro team will provide you with a database file which should be names as Calibration.pxpb
Import and use the data open Pixpro app, select Tools in the menu and choose Import calibration DB, then navigate and select the provided Calibration.pxpb and press open. The file will be copied to the appropriate folder and used as the database.
Next time you import your images into Pixpro you will be able to choose the specific camera intrinsics made for your camera and achieve consistent results.
Inputting your own camera intrinsics¶
Exceedingly advanced users can input their own camera undistortion data into Pixpro. Pixpro uses a Brown camera model with K1 K2 K3 radial distortion values and T1 T2 tangential distortion values as well as fundamental principle point and focal length values.
If you happen to have your camera undistortion data in this format you can add your own camera to the database.
Go to Photo Set manager in the tools menu or in the toolbar. Then click on Change Camera button. Here you can see all data regarding the camera and lenses.
In the first grey section of this panel current camera settings can be inspected. If you have an unknown camera most of the values will be empty.
In the Camera Parameters section you can add a new camera or rename/delete an existing one. Each camera can have multiple lenses.
Lens parameters section is the section where new undistortion data can be entered. Cloning an existing camera is useful when adding your own camera lens data but the camera model is known. For example, your specific Dji Phantom 4 drone will have different intrinsic values of lenses but sensor dimensions and image size will remain the same. Cloning existing Dji Phantom 4 data will save you the steps of entering the image/sensor size data, and you will only need to enter the data that changes with your specific drone/camera. Always enter a unique name for your drone so when time comes to choose which lens data to use, you can easily recognize your drones' data.
Click on Parameters ... and the following window will appear.
Here you can change all the settings that are present. It is recommended to enter all values in pixels rather than millimeters. Begin at the top by entering the focal length, and image size. Lens EXIF tag should be present if it is detected. If not you will have to always manually choose the lens before the reconstruction. Preferred focal length is the one that comes with the image exif info. Preferred focal length will be used to detect the particular lens and its focal length position. Further down enter sensor dimensions. As you enter various values you can see that other fields start to fill up automatically. After entering sensor and lens data, make sure everything is correct and then enter the radial and tangential distortion values. When finished reexamine all the values once again, make sure that the Trusted checkmark is on and press ok (if the Trusted checkmark is disabled the camera intrinsics will not be used despite the values actually being present in the database). Now this data has been entered into the database and can be used before the reconstruction process. The intrinsic data will be detected automatically if the camera model, lens model, image size and focal length parameters are entered correctly because these values are used as identification in the database.
At the bottom of this dialog there are two buttons:
Calibration button will take you to a list of previous reconstruction calibration results made with the same exact camera. Here you can see how calibration values progressed and sigma values to determine the deviations. You can select multiple calibration results and press Trust so that these results combined would be used to calculate optimal calibration data. Press ok and the trusted data will be entered into the Lenses Parameters window.
Estimate button will use the image exif data to quickly determine the focal length and the principal point values. Could serve as a starting point for entering calibration data.