diff --git a/depthai-core b/depthai-core index e98694f02..3e08b71c0 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit e98694f02c5a9a5fcb2a0c69cad134064df4d803 +Subproject commit 3e08b71c0498428888e4324d7412e39fdafcf1fc diff --git a/src/DeviceBindings.cpp b/src/DeviceBindings.cpp index f994e9022..b92831cf3 100644 --- a/src/DeviceBindings.cpp +++ b/src/DeviceBindings.cpp @@ -614,6 +614,8 @@ void DeviceBindings::bind(pybind11::module& m, void* pCallstack){ .def("getConnectionInterfaces", [](DeviceBase& d) { py::gil_scoped_release release; return d.getConnectionInterfaces(); }, DOC(dai, DeviceBase, getConnectionInterfaces)) .def("getConnectedCameraFeatures", [](DeviceBase& d) { py::gil_scoped_release release; return d.getConnectedCameraFeatures(); }, DOC(dai, DeviceBase, getConnectedCameraFeatures)) .def("getCameraSensorNames", [](DeviceBase& d) { py::gil_scoped_release release; return d.getCameraSensorNames(); }, DOC(dai, DeviceBase, getCameraSensorNames)) + .def("getStereoPairs", [](DeviceBase& d) { py::gil_scoped_release release; return d.getStereoPairs(); }, DOC(dai, DeviceBase, getStereoPairs)) + .def("getAvailableStereoPairs", [](DeviceBase& d) { py::gil_scoped_release release; return d.getAvailableStereoPairs(); }, DOC(dai, DeviceBase, getAvailableStereoPairs)) .def("getConnectedIMU", [](DeviceBase& d) { py::gil_scoped_release release; return d.getConnectedIMU(); }, DOC(dai, DeviceBase, getConnectedIMU)) .def("getIMUFirmwareVersion", [](DeviceBase& d) { py::gil_scoped_release release; return d.getIMUFirmwareVersion(); }, DOC(dai, DeviceBase, getIMUFirmwareVersion)) .def("getEmbeddedIMUFirmwareVersion", [](DeviceBase& d) { py::gil_scoped_release release; return d.getEmbeddedIMUFirmwareVersion(); }, DOC(dai, DeviceBase, getEmbeddedIMUFirmwareVersion)) diff --git a/src/pipeline/CommonBindings.cpp b/src/pipeline/CommonBindings.cpp index 5e03660d6..df5469a8a 100644 --- a/src/pipeline/CommonBindings.cpp +++ b/src/pipeline/CommonBindings.cpp @@ -23,6 +23,7 @@ #include "depthai-shared/common/DetectionParserOptions.hpp" #include "depthai-shared/common/RotatedRect.hpp" #include "depthai-shared/common/Rect.hpp" +#include "depthai-shared/common/StereoPair.hpp" #include "depthai-shared/common/Colormap.hpp" #include "depthai-shared/common/FrameEvent.hpp" #include "depthai-shared/common/Interpolation.hpp" @@ -30,6 +31,7 @@ // depthai #include "depthai/common/CameraFeatures.hpp" #include "depthai/common/CameraExposureOffset.hpp" +#include "depthai/common/StereoPair.hpp" #include "depthai/utility/ProfilingData.hpp" void CommonBindings::bind(pybind11::module& m, void* pCallstack){ @@ -61,6 +63,7 @@ void CommonBindings::bind(pybind11::module& m, void* pCallstack){ py::class_ detectionParserOptions(m, "DetectionParserOptions", DOC(dai, DetectionParserOptions)); py::class_ rotatedRect(m, "RotatedRect", DOC(dai, RotatedRect)); py::class_ rect(m, "Rect", DOC(dai, Rect)); + py::class_ stereoPair(m, "StereoPair", DOC(dai, StereoPair)); py::enum_ cameraExposureOffset(m, "CameraExposureOffset"); py::enum_ colormap(m, "Colormap", DOC(dai, Colormap)); py::enum_ frameEvent(m, "FrameEvent", DOC(dai, FrameEvent)); @@ -108,6 +111,19 @@ void CommonBindings::bind(pybind11::module& m, void* pCallstack){ .def_readwrite("height", &Rect::height) ; + stereoPair + .def(py::init<>()) + .def_readwrite("left", &StereoPair::left) + .def_readwrite("right", &StereoPair::right) + .def_readwrite("baseline", &StereoPair::baseline) + .def_readwrite("isVertical", &StereoPair::isVertical) + .def("__repr__", [](StereoPair& stereoPair) { + std::stringstream stream; + stream << stereoPair; + return stream.str(); + }) + ; + timestamp .def(py::init<>()) .def_readwrite("sec", &Timestamp::sec)