boofcv.examples.stereo
Class ExampleStereoDisparity
- java.lang.Object
-
- boofcv.examples.stereo.ExampleStereoDisparity
-
public class ExampleStereoDisparity extends java.lang.ObjectThe disparity between two stereo images is used to estimate the range of objects inside the camera's view. Disparity is the difference in position between the viewed location of a point in the left and right stereo images. Because input images are rectified, corresponding points can be found by only searching along image rows. Values in the disparity image specify how different the two images are. A value of X indicates that the corresponding point in the right image from the left is at "x' = x - X - minDisparity", where x' and x are the locations in the right and left images respectively. An invalid value with no correspondence is set to a value more than (max - min) disparity.
-
-
Constructor Summary
Constructors Constructor and Description ExampleStereoDisparity()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static GrayU8denseDisparity(GrayU8 rectLeft, GrayU8 rectRight, int regionSize, int minDisparity, int maxDisparity)Computes the dense disparity between between two stereo images.static GrayF32denseDisparitySubpixel(GrayU8 rectLeft, GrayU8 rectRight, int regionSize, int minDisparity, int maxDisparity)Same as above, but compute disparity to within sub-pixel accuracy.static voidmain(java.lang.String[] args)static RectifyCalibratedrectify(GrayU8 origLeft, GrayU8 origRight, StereoParameters param, GrayU8 rectLeft, GrayU8 rectRight)Rectified the input images using known calibration.
-
-
-
Method Detail
-
denseDisparity
public static GrayU8 denseDisparity(GrayU8 rectLeft, GrayU8 rectRight, int regionSize, int minDisparity, int maxDisparity)
Computes the dense disparity between between two stereo images. The input images must be rectified with lens distortion removed to work! Floating point images are also supported.- Parameters:
rectLeft- Rectified left camera imagerectRight- Rectified right camera imageregionSize- Radius of region being matchedminDisparity- Minimum disparity that is consideredmaxDisparity- Maximum disparity that is considered- Returns:
- Disparity image
-
denseDisparitySubpixel
public static GrayF32 denseDisparitySubpixel(GrayU8 rectLeft, GrayU8 rectRight, int regionSize, int minDisparity, int maxDisparity)
Same as above, but compute disparity to within sub-pixel accuracy. The difference between the two is more apparent when a 3D point cloud is computed.
-
rectify
public static RectifyCalibrated rectify(GrayU8 origLeft, GrayU8 origRight, StereoParameters param, GrayU8 rectLeft, GrayU8 rectRight)
Rectified the input images using known calibration.
-
main
public static void main(java.lang.String[] args)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG