Parts on a conveyor belt, a single stationary camera mounted above – this is a very common situation in industrial automation. It is often used to realise common image processing inspections based on the grey-value information of the scene. But did you know that there is an additional information source hidden in this situation? We can easily extract depth-related information by using uncalibrated stereo. Such additional information could even turn out to be the deciding factor for solving your image processing task.
We simply use the motion of the conveyor belt and take two images of a single part at two positions. In the sense of stereo vision, the motion of the object in the two images could also be interpreted as two different camera positions.
Fig. 1: First (left) and second (right) image
Fig. 2: Calculated disparity image of moving part
As the camera and scenes are not calibrated, we have to estimate the fundamental matrix first, which relates the scenes. This can be done by point correspondences and the operator
match_fundamental_matrix_ransac.
With a fundamental matrix, we can now perform a projective rectification of the two images to put them into the epipolar standard configuration, i.e., the epipolar lines should be horizontal. But what can be done if the scenes are radially distorted? In this case, the epipolar lines would no longer be lines, but curves. Such geometry results in less accurate stereo analysis and in a disturbed disparity image.
That is why HALCON provides another operator, which can be used to estimate the fundamental matrix and the radial distortion by point correspondences:
match_fundamental_matrix_distortion_ransac.
Considering the radial distortion highly improves the quality of reconstruction.
The according HDevelop example for uncalibrated stereo and a conveyor belt scene is called
match_fundamental_matrix_distortion_ransac_trans.hdev
and can be found in
%HALCONEXAMPLES%\hdevelop\3D-Reconstruction\Binocular-Stereo.
Of course, uncalibrated stereo can be used for different types of stereo setups with a single camera as well. The according HDevelop example is named
match_fundamental_matrix_distortion_ransac_general.hdev.
More information on uncalibrated stereo is available in MVTec’s Solution Guide III-C 3D Vision, section 5.3.6 “Uncalibrated Stereo Vision”, which can be downloaded here.