Interface StereoDisparity<Image extends ImageBase<Image>,Disparity extends ImageGray<Disparity>>

All Known Implementing Classes:
DisparityBlockMatchCorrelation, WrapBaseBlockMatch, WrapDisparityBlockMatchCensus, WrapDisparityBlockMatchRowFormat, WrapDisparitySgm

public interface StereoDisparity<Image extends ImageBase<Image>,Disparity extends ImageGray<Disparity>>

Given two rectified images compute the corresponding dense disparity image. Input images are assumed to be rectified along the x-axis. Disparity goes from left to right image, thus the x coordinates of pixels in the left and right images have the following relationship x_right = x_left + disparity, and y_right = y_left.. To speed up calculations only a limited range of disparities are considered from minDisparity to maxDisparity. Image borders are not processed and the border size is specified by functions below.

DISPARITY IMAGE FORMAT: Returned disparity image is offset from the true value by minDisparity. This is done to maximize storage efficiency. To get the actual disparity value simply extract the value of a pixel and add minDisparity to it. Invalid pixels are indicated by having a value greater than (maxDisparity - minDisparity).

See Also:
  • Method Details

    • process

      void process(Image imageLeft, Image imageRight)
      Computes stereo disparity.
      imageLeft - Input left rectified image.
      imageRight - Input right rectified image.
    • getDisparity

      Disparity getDisparity()
      Return the computed disparity image. See comments in class description on disparity image format.
      Output disparity from left to right image.
    • getDisparityScore

      @Nullable @Nullable GrayF32 getDisparityScore()
      Returns a score that represents the goodness of fit for the selected value. Meaning of the score is cost function dependent. If null is returned that means the score was not saved. This can be
    • getDisparityMin

      int getDisparityMin()
      The minimum disparity which will be checked for.
      Minimum disparity.
    • getDisparityRange

      int getDisparityRange()
      The number of possible disparity values. The maximum value (inclusive) is min + range -1.
      Maximum disparity.
    • getInvalidValue

      int getInvalidValue()
      Specifies the value that pixels with no valid disparity estimate will be filled in with. This is always range, but any value >= range should be considered invalid.
    • getBorderX

      int getBorderX()
      Border around the image's x-axis which is not processed.
      border x-axis
    • getBorderY

      int getBorderY()
      Border around the image's y-axis which is not processed.
      border y-axis
    • getInputType

      ImageType<Image> getInputType()
      Type of input images it can process
      Input image type
    • getDisparityType

      Class<Disparity> getDisparityType()
      Type of disparity image it can write to.
      Output image type