Class MultiBaselineDisparityMedian

All Implemented Interfaces:

public class MultiBaselineDisparityMedian
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 which should have better fill in and lower noise. The output disparity image will be in the original image's pixel coordinate and will not be a rectified image. The disparity for each pixel is selected using a median filter. The fused disparity image will always have a disparityMin of 0 and disparityRange of 100. The baseline is computed dynamically to ensure that max value
  • Constructor Details

    • MultiBaselineDisparityMedian

      public MultiBaselineDisparityMedian()
  • Method Details

    • initialize

      public void initialize​(CameraPinhole intrinsic, PixelTransform<Point2D_F64> pixelDist_to_Undist)
      Must call before adding images. Specifies the size of the original image before rectification and clears previously saved results.
      intrinsic - Camera parameters for the fused disparity image
      pixelDist_to_Undist - Transform from distorted to undistorted pixels
    • addDisparity

      public void addDisparity​(GrayF32 disparity, GrayU8 mask, DisparityParameters parameters, DMatrixRMaj undist_to_rect_px)
      Adds a disparity image to the list
      disparity - The disparity image. Does not need to be same shape as original.
      mask - Indicates which pixels could have usable disparity information
      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 disparity)
      Processes all the disparity images and creates a composite disparity image NOTE: The rectifcation matrix and the rectification rotation matrix will be identity.
      disparity - (Output) Disparity of the composite view. This will be in the original distorted pixels.
      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