Skip to content

Commit

Permalink
Stereo: Core: add new stereo presets
Browse files Browse the repository at this point in the history
  • Loading branch information
SzabolcsGergely committed Nov 7, 2024
1 parent 53887f7 commit fe29bde
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
23 changes: 21 additions & 2 deletions src/pipeline/node/StereoDepthBindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,27 @@ void bind_stereodepth(pybind11::module& m, void* pCallstack){
;

stereoDepthPresetMode
.value("HIGH_ACCURACY", StereoDepth::PresetMode::HIGH_ACCURACY, DOC(dai, node, StereoDepth, PresetMode, HIGH_ACCURACY))
.value("HIGH_DENSITY", StereoDepth::PresetMode::HIGH_DENSITY, DOC(dai, node, StereoDepth, PresetMode, HIGH_DENSITY))
.value("HIGH_ACCURACY", StereoDepth::PresetMode::HIGH_ACCURACY, "**Deprecated:** Will be removed in future releases and replaced with DEFAULT")
.value("HIGH_DENSITY", StereoDepth::PresetMode::HIGH_DENSITY, "**Deprecated:** Will be removed in future releases and replaced with DEFAULT")

.value("DEFAULT", StereoDepth::PresetMode::DEFAULT)
.value("FACE", StereoDepth::PresetMode::FACE)
.value("HIGH_DETAIL", StereoDepth::PresetMode::HIGH_DETAIL)
.value("HIGH_FPS", StereoDepth::PresetMode::HIGH_FPS)
.value("HIGH_ACCURACY2", StereoDepth::PresetMode::HIGH_ACCURACY2)
.value("ROBOTICS", StereoDepth::PresetMode::ROBOTICS)

// Deprecated overriden
.def_property_readonly_static("HIGH_ACCURACY", [](py::object){
PyErr_WarnEx(PyExc_DeprecationWarning, "HIGH_ACCURACY is deprecated, will be removed in future releases and replaced with DEFAULT.", 1);
return StereoDepth::PresetMode::HIGH_ACCURACY;
})

.def_property_readonly_static("HIGH_DENSITY", [](py::object){
PyErr_WarnEx(PyExc_DeprecationWarning, "HIGH_DENSITY is deprecated, will be removed in future releases and replaced with DEFAULT.", 1);
return StereoDepth::PresetMode::HIGH_DENSITY;
})

;

// Node
Expand Down

0 comments on commit fe29bde

Please sign in to comment.