|
| 1 | +#include "Common.hpp" |
| 2 | +#include "NodeBindings.hpp" |
| 3 | +#include "depthai/pipeline/Node.hpp" |
| 4 | +#include "depthai/pipeline/Pipeline.hpp" |
| 5 | +#include "depthai/pipeline/node/GPUStereo.hpp" |
| 6 | + |
| 7 | +void bind_gpustereo(pybind11::module& m, void* pCallstack) { |
| 8 | + using namespace dai; |
| 9 | + using namespace dai::node; |
| 10 | + |
| 11 | + py::class_<GPUStereoProperties> properties(m, "GPUStereoProperties", DOC(dai, GPUStereoProperties)); |
| 12 | + auto node = ADD_NODE(GPUStereo); |
| 13 | + |
| 14 | + Callstack* callstack = (Callstack*)pCallstack; |
| 15 | + auto cb = callstack->top(); |
| 16 | + callstack->pop(); |
| 17 | + cb(m, pCallstack); |
| 18 | + |
| 19 | + properties.def_readwrite("initialConfig", &GPUStereoProperties::initialConfig, DOC(dai, GPUStereoProperties, initialConfig)); |
| 20 | + |
| 21 | + node.def_property_readonly( |
| 22 | + "left", [](const GPUStereo& n) { return &n.sync->inputs["left"]; }, py::return_value_policy::reference_internal, DOC(dai, node, GPUStereo, left)) |
| 23 | + .def_property_readonly( |
| 24 | + "right", [](const GPUStereo& n) { return &n.sync->inputs["right"]; }, py::return_value_policy::reference_internal, DOC(dai, node, GPUStereo, right)) |
| 25 | + .def_readonly("initialConfig", &GPUStereo::initialConfig, DOC(dai, node, GPUStereo, initialConfig)) |
| 26 | + .def("setRectification", &GPUStereo::setRectification, py::arg("enable"), DOC(dai, node, GPUStereo, setRectification)) |
| 27 | + .def_readonly("disparity", &GPUStereo::disparity, DOC(dai, node, GPUStereo, disparity)) |
| 28 | + .def_readonly("depth", &GPUStereo::depth, DOC(dai, node, GPUStereo, depth)) |
| 29 | + .def_readonly("confidenceMap", &GPUStereo::confidenceMap, DOC(dai, node, GPUStereo, confidenceMap)) |
| 30 | + .def("build", &GPUStereo::build, py::arg("leftInput"), py::arg("rightInput"), DOC(dai, node, GPUStereo, build)); |
| 31 | + |
| 32 | + daiNodeModule.attr("GPUStereo").attr("Properties") = properties; |
| 33 | +} |
0 commit comments