Package boofcv.alg.sfm
Class StereoProcessingBase<T extends boofcv.struct.image.ImageGray<T>>
- java.lang.Object
-
- boofcv.alg.sfm.StereoProcessingBase<T>
-
- Direct Known Subclasses:
StereoSparse3D
public class StereoProcessingBase<T extends boofcv.struct.image.ImageGray<T>> extends java.lang.ObjectBase class that configures stereo processing. Created distortion for converting image from its input image into an undistorted rectified image ready for stereo processing.
-
-
Field Summary
Fields Modifier and Type Field Description protected doublebaselineprotected doublecxprotected doublecyprotected doublefxprotected doublefyprotected TimageLeftRectprotected TimageRightRectprotected georegression.struct.point.Point3D_F64pointRectprotected org.ejml.data.DMatrixRMajrect1protected org.ejml.data.DMatrixRMajrect2protected org.ejml.data.DMatrixRMajrectKprotected org.ejml.data.DMatrixRMajrectR
-
Constructor Summary
Constructors Constructor Description StereoProcessingBase(java.lang.Class<T> imageType)Declares internal data structures
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomputeHomo3D(double x, double y, georegression.struct.point.Point3D_F64 pointLeft)Given a coordinate of a point in the left rectified frame, compute the point's 3D coordinate in the camera's reference frame in homogeneous coordinates.TgetImageLeftRect()Rectified left imageTgetImageRightRect()Rectified right imageorg.ejml.data.DMatrixRMajgetRect1()org.ejml.data.DMatrixRMajgetRect2()org.ejml.data.DMatrixRMajgetRectK()Intrinsic camera calibration matrix for both cameras after rectificationvoidinitialize()Initializes stereo processing.voidsetCalibration(boofcv.struct.calib.StereoParameters stereoParam)Specifies stereo parametersvoidsetImages(T leftImage, T rightImage)Sets the input images.
-
-
-
Field Detail
-
rect1
protected org.ejml.data.DMatrixRMaj rect1
-
rect2
protected org.ejml.data.DMatrixRMaj rect2
-
rectK
protected org.ejml.data.DMatrixRMaj rectK
-
rectR
protected org.ejml.data.DMatrixRMaj rectR
-
pointRect
protected georegression.struct.point.Point3D_F64 pointRect
-
baseline
protected double baseline
-
cx
protected double cx
-
cy
protected double cy
-
fx
protected double fx
-
fy
protected double fy
-
-
Constructor Detail
-
StereoProcessingBase
public StereoProcessingBase(java.lang.Class<T> imageType)
Declares internal data structures- Parameters:
imageType- Input image type
-
-
Method Detail
-
setCalibration
public void setCalibration(boofcv.struct.calib.StereoParameters stereoParam)
Specifies stereo parameters- Parameters:
stereoParam- stereo parameters
-
computeHomo3D
public void computeHomo3D(double x, double y, georegression.struct.point.Point3D_F64 pointLeft)Given a coordinate of a point in the left rectified frame, compute the point's 3D coordinate in the camera's reference frame in homogeneous coordinates. To convert the coordinate into normal 3D, divide each element by the disparity.- Parameters:
x- x-coordinate of pixel in rectified left imagey- y-coordinate of pixel in rectified left imagepointLeft- Storage for 3D coordinate of point in homogeneous coordinates. w = disparity
-
setImages
public void setImages(T leftImage, T rightImage)
Sets the input images. Processing is delayed untilinitialize()has been called.- Parameters:
leftImage- Left imagerightImage- Right image
-
initialize
public void initialize()
Initializes stereo processing.
-
getImageLeftRect
public T getImageLeftRect()
Rectified left image
-
getImageRightRect
public T getImageRightRect()
Rectified right image
-
getRectK
public org.ejml.data.DMatrixRMaj getRectK()
Intrinsic camera calibration matrix for both cameras after rectification- Returns:
- camera calibration matrix
-
getRect1
public org.ejml.data.DMatrixRMaj getRect1()
-
getRect2
public org.ejml.data.DMatrixRMaj getRect2()
-
-