Struct StereoDepthConfig::PostProcessing

Nested Relationships

This struct is a nested type of Class StereoDepthConfig.

Nested Types

Struct Documentation

struct PostProcessing

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

Public Types

enum class Filter : int32_t

Values:

enumerator NONE
enumerator DECIMATION
enumerator SPECKLE
enumerator MEDIAN
enumerator SPATIAL
enumerator TEMPORAL
enumerator FILTER_COUNT
using SpatialFilter = filters::params::SpatialFilter
using TemporalFilter = filters::params::TemporalFilter
using SpeckleFilter = filters::params::SpeckleFilter

Public Members

std::array<Filter, 5> filteringOrder = {Filter::MEDIAN, Filter::DECIMATION, Filter::SPECKLE, Filter::SPATIAL, Filter::TEMPORAL}

Order of filters to be applied if filtering is enabled.

MedianFilter median = MedianFilter::MEDIAN_OFF

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

std::int16_t bilateralSigmaValue = 0

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.

SpatialFilter spatialFilter

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

TemporalFilter temporalFilter

Temporal filtering with optional persistence.

ThresholdFilter thresholdFilter

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

BrightnessFilter brightnessFilter

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.

SpeckleFilter speckleFilter

Speckle filtering. Removes speckle noise.

DecimationFilter decimationFilter

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

HoleFilling holeFilling
AdaptiveMedianFilter adaptiveMedianFilter
struct AdaptiveMedianFilter

Public Functions

DEPTHAI_SERIALIZE(AdaptiveMedianFilter, enable, confidenceThreshold)

Public Members

bool enable = true

Flag to enable adaptive median filtering for a final pass of filtering on low confidence pixels.

uint8_t confidenceThreshold = 200

Confidence threshold for adaptive median filtering. Should be less than nFillConfThresh value used in evaDfsHoleFillConfig. Valid range is [0,255].

struct BrightnessFilter

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.

Public Functions

DEPTHAI_SERIALIZE(BrightnessFilter, minBrightness, maxBrightness)

Public Members

std::int32_t minBrightness = 0

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

std::int32_t maxBrightness = 256

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

struct DecimationFilter

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

Public Types

enum class DecimationMode : int32_t

Decimation algorithm type.

Values:

enumerator PIXEL_SKIPPING
enumerator NON_ZERO_MEDIAN
enumerator NON_ZERO_MEAN

Public Functions

DEPTHAI_SERIALIZE(DecimationFilter, decimationFactor, decimationMode)

Public Members

std::uint32_t decimationFactor = 1

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

DecimationMode decimationMode = DecimationMode::PIXEL_SKIPPING

Decimation algorithm type.

struct HoleFilling

Public Members

bool enable = true

Flag to enable post-processing hole-filling.

uint8_t highConfidenceThreshold = 210

Pixels with confidence higher than this value are used to calculate an average disparity per superpixel. Valid range is [1,255]

uint8_t fillConfidenceThreshold = 200

Pixels with confidence below this value will be filled with the average disparity of their corresponding superpixel. Valid range is [1,255].

uint8_t minValidDisparity = 1

Represents the required percentange of pixels with confidence value above nHighConfThresh that are used to calculate average disparity per superpixel, where 1 means 50% or half, 2 means 25% or a quarter and 3 means 12.5% or an eighth. If the required number of pixels are not found, the holes will not be filled.

bool invalidateDisparities = true

If enabled, sets to 0 the disparity of pixels with confidence below nFillConfThresh, which did not pass nMinValidPixels criteria. Valid range is {true, false}.

struct ThresholdFilter

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

Public Functions

DEPTHAI_SERIALIZE(ThresholdFilter, minRange, maxRange)

Public Members

std::int32_t minRange = 0

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

std::int32_t maxRange = 65535

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