- All Known Implementing Classes:
Computes a stack of matching costs for all pixels across all possible disparities for use
SgmCostAggregation. Pay close attention to the element ordering in the output. Ordering was
selected to reduce CPU cache misses when aggregating the costs.
The output is really a 3D tensor, but to avoid creating another custom data type planar images are used. The other reason to use a planar image is that it was desirable to have multiple arrays define the tensor.
Format of costYXD. YXD indicates the ordering of values in the tensor. The outer most is T, which is the bands. X is the row in a planar image and D the columns. Thus, (y,x,d) = costYXD.getBand(y).get(d,x-disparityMin).
Field SummaryModifier and TypeFieldDescription
static final intMaximum allowed cost fo a disparity 11-bits as suggested in the paper
MAX_COSTstatic final int MAX_COSTMaximum allowed cost fo a disparity 11-bits as suggested in the paper
- See Also:
(int disparityMin, int disparityRange)Configures the disparity search
disparityMin- Minimum possible disparity, inclusive
disparityRange- Number of possible disparity values estimated. The max possible disparity is min+range-1.
processComputes the score for all possible disparity values across all pixels. If a disparity value would go outside of the image then the cost is set to
left- left image
right- right image
costYXD- Cost of output scaled to have a range of 0 to
MAX_COST, inclusive. Reshaped to match input and disparity range.