(Not recommended) Disparity map between stereo images
disparity
is not recommended. Use disparityBM
or disparitySGM
instead. For more information, see Compatibility Considerations
returns the disparity map, disparityMap
= disparity(I1
,I2
)disparityMap
, for a pair of stereo
images, I1
and I2
.
provides additional control for the disparity algorithm by using one or more
disparityMap
= disparity(I1
,I2
,Name,Value
)Name,Value
pair arguments.
If your resulting disparity map looks noisy, try modifying the
DisparityRange
. The disparity range depends on the distance
between the two cameras and the distance between the cameras and the object of interest.
Increase the DisparityRange
when the cameras are far apart or the
objects are close to the cameras. To determine a reasonable disparity for your
configuration, display the stereo anaglyph of the input images in imtool
and use the Distance tool to measure distances between pairs of
corresponding points. Modify the MaxDisparity to correspond to the
measurement.
[1] Konolige, K., Small Vision Systems: Hardware and Implementation, Proceedings of the 8th International Symposium in Robotic Research, pages 203-212, 1997.
[2] Bradski, G. and A. Kaehler, Learning OpenCV : Computer Vision with the OpenCV Library, O'Reilly, Sebastopol, CA, 2008.
[3] Hirschmuller, H., Accurate and Efficient Stereo Processing by Semi-Global Matching and Mutual Information, International Conference on Computer Vision and Pattern Recognition, 2005.
estimateCameraParameters
| estimateUncalibratedRectification
| reconstructScene
| rectifyStereoImages
| Stereo Camera Calibrator