The calibration of the monocular camera is a one time process but is also one of the most important processes to get the highest accuracy from Dragonfly. It allows to create a calibration file that encodes the distortion parameters of the camera optics. These distortion parameters are a function of the manual assembly process of the camera optics and of any enclosure used to protect the camera. The calibration file is used by Dragonfly to “normalize” the images collected.
Follow one of these guides to calibrate your monocular camera:
Instructions | |
---|---|
USB monocular camera inside your Dragonfly Kit | Good news! The calibration has been performed already by the Onit Support team!
|
Smartphone/tablet monocular camera | Follow the instructions below |
Raspberry Pi CSI monocular camera | Follow the instructions below |
USB monocular camera | Follow the instructions below |
If you want to calibrate a stereoscopic camera please go to this page!
1 – Prepare the calibration pattern
- Launch Dragonfly and connect your monocular camera after having followed one of the guide inside the Connect the camera branch of the left side menu.
- Click on the Calibration tab.
- Download the calibration pattern from this link.
- Now you have 2 options:
- OPTION 1 – Open the calibration pattern on the screen of your PC. This can be done only if you have 2 screens because:
- the first screen will be used to visualize the calibration pattern.
- the second screen will be used to look at the calibration tool and perform the calibration.
- OPTION 2 – Print the calibration pattern on a A4 or Letter paper and place it on a plain surface. Do not perform the calibration if the calibration pattern printed is wavy because you won’t be able to perform a good calibration and Dragonfly won’t produce accurate results!
- OPTION 1 – Open the calibration pattern on the screen of your PC. This can be done only if you have 2 screens because:
2 – Setup the calibration parameters
- Measure the distance in millimeters (NO inches NO centimeters!) of the HDIST line visible inside the calibration pattern.
- Enter the distance just measured inside the field HDIST.
- Select 640 x 480 as Video Resolution of your camera from the drop down menu. Do not set other resolutions regardless of the maximum resolution that can be used by your camera!
- Enable the ASSISTED MODE checkbox!
About the FISHEYE LENS checkbox
The FISHEYE LENS checkbox inside the CALIBRATION tab does NOT have an impact on the calibration process. It is needed just needed to modify the video preview in order to ease the calibration process when calibrating fisheye cameras. IF you have a WIDE ANGLE camera please ENABLE this checkbox.
3 – Perform the calibration
Video of a well done calibration of a monocular fisheye camera
- Start the calibration by clicking on Start Calibration.
- The server presents you with a pulsating color pattern overlay, surrounded by a black frame with a positioning indicator in the corner, and a dynamic green indicator bar below.
- If you hold your calibration pattern plate to the camera, you should see the black dots being connected by colored lines.
- The objective is now to match the pattern displayed inside the preview window with your calibration pattern printed or displayed on another screen. Once there is a match the snapshots are made automatically (and you should hear a snapshot sound). Please make sure that the camera and the pattern are close (look at the video above to have an idea!). Otherwise the calibration result won’t be usable!
- It doesn’t matter whether you move the camera over the calibration pattern or the calibration pattern in front of the camera.
- The server will present between 21 poses (with the FISHEYE checkbox INACTIVE) and 29 poses (with the FISHEYE checkbox ACTIVE), which all need to be matched. TIP: if it helps you to coordinate your movements, you can have the image displayed mirrored by clicking on the button Flip View.
- After you have matched all the poses, the server automatically starts the computation of the calibration parameters of your camera. It could take up to 1 minute. Please wait and don’t do anything. You will be notified once this process is finished.
- At the end of the calibration process click on the Download button and save the JSON calibration file generated by the calibration tool inside the config folder of the Dragonfly App (
/application/data/config/
).
4 – Make the calibration file available to Dragonfly
- Click on the Configuration tab and chose from the Calibration file drop down menu the JSON calibration file just placed inside the config folder of the Dragonfly App (
/application/data/config/)
- Click on Save and Restart.
Warning to users of Windows 10 Pro
To properly copy the calibration file from Windows 10 Pro to Ubuntu running inside WSL please follow these steps! Do not copy manually the calibration file or you will damage it!
5 – Verify the calibration quality
To verify the calibration quality please:
- Click on the Configuration tab.
- Set a field of view of 90°. Please be aware that 90° is not strictly the best field of view for your camera. You can find the instructions to compute the best field of view for your camera in the next support page.
- Press Save Configuration and Restart.
- Press on the GREEN PLAY button to activate the camera. The video preview window should be displayed.
- Now point the camera towards a square or rectangular shape and verify if the lines/shapes that are straight on the square/rectangular shape are also straight inside the video preview.
- If this is the case then the calibration computed is good.
- If this is NOT the case then it might be that something went wrong during the calibration process. Please repeat the calibration process.