# StereoDepthConfig

This message is used to configure the [StereoDepth](https://docs.luxonis.com/software/depthai-components/nodes/stereo_depth.md)
node. With this message you can set filters, confidences, thresholds and mode of the
[StereoDepth](https://docs.luxonis.com/software/depthai-components/nodes/stereo_depth.md) node.

## Examples of functionality

 * [Stereo Depth from host](https://docs.luxonis.com/software/depthai/examples/stereo_depth_from_host.md)

## Reference

### depthai.StereoDepthConfig(depthai.Buffer)

Kind: Class

StereoDepthConfig message.

#### depthai.StereoDepthConfig.AlgorithmControl

Kind: Class

##### depthai.StereoDepthConfig.AlgorithmControl.DepthAlign

Kind: Class

Align the disparity/depth to the perspective of a rectified output, or center it

Members:

RECTIFIED_RIGHT :

RECTIFIED_LEFT :

CENTER :

###### CENTER: typing.ClassVar[RawStereoDepthConfig.AlgorithmControl.DepthAlign]

Kind: Class Variable

###### RECTIFIED_LEFT: typing.ClassVar[RawStereoDepthConfig.AlgorithmControl.DepthAlign]

Kind: Class Variable

###### RECTIFIED_RIGHT: typing.ClassVar[RawStereoDepthConfig.AlgorithmControl.DepthAlign]

Kind: Class Variable

###### __members__: typing.ClassVar[dict[str, RawStereoDepthConfig.AlgorithmControl.DepthAlign]]

Kind: Class Variable

###### __eq__(self, other: typing.Any) -> bool: bool

Kind: Method

###### __getstate__(self) -> int: int

Kind: Method

###### __hash__(self) -> int: int

Kind: Method

###### __index__(self: RawStereoDepthConfig.AlgorithmControl.DepthAlign) -> int: int

Kind: Method

###### __init__(self: RawStereoDepthConfig.AlgorithmControl.DepthAlign, value: typing.SupportsInt)

Kind: Method

###### __int__(self: RawStereoDepthConfig.AlgorithmControl.DepthAlign) -> int: int

Kind: Method

###### __ne__(self, other: typing.Any) -> bool: bool

Kind: Method

###### __repr__(self) -> str: str

Kind: Method

###### __setstate__(self: RawStereoDepthConfig.AlgorithmControl.DepthAlign, state: typing.SupportsInt)

Kind: Method

###### __str__(self) -> str: str

Kind: Method

###### name

Kind: Property

###### value

Kind: Property

##### depthai.StereoDepthConfig.AlgorithmControl.DepthUnit

Kind: Class

Measurement unit for depth data

Members:

METER :

CENTIMETER :

MILLIMETER :

INCH :

FOOT :

CUSTOM :

###### CENTIMETER: typing.ClassVar[RawStereoDepthConfig.AlgorithmControl.DepthUnit]

Kind: Class Variable

###### CUSTOM: typing.ClassVar[RawStereoDepthConfig.AlgorithmControl.DepthUnit]

Kind: Class Variable

###### FOOT: typing.ClassVar[RawStereoDepthConfig.AlgorithmControl.DepthUnit]

Kind: Class Variable

###### INCH: typing.ClassVar[RawStereoDepthConfig.AlgorithmControl.DepthUnit]

Kind: Class Variable

###### METER: typing.ClassVar[RawStereoDepthConfig.AlgorithmControl.DepthUnit]

Kind: Class Variable

###### MILLIMETER: typing.ClassVar[RawStereoDepthConfig.AlgorithmControl.DepthUnit]

Kind: Class Variable

###### __members__: typing.ClassVar[dict[str, RawStereoDepthConfig.AlgorithmControl.DepthUnit]]

Kind: Class Variable

###### __eq__(self, other: typing.Any) -> bool: bool

Kind: Method

###### __getstate__(self) -> int: int

Kind: Method

###### __hash__(self) -> int: int

Kind: Method

###### __index__(self: RawStereoDepthConfig.AlgorithmControl.DepthUnit) -> int: int

Kind: Method

###### __init__(self: RawStereoDepthConfig.AlgorithmControl.DepthUnit, value: typing.SupportsInt)

Kind: Method

###### __int__(self: RawStereoDepthConfig.AlgorithmControl.DepthUnit) -> int: int

Kind: Method

###### __ne__(self, other: typing.Any) -> bool: bool

Kind: Method

###### __repr__(self) -> str: str

Kind: Method

###### __setstate__(self: RawStereoDepthConfig.AlgorithmControl.DepthUnit, state: typing.SupportsInt)

Kind: Method

###### __str__(self) -> str: str

Kind: Method

###### name

Kind: Property

###### value

Kind: Property

##### __init__(self: RawStereoDepthConfig.AlgorithmControl)

Kind: Method

##### centerAlignmentShiftFactor

Kind: Property

Used only for debug purposes. centerAlignmentShiftFactor is set automatically in
firmware, from camera extrinsics when depth alignment to camera is enabled.
Center alignment is achieved by shifting the obtained disparity map by a scale
factor. It's used to align to a different camera that is on the same horizontal
baseline as the two stereo cameras. E.g. if we have a device with 10 cm stereo
baseline, and we have another camera inbetween, 9cm from the LEFT camera and 1
cm from the RIGHT camera we can align the obtained disparity map using a scale
factor of 0.9. Note that aligning disparity map to a different camera involves 2
steps: 1. Shifting obtained disparity map. 2. Warping the image to counter
rotate and scaling to match the FOV. Center alignment factor 1 is equivalent to
RECTIFIED_RIGHT Center alignment factor 0 is equivalent to RECTIFIED_LEFT

##### centerAlignmentShiftFactor.setter(self, arg0: typing.SupportsFloat | None)

Kind: Method

##### customDepthUnitMultiplier

Kind: Property

Custom depth unit multiplier, if custom depth unit is enabled, relative to 1
meter. A multiplier of 1000 effectively means depth unit in millimeter.

##### customDepthUnitMultiplier.setter(self, arg0: typing.SupportsFloat)

Kind: Method

##### depthAlign

Kind: Property

Set the disparity/depth alignment to the perspective of a rectified output, or
center it

##### depthAlign.setter(self, arg0: RawStereoDepthConfig.AlgorithmControl.DepthAlign)

Kind: Method

##### depthUnit

Kind: Property

Measurement unit for depth data. Depth data is integer value, multiple of depth
unit.

##### depthUnit.setter(self, arg0: RawStereoDepthConfig.AlgorithmControl.DepthUnit)

Kind: Method

##### disparityShift

Kind: Property

Shift input frame by a number of pixels to increase minimum depth. For example
shifting by 48 will change effective disparity search range from (0,95] to
[48,143]. An alternative approach to reducing the minZ. We normally only
recommend doing this when it is known that there will be no objects farther away
than MaxZ, such as having a depth camera mounted above a table pointing down at
the table surface.

##### disparityShift.setter(self, arg0: typing.SupportsInt)

Kind: Method

##### enableExtended

Kind: Property

Disparity range increased from 95 to 190, combined from full resolution and
downscaled images. Suitable for short range objects

##### enableExtended.setter(self, arg0: bool)

Kind: Method

##### enableLeftRightCheck

Kind: Property

Computes and combines disparities in both L-R and R-L directions, and combine
them. For better occlusion handling

##### enableLeftRightCheck.setter(self, arg0: bool)

Kind: Method

##### enableSubpixel

Kind: Property

Computes disparity with sub-pixel interpolation (5 fractional bits), suitable
for long range

##### enableSubpixel.setter(self, arg0: bool)

Kind: Method

##### leftRightCheckThreshold

Kind: Property

Left-right check threshold for left-right, right-left disparity map combine,
0..128 Used only when left-right check mode is enabled. Defines the maximum
difference between the confidence of pixels from left-right and right-left
confidence maps

##### leftRightCheckThreshold.setter(self, arg0: typing.SupportsInt)

Kind: Method

##### numInvalidateEdgePixels

Kind: Property

Invalidate X amount of pixels at the edge of disparity frame. For right and
center alignment X pixels will be invalidated from the right edge, for left
alignment from the left edge.

##### numInvalidateEdgePixels.setter(self, arg0: typing.SupportsInt)

Kind: Method

##### subpixelFractionalBits

Kind: Property

Number of fractional bits for subpixel mode

Valid values: 3,4,5

Defines the number of fractional disparities: 2^x

Median filter postprocessing is supported only for 3 fractional bits

##### subpixelFractionalBits.setter(self, arg0: typing.SupportsInt)

Kind: Method

#### depthai.StereoDepthConfig.CensusTransform

Kind: Class

The basic cost function used by the Stereo Accelerator for matching the left and
right images is the Census Transform. It works on a block of pixels and computes
a bit vector which represents the structure of the image in that block. There
are two types of Census Transform based on how the middle pixel is used: Classic
Approach and Modified Census. The comparisons that are made between pixels can
be or not thresholded. In some cases a mask can be applied to filter out only
specific bits from the entire bit stream. All these approaches are: Classic
Approach: Uses middle pixel to compare against all its neighbors over a defined
window. Each comparison results in a new bit, that is 0 if central pixel is
smaller, or 1 if is it bigger than its neighbor. Modified Census Transform: same
as classic Census Transform, but instead of comparing central pixel with its
neighbors, the window mean will be compared with each pixel over the window.
Thresholding Census Transform: same as classic Census Transform, but it is not
enough that a neighbor pixel to be bigger than the central pixel, it must be
significant bigger (based on a threshold). Census Transform with Mask: same as
classic Census Transform, but in this case not all of the pixel from the support
window are part of the binary descriptor. We use a ma sk “M” to define which
pixels are part of the binary descriptor (1), and which pixels should be skipped
(0).

##### depthai.StereoDepthConfig.CensusTransform.KernelSize

Kind: Class

Census transform kernel size possible values.

Members:

AUTO :

KERNEL_5x5 :

KERNEL_7x7 :

KERNEL_7x9 :

###### AUTO: typing.ClassVar[RawStereoDepthConfig.CensusTransform.KernelSize]

Kind: Class Variable

###### KERNEL_5x5: typing.ClassVar[RawStereoDepthConfig.CensusTransform.KernelSize]

Kind: Class Variable

###### KERNEL_7x7: typing.ClassVar[RawStereoDepthConfig.CensusTransform.KernelSize]

Kind: Class Variable

###### KERNEL_7x9: typing.ClassVar[RawStereoDepthConfig.CensusTransform.KernelSize]

Kind: Class Variable

###### __members__: typing.ClassVar[dict[str, RawStereoDepthConfig.CensusTransform.KernelSize]]

Kind: Class Variable

###### __eq__(self, other: typing.Any) -> bool: bool

Kind: Method

###### __getstate__(self) -> int: int

Kind: Method

###### __hash__(self) -> int: int

Kind: Method

###### __index__(self: RawStereoDepthConfig.CensusTransform.KernelSize) -> int: int

Kind: Method

###### __init__(self: RawStereoDepthConfig.CensusTransform.KernelSize, value: typing.SupportsInt)

Kind: Method

###### __int__(self: RawStereoDepthConfig.CensusTransform.KernelSize) -> int: int

Kind: Method

###### __ne__(self, other: typing.Any) -> bool: bool

Kind: Method

###### __repr__(self) -> str: str

Kind: Method

###### __setstate__(self: RawStereoDepthConfig.CensusTransform.KernelSize, state: typing.SupportsInt)

Kind: Method

###### __str__(self) -> str: str

Kind: Method

###### name

Kind: Property

###### value

Kind: Property

##### __init__(self: RawStereoDepthConfig.CensusTransform)

Kind: Method

##### enableMeanMode

Kind: Property

If enabled, each pixel in the window is compared with the mean window value
instead of the central pixel.

##### enableMeanMode.setter(self, arg0: bool)

Kind: Method

##### kernelMask

Kind: Property

Census transform mask, default - auto, mask is set based on resolution and
kernel size. Disabled for 400p input resolution. Enabled for 720p. 0XA82415 for
5x5 census transform kernel. 0XAA02A8154055 for 7x7 census transform kernel.
0X2AA00AA805540155 for 7x9 census transform kernel. Empirical values.

##### kernelMask.setter(self, arg0: typing.SupportsInt)

Kind: Method

##### kernelSize

Kind: Property

Census transform kernel size.

##### kernelSize.setter(self, arg0: RawStereoDepthConfig.CensusTransform.KernelSize)

Kind: Method

##### threshold

Kind: Property

Census transform comparison threshold value.

##### threshold.setter(self, arg0: typing.SupportsInt)

Kind: Method

#### depthai.StereoDepthConfig.CostAggregation

Kind: Class

Cost Aggregation is based on Semi Global Block Matching (SGBM). This algorithm
uses a semi global technique to aggregate the cost map. Ultimately the idea is
to build inertia into the stereo algorithm. If a pixel has very little texture
information, then odds are the correct disparity for this pixel is close to that
of the previous pixel considered. This means that we get improved results in
areas with low texture.

##### __init__(self: RawStereoDepthConfig.CostAggregation)

Kind: Method

##### divisionFactor

Kind: Property

Cost calculation linear equation parameters.

##### divisionFactor.setter(self, arg0: typing.SupportsInt)

Kind: Method

##### horizontalPenaltyCostP1

Kind: Property

Horizontal P1 penalty cost parameter.

##### horizontalPenaltyCostP1.setter(self, arg0: typing.SupportsInt)

Kind: Method

##### horizontalPenaltyCostP2

Kind: Property

Horizontal P2 penalty cost parameter.

##### horizontalPenaltyCostP2.setter(self, arg0: typing.SupportsInt)

Kind: Method

##### verticalPenaltyCostP1

Kind: Property

Vertical P1 penalty cost parameter.

##### verticalPenaltyCostP1.setter(self, arg0: typing.SupportsInt)

Kind: Method

##### verticalPenaltyCostP2

Kind: Property

Vertical P2 penalty cost parameter.

##### verticalPenaltyCostP2.setter(self, arg0: typing.SupportsInt)

Kind: Method

#### depthai.StereoDepthConfig.CostMatching

Kind: Class

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.

##### depthai.StereoDepthConfig.CostMatching.DisparityWidth

Kind: Class

Disparity search range: 64 or 96 pixels are supported by the HW.

Members:

DISPARITY_64 :

DISPARITY_96 :

###### DISPARITY_64: typing.ClassVar[RawStereoDepthConfig.CostMatching.DisparityWidth]

Kind: Class Variable

###### DISPARITY_96: typing.ClassVar[RawStereoDepthConfig.CostMatching.DisparityWidth]

Kind: Class Variable

###### __members__: typing.ClassVar[dict[str, RawStereoDepthConfig.CostMatching.DisparityWidth]]

Kind: Class Variable

###### __eq__(self, other: typing.Any) -> bool: bool

Kind: Method

###### __getstate__(self) -> int: int

Kind: Method

###### __hash__(self) -> int: int

Kind: Method

###### __index__(self: RawStereoDepthConfig.CostMatching.DisparityWidth) -> int: int

Kind: Method

###### __init__(self: RawStereoDepthConfig.CostMatching.DisparityWidth, value: typing.SupportsInt)

Kind: Method

###### __int__(self: RawStereoDepthConfig.CostMatching.DisparityWidth) -> int: int

Kind: Method

###### __ne__(self, other: typing.Any) -> bool: bool

Kind: Method

###### __repr__(self) -> str: str

Kind: Method

###### __setstate__(self: RawStereoDepthConfig.CostMatching.DisparityWidth, state: typing.SupportsInt)

Kind: Method

###### __str__(self) -> str: str

Kind: Method

###### name

Kind: Property

###### value

Kind: Property

##### depthai.StereoDepthConfig.CostMatching.LinearEquationParameters

Kind: Class

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.

###### __init__(self: RawStereoDepthConfig.CostMatching.LinearEquationParameters)

Kind: Method

###### alpha

Kind: Property

###### alpha.setter(self, arg0: typing.SupportsInt)

Kind: Method

###### beta

Kind: Property

###### beta.setter(self, arg0: typing.SupportsInt)

Kind: Method

###### threshold

Kind: Property

###### threshold.setter(self, arg0: typing.SupportsInt)

Kind: Method

##### __init__(self: RawStereoDepthConfig.CostMatching)

Kind: Method

##### confidenceThreshold

Kind: Property

Disparities with confidence value under this threshold are accepted. Higher
confidence threshold means disparities with less confidence are accepted too.

##### confidenceThreshold.setter(self, arg0: typing.SupportsInt)

Kind: Method

##### disparityWidth

Kind: Property

Disparity search range, default 96 pixels.

##### disparityWidth.setter(self, arg0: RawStereoDepthConfig.CostMatching.DisparityWidth)

Kind: Method

##### enableCompanding

Kind: Property

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.

##### enableCompanding.setter(self, arg0: bool)

Kind: Method

##### invalidDisparityValue

Kind: Property

Used only for debug purposes, SW postprocessing handled only invalid value of 0
properly.

##### invalidDisparityValue.setter(self, arg0: typing.SupportsInt)

Kind: Method

##### linearEquationParameters

Kind: Property

Cost calculation linear equation parameters.

##### linearEquationParameters.setter(self, arg0: RawStereoDepthConfig.CostMatching.LinearEquationParameters)

Kind: Method

#### depthai.StereoDepthConfig.MedianFilter

Kind: Class

Median filter config

Members:

MEDIAN_OFF

KERNEL_3x3

KERNEL_5x5

KERNEL_7x7

##### KERNEL_3x3: typing.ClassVar[MedianFilter]

Kind: Class Variable

##### KERNEL_5x5: typing.ClassVar[MedianFilter]

Kind: Class Variable

##### KERNEL_7x7: typing.ClassVar[MedianFilter]

Kind: Class Variable

##### MEDIAN_OFF: typing.ClassVar[MedianFilter]

Kind: Class Variable

##### __members__: typing.ClassVar[dict[str, MedianFilter]]

Kind: Class Variable

##### __eq__(self, other: typing.Any) -> bool: bool

Kind: Method

##### __getstate__(self) -> int: int

Kind: Method

##### __hash__(self) -> int: int

Kind: Method

##### __index__(self) -> int: int

Kind: Method

##### __init__(self, value: typing.SupportsInt)

Kind: Method

##### __int__(self) -> int: int

Kind: Method

##### __ne__(self, other: typing.Any) -> bool: bool

Kind: Method

##### __repr__(self) -> str: str

Kind: Method

##### __setstate__(self, state: typing.SupportsInt)

Kind: Method

##### __str__(self) -> str: str

Kind: Method

##### name

Kind: Property

##### value

Kind: Property

#### depthai.StereoDepthConfig.PostProcessing

Kind: Class

Post-processing filters, all the filters are applied in disparity domain.

##### depthai.StereoDepthConfig.PostProcessing.BrightnessFilter

Kind: Class

Brightness filtering. If input frame pixel is too dark or too bright, disparity
will be invalidated. The idea is that for too dark/too bright pixels we have low
confidence, since that area was under/over exposed and details were lost.

###### __init__(self: RawStereoDepthConfig.PostProcessing.BrightnessFilter)

Kind: Method

###### maxBrightness

Kind: Property

Maximum range in depth units. If input pixel is less or equal than this value
the depth value is invalidated.

###### maxBrightness.setter(self, arg0: typing.SupportsInt)

Kind: Method

###### minBrightness

Kind: Property

Minimum pixel brightness. If input pixel is less or equal than this value the
depth value is invalidated.

###### minBrightness.setter(self, arg0: typing.SupportsInt)

Kind: Method

##### depthai.StereoDepthConfig.PostProcessing.DecimationFilter

Kind: Class

Decimation filter. Reduces the depth scene complexity. The filter runs on kernel
sizes [2x2] to [8x8] pixels.

###### depthai.StereoDepthConfig.PostProcessing.DecimationFilter.DecimationMode

Kind: Class

Decimation algorithm type.

Members:

PIXEL_SKIPPING :

NON_ZERO_MEDIAN :

NON_ZERO_MEAN :

###### NON_ZERO_MEAN: typing.ClassVar[RawStereoDepthConfig.PostProcessing.DecimationFilter.DecimationMode]

Kind: Class Variable

###### NON_ZERO_MEDIAN: typing.ClassVar[RawStereoDepthConfig.PostProcessing.DecimationFilter.DecimationMode]

Kind: Class Variable

###### PIXEL_SKIPPING: typing.ClassVar[RawStereoDepthConfig.PostProcessing.DecimationFilter.DecimationMode]

Kind: Class Variable

###### __members__: typing.ClassVar[dict[str, RawStereoDepthConfig.PostProcessing.DecimationFilter.DecimationMode]]

Kind: Class Variable

###### __eq__(self, other: typing.Any) -> bool: bool

Kind: Method

###### __getstate__(self) -> int: int

Kind: Method

###### __hash__(self) -> int: int

Kind: Method

###### __index__(self: RawStereoDepthConfig.PostProcessing.DecimationFilter.DecimationMode) -> int: int

Kind: Method

###### __init__(self: RawStereoDepthConfig.PostProcessing.DecimationFilter.DecimationMode, value: typing.SupportsInt)

Kind: Method

###### __int__(self: RawStereoDepthConfig.PostProcessing.DecimationFilter.DecimationMode) -> int: int

Kind: Method

###### __ne__(self, other: typing.Any) -> bool: bool

Kind: Method

###### __repr__(self) -> str: str

Kind: Method

###### __setstate__(self: RawStereoDepthConfig.PostProcessing.DecimationFilter.DecimationMode, state: typing.SupportsInt)

Kind: Method

###### __str__(self) -> str: str

Kind: Method

###### name

Kind: Property

###### value

Kind: Property

###### __init__(self: RawStereoDepthConfig.PostProcessing.DecimationFilter)

Kind: Method

###### decimationFactor

Kind: Property

Decimation factor. Valid values are 1,2,3,4. Disparity/depth map x/y resolution
will be decimated with this value.

###### decimationFactor.setter(self, arg0: typing.SupportsInt)

Kind: Method

###### decimationMode

Kind: Property

Decimation algorithm type.

###### decimationMode.setter(self, arg0: RawStereoDepthConfig.PostProcessing.DecimationFilter.DecimationMode)

Kind: Method

##### depthai.StereoDepthConfig.PostProcessing.Filter

Kind: Class

Members:

DECIMATION :

SPECKLE :

MEDIAN :

TEMPORAL :

SPATIAL :

FILTER_COUNT :

###### DECIMATION: typing.ClassVar[RawStereoDepthConfig.PostProcessing.Filter]

Kind: Class Variable

###### FILTER_COUNT: typing.ClassVar[RawStereoDepthConfig.PostProcessing.Filter]

Kind: Class Variable

###### MEDIAN: typing.ClassVar[RawStereoDepthConfig.PostProcessing.Filter]

Kind: Class Variable

###### SPATIAL: typing.ClassVar[RawStereoDepthConfig.PostProcessing.Filter]

Kind: Class Variable

###### SPECKLE: typing.ClassVar[RawStereoDepthConfig.PostProcessing.Filter]

Kind: Class Variable

###### TEMPORAL: typing.ClassVar[RawStereoDepthConfig.PostProcessing.Filter]

Kind: Class Variable

###### __members__: typing.ClassVar[dict[str, RawStereoDepthConfig.PostProcessing.Filter]]

Kind: Class Variable

###### __eq__(self, other: typing.Any) -> bool: bool

Kind: Method

###### __getstate__(self) -> int: int

Kind: Method

###### __hash__(self) -> int: int

Kind: Method

###### __index__(self: RawStereoDepthConfig.PostProcessing.Filter) -> int: int

Kind: Method

###### __init__(self: RawStereoDepthConfig.PostProcessing.Filter, value: typing.SupportsInt)

Kind: Method

###### __int__(self: RawStereoDepthConfig.PostProcessing.Filter) -> int: int

Kind: Method

###### __ne__(self, other: typing.Any) -> bool: bool

Kind: Method

###### __repr__(self) -> str: str

Kind: Method

###### __setstate__(self: RawStereoDepthConfig.PostProcessing.Filter, state: typing.SupportsInt)

Kind: Method

###### __str__(self) -> str: str

Kind: Method

###### name

Kind: Property

###### value

Kind: Property

##### depthai.StereoDepthConfig.PostProcessing.SpatialFilter

Kind: Class

1D edge-preserving spatial filter using high-order domain transform.

###### __init__(self: RawStereoDepthConfig.PostProcessing.SpatialFilter)

Kind: Method

###### alpha

Kind: Property

The Alpha factor in an exponential moving average with Alpha=1 - no filter.
Alpha = 0 - infinite filter. Determines the amount of smoothing.

###### alpha.setter(self, arg0: typing.SupportsFloat)

Kind: Method

###### delta

Kind: Property

Step-size boundary. Establishes the threshold used to preserve "edges". If the
disparity value between neighboring pixels exceed the disparity threshold set by
this delta parameter, then filtering will be temporarily disabled. Default value
0 means auto: 3 disparity integer levels. In case of subpixel mode it's 3*number
of subpixel levels.

###### delta.setter(self, arg0: typing.SupportsInt)

Kind: Method

###### enable

Kind: Property

Whether to enable or disable the filter.

###### enable.setter(self, arg0: bool)

Kind: Method

###### holeFillingRadius

Kind: Property

An in-place heuristic symmetric hole-filling mode applied horizontally during
the filter passes. Intended to rectify minor artefacts with minimal performance
impact. Search radius for hole filling.

###### holeFillingRadius.setter(self, arg0: typing.SupportsInt)

Kind: Method

###### numIterations

Kind: Property

Number of iterations over the image in both horizontal and vertical direction.

###### numIterations.setter(self, arg0: typing.SupportsInt)

Kind: Method

##### depthai.StereoDepthConfig.PostProcessing.SpeckleFilter

Kind: Class

Speckle filtering. Removes speckle noise.

###### __init__(self: RawStereoDepthConfig.PostProcessing.SpeckleFilter)

Kind: Method

###### differenceThreshold

Kind: Property

Maximum difference between neighbor disparity pixels to put them into the same
blob. Units in disparity integer levels.

###### differenceThreshold.setter(self, arg0: typing.SupportsInt)

Kind: Method

###### enable

Kind: Property

Whether to enable or disable the filter.

###### enable.setter(self, arg0: bool)

Kind: Method

###### speckleRange

Kind: Property

Speckle search range.

###### speckleRange.setter(self, arg0: typing.SupportsInt)

Kind: Method

##### depthai.StereoDepthConfig.PostProcessing.TemporalFilter

Kind: Class

Temporal filtering with optional persistence.

###### depthai.StereoDepthConfig.PostProcessing.TemporalFilter.PersistencyMode

Kind: Class

Persistency algorithm type.

Members:

PERSISTENCY_OFF :

VALID_8_OUT_OF_8 :

VALID_2_IN_LAST_3 :

VALID_2_IN_LAST_4 :

VALID_2_OUT_OF_8 :

VALID_1_IN_LAST_2 :

VALID_1_IN_LAST_5 :

VALID_1_IN_LAST_8 :

PERSISTENCY_INDEFINITELY :

###### PERSISTENCY_INDEFINITELY: typing.ClassVar[RawStereoDepthConfig.PostProcessing.TemporalFilter.PersistencyMode]

Kind: Class Variable

###### PERSISTENCY_OFF: typing.ClassVar[RawStereoDepthConfig.PostProcessing.TemporalFilter.PersistencyMode]

Kind: Class Variable

###### VALID_1_IN_LAST_2: typing.ClassVar[RawStereoDepthConfig.PostProcessing.TemporalFilter.PersistencyMode]

Kind: Class Variable

###### VALID_1_IN_LAST_5: typing.ClassVar[RawStereoDepthConfig.PostProcessing.TemporalFilter.PersistencyMode]

Kind: Class Variable

###### VALID_1_IN_LAST_8: typing.ClassVar[RawStereoDepthConfig.PostProcessing.TemporalFilter.PersistencyMode]

Kind: Class Variable

###### VALID_2_IN_LAST_3: typing.ClassVar[RawStereoDepthConfig.PostProcessing.TemporalFilter.PersistencyMode]

Kind: Class Variable

###### VALID_2_IN_LAST_4: typing.ClassVar[RawStereoDepthConfig.PostProcessing.TemporalFilter.PersistencyMode]

Kind: Class Variable

###### VALID_2_OUT_OF_8: typing.ClassVar[RawStereoDepthConfig.PostProcessing.TemporalFilter.PersistencyMode]

Kind: Class Variable

###### VALID_8_OUT_OF_8: typing.ClassVar[RawStereoDepthConfig.PostProcessing.TemporalFilter.PersistencyMode]

Kind: Class Variable

###### __members__: typing.ClassVar[dict[str, RawStereoDepthConfig.PostProcessing.TemporalFilter.PersistencyMode]]

Kind: Class Variable

###### __eq__(self, other: typing.Any) -> bool: bool

Kind: Method

###### __getstate__(self) -> int: int

Kind: Method

###### __hash__(self) -> int: int

Kind: Method

###### __index__(self: RawStereoDepthConfig.PostProcessing.TemporalFilter.PersistencyMode) -> int: int

Kind: Method

###### __init__(self: RawStereoDepthConfig.PostProcessing.TemporalFilter.PersistencyMode, value: typing.SupportsInt)

Kind: Method

###### __int__(self: RawStereoDepthConfig.PostProcessing.TemporalFilter.PersistencyMode) -> int: int

Kind: Method

###### __ne__(self, other: typing.Any) -> bool: bool

Kind: Method

###### __repr__(self) -> str: str

Kind: Method

###### __setstate__(self: RawStereoDepthConfig.PostProcessing.TemporalFilter.PersistencyMode, state: typing.SupportsInt)

Kind: Method

###### __str__(self) -> str: str

Kind: Method

###### name

Kind: Property

###### value

Kind: Property

###### __init__(self: RawStereoDepthConfig.PostProcessing.TemporalFilter)

Kind: Method

###### alpha

Kind: Property

The Alpha factor in an exponential moving average with Alpha=1 - no filter.
Alpha = 0 - infinite filter. Determines the extent of the temporal history that
should be averaged.

###### alpha.setter(self, arg0: typing.SupportsFloat)

Kind: Method

###### delta

Kind: Property

Step-size boundary. Establishes the threshold used to preserve surfaces (edges).
If the disparity value between neighboring pixels exceed the disparity threshold
set by this delta parameter, then filtering will be temporarily disabled.
Default value 0 means auto: 3 disparity integer levels. In case of subpixel mode
it's 3*number of subpixel levels.

###### delta.setter(self, arg0: typing.SupportsInt)

Kind: Method

###### enable

Kind: Property

Whether to enable or disable the filter.

###### enable.setter(self, arg0: bool)

Kind: Method

###### persistencyMode

Kind: Property

Persistency mode. If the current disparity/depth value is invalid, it will be
replaced by an older value, based on persistency mode.

###### persistencyMode.setter(self, arg0: RawStereoDepthConfig.PostProcessing.TemporalFilter.PersistencyMode)

Kind: Method

##### depthai.StereoDepthConfig.PostProcessing.ThresholdFilter

Kind: Class

Threshold filtering. Filters out distances outside of a given interval.

###### __init__(self: RawStereoDepthConfig.PostProcessing.ThresholdFilter)

Kind: Method

###### maxRange

Kind: Property

Maximum range in depth units. Depth values over this value are invalidated.

###### maxRange.setter(self, arg0: typing.SupportsInt)

Kind: Method

###### minRange

Kind: Property

Minimum range in depth units. Depth values under this value are invalidated.

###### minRange.setter(self, arg0: typing.SupportsInt)

Kind: Method

##### __init__(self: RawStereoDepthConfig.PostProcessing)

Kind: Method

##### bilateralSigmaValue

Kind: Property

Sigma value for bilateral filter. 0 means disabled. A larger value of the
parameter means that farther colors within the pixel neighborhood will be mixed
together.

##### bilateralSigmaValue.setter(self, arg0: typing.SupportsInt)

Kind: Method

##### brightnessFilter

Kind: Property

Brightness filtering. If input frame pixel is too dark or too bright, disparity
will be invalidated. The idea is that for too dark/too bright pixels we have low
confidence, since that area was under/over exposed and details were lost.

##### brightnessFilter.setter(self, arg0: RawStereoDepthConfig.PostProcessing.BrightnessFilter)

Kind: Method

##### decimationFilter

Kind: Property

Decimation filter. Reduces disparity/depth map x/y complexity, reducing runtime
complexity for other filters.

##### decimationFilter.setter(self, arg0: RawStereoDepthConfig.PostProcessing.DecimationFilter)

Kind: Method

##### filteringOrder

Kind: Property

Order of filters to be applied if filtering is enabled.

##### filteringOrder.setter(self, arg0: typing.Annotated [ collections.abc.Sequence [ RawStereoDepthConfig.PostProcessing.Filter ]
, FixedSize ( 5 ) ])

Kind: Method

##### median

Kind: Property

Set kernel size for disparity/depth median filtering, or disable

##### median.setter(self, arg0: MedianFilter)

Kind: Method

##### spatialFilter

Kind: Property

Edge-preserving filtering: This type of filter will smooth the depth noise while
attempting to preserve edges.

##### spatialFilter.setter(self, arg0: RawStereoDepthConfig.PostProcessing.SpatialFilter)

Kind: Method

##### speckleFilter

Kind: Property

Speckle filtering. Removes speckle noise.

##### speckleFilter.setter(self, arg0: RawStereoDepthConfig.PostProcessing.SpeckleFilter)

Kind: Method

##### temporalFilter

Kind: Property

Temporal filtering with optional persistence.

##### temporalFilter.setter(self, arg0: RawStereoDepthConfig.PostProcessing.TemporalFilter)

Kind: Method

##### thresholdFilter

Kind: Property

Threshold filtering. Filters out distances outside of a given interval.

##### thresholdFilter.setter(self, arg0: RawStereoDepthConfig.PostProcessing.ThresholdFilter)

Kind: Method

#### __init__(self)

Kind: Method

#### get(self) -> RawStereoDepthConfig: RawStereoDepthConfig

Kind: Method

Retrieve configuration data for StereoDepth.

Returns:
config for stereo depth algorithm

#### getBilateralFilterSigma(self) -> int: int

Kind: Method

Get sigma value for 5x5 bilateral filter

#### getConfidenceThreshold(self) -> int: int

Kind: Method

Get confidence threshold for disparity calculation

#### getDepthUnit(self) -> RawStereoDepthConfig.AlgorithmControl.DepthUnit: RawStereoDepthConfig.AlgorithmControl.DepthUnit

Kind: Method

Get depth unit of depth map.

#### getLeftRightCheckThreshold(self) -> int: int

Kind: Method

Get threshold for left-right check combine

#### getMaxDisparity(self) -> float: float

Kind: Method

Useful for normalization of the disparity map.

Returns:
Maximum disparity value that the node can return

#### getMedianFilter(self) -> MedianFilter: MedianFilter

Kind: Method

Get median filter setting

#### set(self, config: RawStereoDepthConfig) -> StereoDepthConfig: StereoDepthConfig

Kind: Method

Set explicit configuration.

Parameter ``config``:
Explicit configuration

#### setBilateralFilterSigma(self, sigma: typing.SupportsInt) -> StereoDepthConfig: StereoDepthConfig

Kind: Method

A larger value of the parameter means that farther colors within the pixel
neighborhood will be mixed together, resulting in larger areas of semi-equal
color.

Parameter ``sigma``:
Set sigma value for 5x5 bilateral filter. 0..65535

#### setConfidenceThreshold(self, confThr: typing.SupportsInt) -> StereoDepthConfig: StereoDepthConfig

Kind: Method

Confidence threshold for disparity calculation

Parameter ``confThr``:
Confidence threshold value 0..255

#### setDepthAlign(self, align: RawStereoDepthConfig.AlgorithmControl.DepthAlign) -> StereoDepthConfig: StereoDepthConfig

Kind: Method

Parameter ``align``:
Set the disparity/depth alignment: centered (between the 'left' and 'right'
inputs), or from the perspective of a rectified output stream

#### setDepthUnit(self, arg0: RawStereoDepthConfig.AlgorithmControl.DepthUnit) -> StereoDepthConfig: StereoDepthConfig

Kind: Method

Set depth unit of depth map.

Meter, centimeter, millimeter, inch, foot or custom unit is available.

#### setDisparityShift(self, arg0: typing.SupportsInt) -> StereoDepthConfig: StereoDepthConfig

Kind: Method

Shift input frame by a number of pixels to increase minimum depth. For example
shifting by 48 will change effective disparity search range from (0,95] to
[48,143]. An alternative approach to reducing the minZ. We normally only
recommend doing this when it is known that there will be no objects farther away
than MaxZ, such as having a depth camera mounted above a table pointing down at
the table surface.

#### setExtendedDisparity(self, enable: bool) -> StereoDepthConfig: StereoDepthConfig

Kind: Method

Disparity range increased from 95 to 190, combined from full resolution and
downscaled images. Suitable for short range objects

#### setLeftRightCheck(self, enable: bool) -> StereoDepthConfig: StereoDepthConfig

Kind: Method

Computes and combines disparities in both L-R and R-L directions, and combine
them.

For better occlusion handling, discarding invalid disparity values

#### setLeftRightCheckThreshold(self, sigma: typing.SupportsInt) -> StereoDepthConfig: StereoDepthConfig

Kind: Method

Parameter ``threshold``:
Set threshold for left-right, right-left disparity map combine, 0..255

#### setMedianFilter(self, median: MedianFilter) -> StereoDepthConfig: StereoDepthConfig

Kind: Method

Parameter ``median``:
Set kernel size for disparity/depth median filtering, or disable

#### setNumInvalidateEdgePixels(self, arg0: typing.SupportsInt) -> StereoDepthConfig: StereoDepthConfig

Kind: Method

Invalidate X amount of pixels at the edge of disparity frame. For right and
center alignment X pixels will be invalidated from the right edge, for left
alignment from the left edge.

#### setSubpixel(self, enable: bool) -> StereoDepthConfig: StereoDepthConfig

Kind: Method

Computes disparity with sub-pixel interpolation (3 fractional bits by default).

Suitable for long range. Currently incompatible with extended disparity

#### setSubpixelFractionalBits(self, subpixelFractionalBits: typing.SupportsInt) -> StereoDepthConfig: StereoDepthConfig

Kind: Method

Number of fractional bits for subpixel mode. Default value: 3. Valid values:
3,4,5. Defines the number of fractional disparities: 2^x. Median filter
postprocessing is supported only for 3 fractional bits.

### Need assistance?

Head over to [Discussion Forum](https://discuss.luxonis.com/) for technical support or any other questions you might have.
