Class StereoProcessingBase<T extends ImageGray<T>>

java.lang.Object
boofcv.alg.sfm.StereoProcessingBase<T>
Direct Known Subclasses:
StereoSparse3D

public class StereoProcessingBase<T extends ImageGray<T>> extends Object
Base class that configures stereo processing. Created distortion for converting image from its input image into an undistorted rectified image ready for stereo processing.
  • Field Details

    • imageLeftRect

      protected T extends ImageGray<T> imageLeftRect
    • imageRightRect

      protected T extends ImageGray<T> imageRightRect
    • rect1

      protected DMatrixRMaj rect1
    • rect2

      protected DMatrixRMaj rect2
    • rectK

      protected DMatrixRMaj rectK
    • rectR

      protected DMatrixRMaj rectR
    • pointRect

      protected Point3D_F64 pointRect
    • baseline

      protected double baseline
    • cx

      protected double cx
    • cy

      protected double cy
    • fx

      protected double fx
    • fy

      protected double fy
  • Constructor Details

    • StereoProcessingBase

      public StereoProcessingBase(Class<T> imageType)
      Declares internal data structures
      Parameters:
      imageType - Input image type
  • Method Details

    • setCalibration

      public void setCalibration(StereoParameters stereoParam)
      Specifies stereo parameters
      Parameters:
      stereoParam - stereo parameters
    • computeHomo3D

      public void computeHomo3D(double x, double y, 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 image
      y - y-coordinate of pixel in rectified left image
      pointLeft - 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 until initialize() has been called.
      Parameters:
      leftImage - Left image
      rightImage - 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 DMatrixRMaj getRectK()
      Intrinsic camera calibration matrix for both cameras after rectification
      Returns:
      camera calibration matrix
    • getRect1

      public DMatrixRMaj getRect1()
    • getRect2

      public DMatrixRMaj getRect2()