Struct StereoDepthConfig::CostMatching
Defined in File StereoDepthConfig.hpp
Nested Relationships
This struct is a nested type of Class StereoDepthConfig.
Nested Types
Struct Documentation
-
struct CostMatching
The matching cost is way of measuring the similarity of image locations in stereo correspondence algorithm. Based on the configuration parameters and based on the descriptor type, a linear equation is applied to computing the cost for each candidate disparity at each pixel.
Public Types
-
enum class DisparityWidth : std::uint32_t
Disparity search range: 64 or 96 pixels are supported by the HW.
Values:
-
enumerator DISPARITY_64
-
enumerator DISPARITY_96
-
enumerator DISPARITY_64
Public Functions
Public Members
-
DisparityWidth disparityWidth = DisparityWidth::DISPARITY_96
Disparity search range, default 96 pixels.
-
bool enableCompanding = false
Disparity companding using sparse matching. Matching pixel by pixel for N disparities. Matching every 2nd pixel for M disparitites. Matching every 4th pixel for T disparities. In case of 96 disparities: N=48, M=32, T=16. This way the search range is extended to 176 disparities, by sparse matching. Note: when enabling this flag only depth map will be affected, disparity map is not.
-
uint8_t invalidDisparityValue = 0
Used only for debug purposes, SW postprocessing handled only invalid value of 0 properly.
-
uint8_t confidenceThreshold = 55
Disparities with confidence value over this threshold are accepted.
-
bool enableSwConfidenceThresholding = false
Enable software confidence thresholding. Applicable to RVC4 only.
-
LinearEquationParameters linearEquationParameters
Cost calculation linear equation parameters.
-
struct LinearEquationParameters
The linear equation applied for computing the cost is: COMB_COST = α*AD + β*(CTC<<3). CLAMP(COMB_COST >> 5, threshold). Where AD is the Absolute Difference between 2 pixels values. CTC is the Census Transform Cost between 2 pixels, based on Hamming distance (xor). The α and β parameters are subject to fine tuning by the user.
Public Functions
-
DEPTHAI_SERIALIZE(LinearEquationParameters, alpha, beta, threshold)
Public Members
-
uint8_t alpha = 0
-
uint8_t beta = 2
-
uint8_t threshold = 127
-
DEPTHAI_SERIALIZE(LinearEquationParameters, alpha, beta, threshold)
-
enum class DisparityWidth : std::uint32_t