|
| 1 | +#include "DatatypeBindings.hpp" |
| 2 | +#include "pipeline/CommonBindings.hpp" |
| 3 | +#include <unordered_map> |
| 4 | +#include <memory> |
| 5 | + |
| 6 | +// depthai |
| 7 | +#include "depthai/pipeline/datatype/ObjectTrackerConfig.hpp" |
| 8 | + |
| 9 | +//pybind |
| 10 | +#include <pybind11/chrono.h> |
| 11 | +#include <pybind11/numpy.h> |
| 12 | + |
| 13 | +// #include "spdlog/spdlog.h" |
| 14 | + |
| 15 | +void bind_objecttrackerconfig(pybind11::module& m, void* pCallstack){ |
| 16 | + |
| 17 | + using namespace dai; |
| 18 | + |
| 19 | + py::class_<RawObjectTrackerConfig, RawBuffer, std::shared_ptr<RawObjectTrackerConfig>> rawConfig(m, "RawObjectTrackerConfig", DOC(dai, RawObjectTrackerConfig)); |
| 20 | + py::class_<ObjectTrackerConfig, Buffer, std::shared_ptr<ObjectTrackerConfig>> config(m, "ObjectTrackerConfig", DOC(dai, ObjectTrackerConfig)); |
| 21 | + |
| 22 | + /////////////////////////////////////////////////////////////////////// |
| 23 | + /////////////////////////////////////////////////////////////////////// |
| 24 | + /////////////////////////////////////////////////////////////////////// |
| 25 | + // Call the rest of the type defines, then perform the actual bindings |
| 26 | + Callstack* callstack = (Callstack*) pCallstack; |
| 27 | + auto cb = callstack->top(); |
| 28 | + callstack->pop(); |
| 29 | + cb(m, pCallstack); |
| 30 | + // Actual bindings |
| 31 | + /////////////////////////////////////////////////////////////////////// |
| 32 | + /////////////////////////////////////////////////////////////////////// |
| 33 | + /////////////////////////////////////////////////////////////////////// |
| 34 | + |
| 35 | + // Metadata / raw |
| 36 | + rawConfig |
| 37 | + .def(py::init<>()) |
| 38 | + .def_readwrite("trackletIdsToRemove", &RawObjectTrackerConfig::trackletIdsToRemove, DOC(dai, RawObjectTrackerConfig, trackletIdsToRemove)) |
| 39 | + ; |
| 40 | + |
| 41 | + // Message |
| 42 | + config |
| 43 | + .def(py::init<>()) |
| 44 | + .def(py::init<std::shared_ptr<RawObjectTrackerConfig>>()) |
| 45 | + |
| 46 | + .def("set", &ObjectTrackerConfig::set, py::arg("config"), DOC(dai, ObjectTrackerConfig, set)) |
| 47 | + .def("get", &ObjectTrackerConfig::get, DOC(dai, ObjectTrackerConfig, get)) |
| 48 | + .def("forceRemoveID", &ObjectTrackerConfig::forceRemoveID, DOC(dai, ObjectTrackerConfig, forceRemoveID)) |
| 49 | + .def("forceRemoveIDs", &ObjectTrackerConfig::forceRemoveIDs, DOC(dai, ObjectTrackerConfig, forceRemoveIDs)) |
| 50 | + ; |
| 51 | + |
| 52 | + // add aliases |
| 53 | + |
| 54 | +} |
0 commit comments