Interface BlockRowScore<T extends ImageBase<T>,ScoreArray,ImageData>

All Known Implementing Classes:
BlockRowScore.ArrayF32, BlockRowScore.ArrayS32, BlockRowScore.ArrayS32_BF32, BlockRowScore.ArrayS32_BS32, BlockRowScore.ArrayS32_BS64, BlockRowScoreCensus.CensusArrayS32_B32, BlockRowScoreCensus.S32, BlockRowScoreCensus.S64, BlockRowScoreCensus.U8, BlockRowScoreMutualInformation.U8, BlockRowScoreNcc.F32, BlockRowScoreSad.F32, BlockRowScoreSad.S16, BlockRowScoreSad.SadArrayF32, BlockRowScoreSad.SadArrayS32, BlockRowScoreSad.U16, BlockRowScoreSad.U8

public interface BlockRowScore<T extends ImageBase<T>,ScoreArray,ImageData>
Interface for computing disparity scores across an entire row

MUST BE THREAD SAFE

  • Method Details

    • setBorder

      void setBorder(ImageBorder<T> border)
    • setInput

      void setInput(T left, T right)
      Specifies the input images
      Parameters:
      left - left image
      right - right image
    • scoreRow

      void scoreRow(int row, ImageData leftRow, ImageData rightRow, ScoreArray scores, int disparityMin, int disparityMax, int regionWidth, ScoreArray elementScore)
      For a given disparity, the score for each region on the left share many components in common. Because of this the scores are computed with disparity being the outer most loop
      Parameters:
      row - Image row being examined
      scores - Storage for disparity scores.
      disparityMin - Minimum disparity to consider
      disparityMax - Maximum disparity to consider
      regionWidth - Size of the sample region's width
      elementScore - Storage for scores of individual pixels
    • score

      void score(ImageData leftRow, ImageData rightRow, int indexLeft, int indexRight, int offset, int length, ScoreArray elementScore)
    • getMaxPerPixelError

      int getMaxPerPixelError()
      Returns the maximum error each pixel in the region can contribute RuntimeException should be thrown.
      Returns:
      Largest possible error for the region.
    • isRequireNormalize

      boolean isRequireNormalize()
      If true then the score needs to be normalized
    • normalizeRegionScores

      void normalizeRegionScores(int row, ScoreArray scores, int disparityMin, int disparityMax, int regionWidth, int regionHeight, ScoreArray scoresNorm)
      Additional normalization that's applied after the score for a region is known. Currently only used by BlockRowScoreNcc.
      Parameters:
      row - Image row being examined
      scores - Storage for disparity scores.
      disparityMin - Minimum disparity to consider
      disparityMax - Maximum disparity to consider
      regionWidth - Size of the sample region's width
      regionHeight - Size of the sample region's height
    • normalizeScore

      void normalizeScore(int row, int colLeft, int colRight, int numCols, int regionWidth, int regionHeight, ScoreArray scores, int indexScores, ScoreArray scoresNorm)
      Applies normalization to a single row
      Parameters:
      row - Row that is being normalized
      colLeft - column in left image
      colRight - column in right image
      numCols - number of columns
      regionWidth - width of the region
      regionHeight - height of the region
      scores - array with scores that are to be normalized
      indexScores - first index in scores that is to be normalized
    • getImageType

      ImageType<T> getImageType()