Dynamic Recalibration¶
Some common calibration errors can be automatically repaired with the dynamic calibration. It allows to adapt the camera’s epipolar, vergence and optical axis angles without performing a full recalibration.
There are two ways to dynamically recalibrate a camera:
The epipolar angle can be estimated from any captured images. This happens automatically in the background as long as the camera’s UseRecalibrator parameter is enabled.
You can perform an explicit recalibration when the camera can see a calibration pattern. This can estimate all three of the dynamic angles. You can start an explicit recalibration with the Recalibrate command or using the corresponding menu in NxView.
Note
The dynamic recalibration has a limit on how far the angles can be adjusted. If the camera geometry changed too much, the DynamicCalibrationLimitReached flag will be set. You should check this flag to get notified about potential problems with the camera calibration.
Code Example¶
We assume that the camera with serial “1234” is already open and has at least one stereo pattern observation in the pattern buffer. See this guide for more information on how to capture patterns.
// Perform the recalibration with the patterns from the pattern buffer.
NxLibCommand recalibrate(cmdRecalibrate);
recalibrate.parameters()[itmCameras] = "1234";
recalibrate.execute();
// Store the new calibration angle offsets to the camera's EEPROM.
NxLibCommand storeCalibration(cmdStoreCalibration);
storeCalibration.parameters()[itmCameras] = "1234";
storeCalibration.parameters()[itmDynamicOffsets] = true;
storeCalibration.execute();
* Perform the recalibration with the patterns from the pattern buffer.
set_framegrabber_param(RootHandle, 'exec:Parameters/Cameras', '1234')
set_framegrabber_param(RootHandle, 'do_execute', 'Recalibrate')
* Write the new offset angles into the EEPROM of the camera.
set_framegrabber_param(RootHandle, 'exec:Parameters/Cameras', '1234')
set_framegrabber_param(RootHandle, 'exec:Parameters/DynamicOffsets', 'true')
set_framegrabber_param(RootHandle, 'do_execute', 'StoreCalibration')