You have chosen a camera and lens and mounted them in your setup. Everything works well but you want to know how accurate your measurements actually are. Do they meet the accuracy requirements? Here is what you can do in this situation:
Calibration builds a bridge between the camera-space, which is essentially pixelated and two-dimensional, and the “real world”, which is three-dimensional and expects results specified in meters or similar units. When the calibration process has been completed, check that it performed well by inspecting the value of the control parameter Error returned by the operator calibrate_cameras. Error specifies the root mean square error of the back projection of the points used for the calibration. It should be as small as possible and at least smaller than 1.0, thus indicating that a subpixel precise evaluation of the data is possible with the camera parameters estimated during the calibration. Usually, values smaller than 0.1 pixels can be reached. Please do not misinterpret this value: A small back projection error simply means that the calibration performed well from a numerical point of view. In some cases the numerics might be ok, even if the calibration fails to represent your imaging system! Therefore, you should always perform an additional plausibility check: Compare the estimated camera parameters (and poses) with the initial values. Strong differences indicate a possible mismatch between the setup and the estimated parameters.
First, assume that you want to measure dimensional features in a given plane. Here, we suggest a pragmatic approach: Measure the distance between some known points and compare those values with the nominal values. We suggest using the calibration plate for this task. Place it on the plane in which you want to perform the measurements and acquire an image. Using both operators find_calib_object and get_calib_data_observ_points, you can obtain the sorted image coordinates of the center of the circular targets. The operator vector_to_pose provides the pose of this plane. Here, you should set the input control parameter QualityType to the value ‘planar_analytics’. Use the output control Quality to ensure that the pose estimation performed well. Its meaning is similar to the output control Error of calibrate_cameras and its value should be similar, too. If Quality strongly differs from Error, check the illumination of the calibration plate. Bear in mind that most of the time the targets’ contrast on the calibration plate limits the quality of the measurement. Therefore, tuning the illumination in order to obtain a high-contrast image without over- or underexposure is a valuable effort.
Once you know the measurement plane’s pose, pick up some points on the calibration plate and estimate the distances between them. The following code shows how to do this. XMeas and YMeas contain the coordinates of the measured points. Similarly, XNom and YNom contain the nominal coordinates of the points as specified in the description file of the calibration plate.
StartIndex := [0,1,2,3,4,5,6,0,7,14,21,28,35,42,0,6]
StopIndex := [42,43,44,45,46,47,48,6,13,20,27,34,41,48,48,42]
distance_pp (YMeas[StartIdx], XMeas[StartIdx], YMeas[StopIdx], XMeas[StopIdx], MeasDistance)
get_calib_data (CalibID, ‘calib_obj’, 0, ‘x’, XNom)
get_calib_data (CalibID, ‘calib_obj’, 0, ‘y’, YNom)
distance_pp (YNom[StartIdx], XNom [StartIdx], YNom[StopIdx], XNom[StopIdx], NomDistance)
EstimatedDistError := abs(NomDistance–MeasDistance)
MeanError := mean(EstimatedDistError)
DeviationError := deviation(EstimatedDistError)
MeanError provides an idea of the accuracy that can be achieved with the system, whereas DeviationError provides an idea of its precision: Both values estimate the system’s measurement capability. If this test was carefully performed, especially if the image of the calibration plate was taken thoroughly, then MeanError and DeviationError should closely represent the best measurement capability of the system.
To summarise, we can state that it is possible to estimate the measurement capability of a vision system, i.e., to evaluate its ability to perform dimensional measurements within given tolerances. A prerequisite is to perform a camera calibration and to control its quality. After the calibration, we suggest to measure distances on the calibration plate itself to estimate the measurement error. This approach works with a single camera performing measurements in a plane, and, of course, can be extended to 3D multiview-stereo systems.