Class MultiBaselineDisparityErrors

java.lang.Object
boofcv.alg.mvs.MultiBaselineDisparityErrors
All Implemented Interfaces:
VerbosePrint

public class MultiBaselineDisparityErrors extends Object implements VerbosePrint
Given a set of disparity images, all of which were computed from the same left image, fuse into a single disparity image. Stereo disparity pixel error is used to select the best disparity value when there's ambiguity.
  • Field Details

    • fusedBaseline

      public double fusedBaseline
      Selected baseline to represent the fused stereo system
  • Constructor Details

    • MultiBaselineDisparityErrors

      public MultiBaselineDisparityErrors()
  • Method Details

    • initialize

      public void initialize(int width, int height, PixelTransform<Point2D_F64> dist_to_undist)
      Must call before adding images. Specifies the size of the original image before rectification and clears previously saved results.
      Parameters:
      width - Width of common image
      height - Height of common image
      dist_to_undist - Transform from distorted to undistorted pixels
    • addDisparity

      public void addDisparity(GrayF32 disparity, GrayF32 score, DisparityParameters parameters, DMatrixRMaj undist_to_rect_px)
      Adds a disparity image to the list
      Parameters:
      disparity - The disparity image. Does not need to be same shape as original.
      score - Fit score for disparity measurements
      parameters - Disparity parameters for this stereo pair.
      undist_to_rect_px - Rectification matrix (3x3) from undistorted to rectified pixel coordinates
    • process

      public boolean process(GrayF32 inverseDepth)

      Processes all the disparity images and creates a composite inverse depth image image

      NOTE: The rectifcation matrix and the rectification rotation matrix will be identity.
      Parameters:
      inverseDepth - (Output) Inverse depth image
      Returns:
      true if successful or false if it failed
    • setVerbose

      public void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration)
      Specified by:
      setVerbose in interface VerbosePrint