Package boofcv.alg.disparity.block
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
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classBlockRowScore.ArrayF32<T extends ImageBase<T>>static classBlockRowScore.ArrayS32<T extends ImageBase<T>,ImageData> static classstatic classBlockRowScore.ArrayS32_BS32<T extends GrayI<T>,ImageData> static class -
Method Summary
Modifier and TypeMethodDescriptionintReturns the maximum error each pixel in the region can contributeRuntimeExceptionshould be thrown.booleanIf true then the score needs to be normalizedvoidnormalizeRegionScores(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.voidnormalizeScore(int row, int colLeft, int colRight, int numCols, int regionWidth, int regionHeight, ScoreArray scores, int indexScores, ScoreArray scoresNorm) Applies normalization to a single rowvoidscore(ImageData leftRow, ImageData rightRow, int indexLeft, int indexRight, int offset, int length, ScoreArray elementScore) voidscoreRow(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.voidsetBorder(ImageBorder<T> border) voidSpecifies the input images
-
Method Details
-
setBorder
-
setInput
Specifies the input images- Parameters:
left- left imageright- 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 examinedscores- Storage for disparity scores.disparityMin- Minimum disparity to considerdisparityMax- Maximum disparity to considerregionWidth- Size of the sample region's widthelementScore- 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 contributeRuntimeExceptionshould 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 byBlockRowScoreNcc.- Parameters:
row- Image row being examinedscores- Storage for disparity scores.disparityMin- Minimum disparity to considerdisparityMax- Maximum disparity to considerregionWidth- Size of the sample region's widthregionHeight- 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 normalizedcolLeft- column in left imagecolRight- column in right imagenumCols- number of columnsregionWidth- width of the regionregionHeight- height of the regionscores- array with scores that are to be normalizedindexScores- first index in scores that is to be normalized
-
getImageType
-