Interface DisparitySelect<Array,​T extends ImageGray>

All Known Implementing Classes:
SelectCorrelationSubpixel.F32_F32, SelectCorrelationWithChecks_F32, SelectCorrelationWithChecks_F32.DispU8, SelectCorrelationWta_F32_U8, SelectDisparityBasicWta, SelectDisparityWithChecksWta, SelectErrorBasicWta_F32_U8, SelectErrorBasicWta_S32_U8, SelectErrorSubpixel.F32_F32, SelectErrorSubpixel.S32_F32, SelectErrorWithChecks_F32, SelectErrorWithChecks_F32.DispU8, SelectErrorWithChecks_S32, SelectErrorWithChecks_S32.DispU8, SgmCostFromBlocks

public interface DisparitySelect<Array,​T extends ImageGray>

Selects the best disparity given the set of scores calculated by DisparityBlockMatch. The scores are provided as an array of integers or floats. A disparity of zero either means no match was found or the disparity was in fact zero.

The selected disparity written into the output image is equal to the found disparity minus the disparityMin. If a pixel is found to be invalid and no disparity found then its value is set to (disparityMax-disparityMin) + 1. The first requirement maximizes the useful storage of the output image and the second provides an unambiguous way to identify invalid pixels.

  • Method Summary

    Modifier and Type Method Description
    DisparitySelect<Array,​T> concurrentCopy()
    Creates a copy with separate working space.
    void configure​(T imageDisparity, int disparityMin, int disparityMax, int radiusX)
    Specifies the output and algorithmic configuration.
    Class<T> getDisparityType()
    Type of image the disparity is
    void process​(int row, Array scoresArray)
    Processes the array of scores.
  • Method Details

    • configure

      void configure​(T imageDisparity, int disparityMin, int disparityMax, int radiusX)
      Specifies the output and algorithmic configuration.
      Parameters:
      imageDisparity - Output disparity image.
      disparityMin - Minimum disparity that can be computed
      disparityMax - Maximum disparity that is calculated
      radiusX - Radius of the rectangular region being matched along x-axis.
    • process

      void process​(int row, Array scoresArray)
      Processes the array of scores. The score format is described in DisparityBlockMatch. The results are written directly into the disparity image passed to it in configure(ImageGray, int, int, int).
      Parameters:
      row - Image row the scores are from.
      scoresArray - Array containing scores. (int[] or float[])
    • concurrentCopy

      DisparitySelect<Array,​T> concurrentCopy()
      Creates a copy with separate working space. Used for concurrency. Data structures which are threadsafe can be shared
    • getDisparityType

      Class<T> getDisparityType()
      Type of image the disparity is
      Returns:
      Image type for disparity