IN THIS ARTICLE
User-provided camera parameter file
How to import the camera parameter file
How to obtain the camera parameter file
Camera parameter file export from PIX4Dmapper
Camera parameter template
User-provided camera parameter file
If a camera is not supported in PIX4Dreact, it is still possible to process the dataset if a file with the internal camera parameters is provided.
How to import the camera parameter file
The camera parameter file is to be provided in the .xml format as described below.
To use the file, perform the following steps:
- On the dashboard, click on the PIX4Dreact SETTINGS and select Camera parameters file.
- Click Select file and select the .xml file in the file dialog.
- Exit the settings and open or create a project to process the dataset. The camera parameters file is used automatically.
The file can be un-linked by clicking Remove in the Camera parameters file page of the settings. The parameter file will no longer be used.
If a camera parameter file is provided for a specific camera, its values override any corresponding values in the image Exif data or the internal database.
How to obtain the camera parameter file
There are two methods to generate a camera parameter file:
- PIX4Dmapper export. Calibrate the camera with PIX4Dmapper and export the camera parameters from the .p4d file.
- From a template. Use the template given below and fill the entries with values provided by the manufacturer or by a calibration procedure.
Camera parameter file export from PIX4Dmapper
PIX4Dmapper can be used to obtain the calibrated camera parameters in the correct .xml format.
With this approach, first the camera needs to be calibrated. For more information on how to calibrate cameras in PIX4Dmapper see How to calibrate a Perspective Lens Camera and How to calibrate a Fisheye Lens Camera articles.
Second, export the user camera database:
- In PIX4Dmapper, click ‘Help’, ‘Settings’.
- On the ‘Camera Database’ tab, under ‘User Database’, click ‘Export…’ and save the file in a suitable location.
Camera parameter template
The camera parameter file is a text file in XML format. Its structure depends on whether the camera has a perspective or fisheye lens. Here are examples for both types, and a description of the fields that must be filled in:
Perspective lens:
<cameraModelDB>
<version>19</version>
<cameras>
<camera name="S.O.D.A._10.6_5472x3648">
<imageWidth>5472</imageWidth>
<imageHeight>3648</imageHeight>
<pixelSize>2.4</pixelSize>
<principalPointXmm>6.54</principalPointXmm>
<principalPointYmm>4.348008</principalPointYmm>
<lensType>perspective</lensType>
<focalLengthmm>10.633008</focalLengthmm>
<radialK1>0.033</radialK1>
<radialK2>-0.209</radialK2>
<radialK3>0.315</radialK3>
<tangentialT1>0</tangentialT1>
<tangentialT2>0</tangentialT2>
<bandConfig>
<band name="Red" centralWaveLength="660" width="0"/>
<band name="Green" centralWaveLength="550" width="0"/>
<band name="Blue" centralWaveLength="470" width="0"/>
</bandConfig>
</camera>
</cameras>
</cameraModelDB>
Fisheye lens:
<cameraModelDB>
<version>19</version>
<cameras>
<camera name="PHANTOMVISIONFC200_5.0_4384x3288">
<imageWidth>4384</imageWidth>
<imageHeight>3288</imageHeight>
<principalPointXmm>3.085</principalPointXmm>
<principalPointYmm>2.31375</principalPointYmm>
<lensType>fisheye</lensType>
<poly1>1</poly1>
<poly2>-0.00643155</poly2>
<poly3>-0.127019</poly3>
<poly4>-0.017398</poly4>
<c>3853</c>
<d>6.74</d>
<e>6.74</e>
<f>3853</f>
<bandConfig>
<band name="Red" centralWaveLength="660" width="0"/>
<band name="Green" centralWaveLength="550" width="0"/>
<band name="Blue" centralWaveLength="470" width="0"/>
</bandConfig>
</camera>
</cameras>
</cameraModelDB>
The following tags and their attributes need to be filled adapted to your specific model. The values to provide are:
Tag | Attribute | Description |
---|---|---|
Camera | name | A string in the following format: <model>_<lens-model>_<focal-length>_<width>x<height> |
The following information is read from the image Exif information: |
||
If the lens model is not provided in the Exif, the format of the string is: <model>_<width>x<height> | ||
Read from the images: |
||
imageWidth, imageHeight | Image width/height (in px) | |
pixelSize | Pixel size (in micrometer) | |
principalPointXmm, principalPointYmm | Principal point X/Y (in mm) | |
lensType | perspective or fisheye | |
focalLengthmm | Focal length (in mm; perspective only) | |
radialK1, radialK2, radialK3, tangentialT1, tangentialT2 | Radial and tangential distortion coefficients (perspective only) | |
poly1, …, poly4 | Polynomial coefficients (fisheye only) | |
c, d, e, f | Affine deformation parameters (fisheye only) | |
bandConfig | Ordered list of bands | |
band | name | Band name (one of: “Red”, “Green”, “Blue”, “NIR”, “Alpha”, “Gray”, “Red edge”, “Thermal IR”, “LWIR”, “Garbage”, “Unknown”) |
centralWaveLength | Central wavelength of the band (in nm) | |
width | Full width at half maximum of wavelength distribution (in nm; 0 if unspecified) |
For more information see How are the Internal and External Camera Parameters defined? article.
Article feedback (for troubleshooting, post here)
0 comments