Calibrate Camera Lens (Experimental)
Don't forget about alignment!
Calibration and alignment are both essential to proper camera setup. Don't forget to go through the alignment process after completing calibration.
Quick Reference: Calibrate Camera Lens (Experimental)
-
Location
Right-click in Camera Control Window → Calibrate Camera Lens (experimental)
Camera lenses are not perfectly flat, and distort the image they capture. This effect is stronger on the fisheye lenses needed to capture the working area of larger lasers.
To use your camera, you must compensate for this distortion using the Camera Calibration Wizard.
LightBurn 2.0 features a new, experimental Camera Calibration Wizard with a more robust and seamless process.
Note
While this feature is stable and ready for public use, the appearance of the wizard and the instructions provided may change in the future.
Please contact us at [email protected] if you encounter any issues.
To begin the experimental calibration process:
- Make sure the correct camera is selected in the Camera Control Window.
- Right-click in the same window and select Calibrate Camera Lens (experimental).
Overview¶
Calibration Pattern Details
In order to work properly, the calibration pattern must be:
- undistorted
- perfectly flat
- surrounded by a 6 mm (¼") or larger margin
The size of the printed calibration pattern is not important, but should be positioned relative to your camera so that it takes up as much of the camera's field of view as possible. You can scale the image up or down when printing it, as well as raise or lower the printed pattern to adjust how much of the camera view it takes up.
-
Download and print the following image:
- AprilTags in PDF
-
Mount the printed image to something stiff and flat, such as cardboard, foam board, wood, or a clipboard.
Note on camera placement
It is not necessary to mount the camera in the machine to perform the lens calibration. This process depends only on the camera's lens, not its placement in your machine — as long as the camera and calibration pattern are perfectly still, calibration can be performed anywhere.
-
Make sure the bed of your laser has good, consistent lighting and the camera is in focus.
Focusing a LightBurn camera
Most offical LightBurn cameras can be manually focused by gently twisting their lenses.
-
Make sure the correct camera is selected in the Camera Control Window.
-
Right-click in the same window and select Calibrate Camera Lens (experimental).
Walkthrough¶
The Camera Calibration Wizard walks you through capturing multiple images of the Calibration Pattern you've printed out. The software analyzes how the pattern appears in the images, and compares that against its internal knowledge of how the pattern should look. It determines the amount and shape of distortion produced by the lens of the camera, and computes a lens correction that is accurate for your camera.
After following the steps from the overview above, you're read to begin the calibration process.
To open the wizard:
- Make sure the correct camera is selected in the Camera Control Window.
- Right-click in the same window and select Calibrate Camera Lens (experimental).
You'll see a link to download the AprilTags calibration pattern, as well as instructions on completing the calibration process.
You can use the arrow buttons to the left side of the window to jog your laser out of the way, if its current position will obstruct your ability to place and capture the calibration pattern in your laser's work area.
The Sample field lets you control the number of frames per second used during the capture process.
After reading the instructions, and adjusting the sample rate or jogging your laser if necessary, click Next to proceed.
The view will change to include a live image from your camera, along with several new buttons.
The wizard will overlay green squares on top of each AprilTag it identified in the calibration pattern. Position the pattern so that the camera sees and identifies as many tags as possible.
If the wizard can't identify very many or any tags, you may need to adjust your camera's focus.
Click the Capture button and you should see something like this:
Move and rotate the calibration pattern around the camera's field of view, clicking the Capture button again for each new position.
You can click to Discard any capture you are disatisfied with, for example if you accidentally click twice, clicked before the samples settled and were identified, or moved the pattern or camera while clicking.
After you've captured 9 samples, you have enough to proceed to the next step of the calibration process, but you can continue taking additional captures to increase accuracy.
Click Next when you're ready to proceed.
The calibration wizard will take a few moments to build two camera models: Standard Camera and Fisheye Camera.
Select each model from the dropdown menu in the lower left, and compare the results. The better model will show less distortion in the example capture. You can also select Original Calibration from the menu to view and compare to your current calibration.
Tip
Look for lines that you know to be straight in the real world — if they're wavy in the capture, that means there is distortion in the selected model.
If the captures from both models look comparable, or you're unsure which to choose, select the model that shows the lower Error reading, displayed beneath the dropdown menu.
Note
If both models appear distorted, click Back to capture additional samples, or discard the previous samples and begin the process over. Make sure the physical calibration pattern is undistorted, perfectly flat, and surrounded by a 6 mm (¼") or larger margin.
After you've selected the least-distorted model, click Next to advance to the final page of the Calibration Wizard.
When you have advanced through all the steps, and you are satisfied that you have a good calibration result with a nicely undistorted image, click Save to store the results.
Don't forget about alignment!
Calibration and alignment are both essential to proper camera setup. Don't forget to go through the alignment process after completing calibration.
Troubleshooting¶
See Camera Troubleshooting for guidance on common camera issues.
Related Topics¶
- Calibrate Camera Alignment
- Camera Control Window
- Camera Selection Helper
- Camera Installation and Focusing
For more help using LightBurn, please visit our forum to talk with LightBurn staff and users, or email support.