Public Types | Public Member Functions | Public Attributes | List of all members
dai::RawStereoDepthConfig::AlgorithmControl Struct Reference

#include <RawStereoDepthConfig.hpp>

Public Types

enum  DepthAlign : int32_t { DepthAlign::RECTIFIED_RIGHT, DepthAlign::RECTIFIED_LEFT, DepthAlign::CENTER }
 
enum  DepthUnit : int32_t {
  DepthUnit::METER, DepthUnit::CENTIMETER, DepthUnit::MILLIMETER, DepthUnit::INCH,
  DepthUnit::FOOT, DepthUnit::CUSTOM
}
 

Public Member Functions

 DEPTHAI_SERIALIZE (AlgorithmControl, depthAlign, depthUnit, customDepthUnitMultiplier, enableLeftRightCheck, enableExtended, enableSubpixel, leftRightCheckThreshold, subpixelFractionalBits, disparityShift, centerAlignmentShiftFactor, numInvalidateEdgePixels)
 

Public Attributes

tl::optional< float > centerAlignmentShiftFactor
 
float customDepthUnitMultiplier = 1000.f
 
DepthAlign depthAlign = DepthAlign::RECTIFIED_RIGHT
 
DepthUnit depthUnit = DepthUnit::MILLIMETER
 
std::int32_t disparityShift = 0
 
bool enableExtended = false
 
bool enableLeftRightCheck = true
 
bool enableSubpixel = false
 
std::int32_t leftRightCheckThreshold = 10
 
std::int32_t numInvalidateEdgePixels = 0
 
std::int32_t subpixelFractionalBits = 3
 

Detailed Description

Definition at line 17 of file RawStereoDepthConfig.hpp.

Member Enumeration Documentation

◆ DepthAlign

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

Enumerator
RECTIFIED_RIGHT 
RECTIFIED_LEFT 
CENTER 

Definition at line 21 of file RawStereoDepthConfig.hpp.

◆ DepthUnit

Measurement unit for depth data

Enumerator
METER 
CENTIMETER 
MILLIMETER 
INCH 
FOOT 
CUSTOM 

Definition at line 26 of file RawStereoDepthConfig.hpp.

Member Function Documentation

◆ DEPTHAI_SERIALIZE()

Member Data Documentation

◆ centerAlignmentShiftFactor

tl::optional<float> dai::RawStereoDepthConfig::AlgorithmControl::centerAlignmentShiftFactor

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

Definition at line 103 of file RawStereoDepthConfig.hpp.

◆ customDepthUnitMultiplier

float dai::RawStereoDepthConfig::AlgorithmControl::customDepthUnitMultiplier = 1000.f

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

Definition at line 43 of file RawStereoDepthConfig.hpp.

◆ depthAlign

DepthAlign dai::RawStereoDepthConfig::AlgorithmControl::depthAlign = DepthAlign::RECTIFIED_RIGHT

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

Definition at line 31 of file RawStereoDepthConfig.hpp.

◆ depthUnit

DepthUnit dai::RawStereoDepthConfig::AlgorithmControl::depthUnit = DepthUnit::MILLIMETER

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

Definition at line 37 of file RawStereoDepthConfig.hpp.

◆ disparityShift

std::int32_t dai::RawStereoDepthConfig::AlgorithmControl::disparityShift = 0

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.

Definition at line 88 of file RawStereoDepthConfig.hpp.

◆ enableExtended

bool dai::RawStereoDepthConfig::AlgorithmControl::enableExtended = false

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

Definition at line 55 of file RawStereoDepthConfig.hpp.

◆ enableLeftRightCheck

bool dai::RawStereoDepthConfig::AlgorithmControl::enableLeftRightCheck = true

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

Definition at line 49 of file RawStereoDepthConfig.hpp.

◆ enableSubpixel

bool dai::RawStereoDepthConfig::AlgorithmControl::enableSubpixel = false

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

Definition at line 60 of file RawStereoDepthConfig.hpp.

◆ leftRightCheckThreshold

std::int32_t dai::RawStereoDepthConfig::AlgorithmControl::leftRightCheckThreshold = 10

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

Definition at line 67 of file RawStereoDepthConfig.hpp.

◆ numInvalidateEdgePixels

std::int32_t dai::RawStereoDepthConfig::AlgorithmControl::numInvalidateEdgePixels = 0

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.

Definition at line 110 of file RawStereoDepthConfig.hpp.

◆ subpixelFractionalBits

std::int32_t dai::RawStereoDepthConfig::AlgorithmControl::subpixelFractionalBits = 3

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

Definition at line 78 of file RawStereoDepthConfig.hpp.


The documentation for this struct was generated from the following file:


depthai
Author(s): Martin Peterlin
autogenerated on Sat Mar 22 2025 02:58:20