diff --git a/depthai-core b/depthai-core index acafbabf0..b0b4d4918 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit acafbabf0142de616050e3ecd93e483f942e3ca0 +Subproject commit b0b4d4918d1ff68521b1499bc5fa69f84b3c16b6 diff --git a/src/pipeline/datatype/StereoDepthConfigBindings.cpp b/src/pipeline/datatype/StereoDepthConfigBindings.cpp index 3e202908a..2c07e0bf5 100644 --- a/src/pipeline/datatype/StereoDepthConfigBindings.cpp +++ b/src/pipeline/datatype/StereoDepthConfigBindings.cpp @@ -22,6 +22,7 @@ void bind_stereodepthconfig(pybind11::module& m, void* pCallstack){ py::enum_ depthAlign(algorithmControl, "DepthAlign", DOC(dai, RawStereoDepthConfig, AlgorithmControl, DepthAlign)); py::enum_ depthUnit(algorithmControl, "DepthUnit", DOC(dai, RawStereoDepthConfig, AlgorithmControl, DepthUnit)); py::class_ postProcessing(rawStereoDepthConfig, "PostProcessing", DOC(dai, RawStereoDepthConfig, PostProcessing)); + py::enum_ filter(postProcessing, "Filter", DOC(dai, RawStereoDepthConfig, PostProcessing, Filter)); py::class_ spatialFilter(postProcessing, "SpatialFilter", DOC(dai, RawStereoDepthConfig, PostProcessing, SpatialFilter)); py::class_ temporalFilter(postProcessing, "TemporalFilter", DOC(dai, RawStereoDepthConfig, PostProcessing, TemporalFilter)); py::enum_ persistencyMode(temporalFilter, "PersistencyMode", DOC(dai, RawStereoDepthConfig, PostProcessing, TemporalFilter, PersistencyMode)); @@ -51,7 +52,15 @@ void bind_stereodepthconfig(pybind11::module& m, void* pCallstack){ /////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// - // Metadata / raw + filter + .value("DECIMATION", RawStereoDepthConfig::PostProcessing::Filter::DECIMATION, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, DECIMATION)) + .value("SPECKLE", RawStereoDepthConfig::PostProcessing::Filter::SPECKLE, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, SPECKLE)) + .value("MEDIAN", RawStereoDepthConfig::PostProcessing::Filter::MEDIAN, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, MEDIAN)) + .value("TEMPORAL", RawStereoDepthConfig::PostProcessing::Filter::TEMPORAL, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, TEMPORAL)) + .value("SPATIAL", RawStereoDepthConfig::PostProcessing::Filter::SPATIAL, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, SPATIAL)) + .value("FILTER_COUNT", RawStereoDepthConfig::PostProcessing::Filter::FILTER_COUNT, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, FILTER_COUNT)) + ; + medianFilter .value("MEDIAN_OFF", MedianFilter::MEDIAN_OFF) .value("KERNEL_3x3", MedianFilter::KERNEL_3x3) @@ -137,6 +146,7 @@ void bind_stereodepthconfig(pybind11::module& m, void* pCallstack){ .def(py::init<>()) .def_readwrite("enable", &RawStereoDepthConfig::PostProcessing::SpeckleFilter::enable, DOC(dai, RawStereoDepthConfig, PostProcessing, SpeckleFilter, enable)) .def_readwrite("speckleRange", &RawStereoDepthConfig::PostProcessing::SpeckleFilter::speckleRange, DOC(dai, RawStereoDepthConfig, PostProcessing, SpeckleFilter, speckleRange)) + .def_readwrite("differenceThreshold", &RawStereoDepthConfig::PostProcessing::SpeckleFilter::differenceThreshold, DOC(dai, RawStereoDepthConfig, PostProcessing, SpeckleFilter, differenceThreshold)) ; decimationMode @@ -153,6 +163,7 @@ void bind_stereodepthconfig(pybind11::module& m, void* pCallstack){ postProcessing .def(py::init<>()) + .def_readwrite("filteringOrder", &RawStereoDepthConfig::PostProcessing::filteringOrder, DOC(dai, RawStereoDepthConfig, PostProcessing, filteringOrder)) .def_readwrite("median", &RawStereoDepthConfig::PostProcessing::median, DOC(dai, RawStereoDepthConfig, PostProcessing, median)) .def_readwrite("bilateralSigmaValue", &RawStereoDepthConfig::PostProcessing::bilateralSigmaValue, DOC(dai, RawStereoDepthConfig, PostProcessing, bilateralSigmaValue)) .def_readwrite("spatialFilter", &RawStereoDepthConfig::PostProcessing::spatialFilter, DOC(dai, RawStereoDepthConfig, PostProcessing, spatialFilter)) diff --git a/src/pipeline/node/StereoDepthBindings.cpp b/src/pipeline/node/StereoDepthBindings.cpp index 674a591a7..138c214cf 100644 --- a/src/pipeline/node/StereoDepthBindings.cpp +++ b/src/pipeline/node/StereoDepthBindings.cpp @@ -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