Calibration in Vic-3D is well automated but certain situations can lead to problems with either high calibration scores, or a failure to calibrate at all. This article lists some common causes for each situation.
What is the calibration score?
Calibration in Vic-3D is a process where the software builds up a model that includes the cameras' intrinsic calibration (focal length, distortion, perspective), the extrinsic relationship between the cameras (distance and angles), and the geometry of the calibration grid. Once the model is established, we can use it to project theoretical locations for all of the grid points in each image. The calibration score is the average distance between the theoretical point location and the actual position where the point was found in the camera image.
High calibration scores
If the calibration score is high, it means that either our theoretical model is not an accurate model of our camera system, or, more likely, that the grid points were extracted incorrectly or noisily. Note that even just one very bad image can cause all the scores to be high, since it can bias the calibration result; so in some cases, even if all the image scores are slightly high, removing one very bad image will drop all the rest of the scores.
Some common causes of incorrect grid point extraction:
- Glare/highlighting on grid: with some lighting setups, the black ink of the grid dots can appear slightly reflective, and white or light grey areas can appear within the black dots. This will bias the dot center and can increase error. You can compensate by either moving the light, or simply avoiding angles that cause this reflection. Also, note that for high-speed setups where very bright direct lighting is required, you can always calibrate at a different frame rate - in many cases, you can perform your calibration under room lighting only at low frame rates (ie, 60fps), while performing your actual test with the supplemental lighting at your test frame rate. As long as the aperture is not changed, the calibration will hold.
- Objects in front of grid points: if you are calibrating behind a frame or structure, it may be that some grid points are partially blocked; these points will be extracted incorrectly. It's also easy to accidentally hold the grid so that your hand blocks part of a point, giving the same result. Reposition the grid, or simply remove these images from consideration (right-click, and select "Remove row").
- Uneven backlighting: for the small, glass grids, it's important that the transparent dots be very evenly backlit. Use a very diffuse and even light source, and try to adjust it so all the dots look even.
If all the points are extracted well but the score is still high, the algorithm might not be modelling the system correctly. Some possible causes:
- Higher order distortions: the default distortion order for calibration is 1, but some short lenses (12mm, 8mm) can have 2nd and 3rd order distortions. You can try raising the distortion order spin box to 2 or 3 and see if the score improves.
To obtain an accurate estimate of 2nd and 3rd order distortion, it will be necessary to take quite a few images - approximately 30 or more. You should also be sure to use a grid that fills the field of view - using a much smaller grid will make accurate distortion modelling impossible.
Check to see that the distortion coefficients (kappa 1, kappa 2, kappa 3) approximately match between the two cameras - if they do not match, they are either poorly estimated, or not present. Running with a poor higher order distortion estimate can be worse than not using higher order distortions at all as it can cause false strains away from the image center.
The required distortion order for a given lens won't change from test to test, so once you establish the required distortion order for that lens, you should use the same setting in future tests.
- Other (non-radial) distortions: if your test involves other distortion sources such as a glass furnace window, or a liquid medium, or non-standard optics (such as stereomicroscopes), the standard calibration may not work. In this case, you may have to either change the physical setup, or apply parametric distortion correction - contact support directly for more information on this.
- Calibration grid flexing: the calibration grid does not have to be precisely flat or even, but it does need to be rigid. If you have printed your own grid, be sure it is fixed to something very rigid; also, the largest (50mm and 70mm) provided aluminum grids can flex if they are torqued while being held. Be sure to support these grids in a way that doesn't apply excessive twisting force.
- Not enough data to converge well: in some setups where the grid does not or cannot tilt out-of-plane very much, the algorithm may converge to poor values. You can try taking images with more tilt, or if this is impossible, you can use the "High magnification" option to force the Center values to the sensor center; this may allow the calibration to converge.
Failure to calibrate
If no points are extracted at all, there are a few potential causes.
- Incorrect grid parameters: if the Offset or Length values are entered incorrectly, the grid geometry will not be recognized. Check the Help for an explanation of each parameter; or, if you have a clear, head-on shot of the grid, you can click the "New" or "+" button, and Vic-3D will guess the parameters - only spacing must be entered, in this case.
- Transparent grid held backwards: for the glass grids, if the grid is held with the 'back' side to the camera, the geometry will appear inverted and points may be extracted incorrectly or not at all. Consult the glass grid document for details on identifying the 'front' side.
- Grid points to small: for grids that are very small in the field of view, there may be too few pixels to accurately represent an ellipse. In these cases, use a larger grid, or use a custom target with larger dots, if needed. Please note that even for reduced-resolution high speed tests, you may (and should) calibrate at the full resolution of the camera, for best accuracy. Use the "Adjust for cropping" menu option to correct for the resolution change.
In some cases, points will be extracted, but the calibration will not converge at all and will return an error such as "Linear calibration failed". There are two likely causes for this.
- Points extracted incorrectly: it may be that one or more of the images has points that are extracted in the wrong location or order; for example, a solid dot is identified as hollow, or a grid point is placed on a background feature. You can check your images to see if this is the case; when the number of points is displayed, any image which displays a very low number of points might be the culprit. Right-click on the image, and select "Remove row", then recalibrate.
- Some points covered up: the new calibration grids are designed with little runoff to allow the best possible calibration; because of this, it's easy to hold the grid so that some points are blocked by your hand. Be sure to hold the grid from behind, by the edges, to avoid this.
- Not enough data to calibrate: if all of your grid images are taken in very similar positions, or all grid images are taken in the same plane, the algorithm may not have enough data to model the system. In this case, it's best to retake the calibration images, adding some more tilt and out-of-plane motion to the grid.
In some cases, you may be very limited in grid position by a low depth of field - this can occur in high magnification setups, or where you must run with very large apertures, as in some high speed tests. In these cases, Vic-3D can have trouble estimating values for the pinhole centers - the values labeled "Center (X)" and "Center (Y)". To remedy this, you can click the "High magnification" checkbox in and try recalibrating; this forces the center values to the geometric center of the sensor and can often allow a calibration to proceed.