Package boofcv.alg.sfm
Class StereoSparse3D<T extends ImageGray<T>>
java.lang.Object
boofcv.alg.sfm.StereoProcessingBase<T>
boofcv.alg.sfm.StereoSparse3D<T>
- All Implemented Interfaces:
ImagePixelTo3D
public class StereoSparse3D<T extends ImageGray<T>>
extends StereoProcessingBase<T>
implements ImagePixelTo3D
Computes stereo disparity on a per pixel basis as requested.
-
Field Summary
Fields inherited from class boofcv.alg.sfm.StereoProcessingBase
baseline, cx, cy, fx, fy, imageLeftRect, imageRightRect, pointRect, rect1, rect2, rectK, rectR
-
Constructor Summary
ConstructorDescriptionStereoSparse3D
(StereoDisparitySparse<T> disparity, Class<T> imageType) Configures and declares internal data -
Method Summary
Modifier and TypeMethodDescriptiondouble
getW()
Found w-coordinate of point in camera coordinate system.double
getX()
Found x-coordinate of point in camera coordinate system.double
getY()
Found y-coordinate of point in camera coordinate system.double
getZ()
Found z-coordinate of point in camera coordinate system.boolean
process
(double x, double y) Takes in pixel coordinates from the left camera in the original image coordinate systemvoid
setCalibration
(StereoParameters stereoParam) Specifies stereo parametersvoid
Sets the input images.Methods inherited from class boofcv.alg.sfm.StereoProcessingBase
computeHomo3D, getImageLeftRect, getImageRightRect, getRect1, getRect2, getRectK, initialize
-
Constructor Details
-
StereoSparse3D
Configures and declares internal data- Parameters:
imageType
- Input image type
-
-
Method Details
-
setCalibration
Description copied from class:StereoProcessingBase
Specifies stereo parameters- Overrides:
setCalibration
in classStereoProcessingBase<T extends ImageGray<T>>
- Parameters:
stereoParam
- stereo parameters
-
setImages
Description copied from class:StereoProcessingBase
Sets the input images. Processing is delayed untilStereoProcessingBase.initialize()
has been called.- Overrides:
setImages
in classStereoProcessingBase<T extends ImageGray<T>>
- Parameters:
leftImage
- Left imagerightImage
- Right image
-
process
public boolean process(double x, double y) Takes in pixel coordinates from the left camera in the original image coordinate system- Specified by:
process
in interfaceImagePixelTo3D
- Parameters:
x
- x-coordinate of the pixely
- y-coordinate of the pixel- Returns:
- true if successful
-
getX
public double getX()Description copied from interface:ImagePixelTo3D
Found x-coordinate of point in camera coordinate system.- Specified by:
getX
in interfaceImagePixelTo3D
- Returns:
- x-coordinate
-
getY
public double getY()Description copied from interface:ImagePixelTo3D
Found y-coordinate of point in camera coordinate system.- Specified by:
getY
in interfaceImagePixelTo3D
- Returns:
- y-coordinate
-
getZ
public double getZ()Description copied from interface:ImagePixelTo3D
Found z-coordinate of point in camera coordinate system.- Specified by:
getZ
in interfaceImagePixelTo3D
- Returns:
- z-coordinate
-
getW
public double getW()Description copied from interface:ImagePixelTo3D
Found w-coordinate of point in camera coordinate system. If a point is at infinity then this value will be zero.- Specified by:
getW
in interfaceImagePixelTo3D
- Returns:
- w-coordinate
-