@@ -77,43 +77,19 @@ EMSCRIPTEN_BINDINGS(depthai_js) {
7777 .value (" TrackedFeatures" , dai::DatatypeEnum::TrackedFeatures)
7878 .value (" BenchmarkReport" , dai::DatatypeEnum::BenchmarkReport)
7979 .value (" MessageGroup" , dai::DatatypeEnum::MessageGroup)
80+ .value (" ImageFiltersConfig" , dai::DatatypeEnum::ImageFiltersConfig);
8081
81- // structs
82- value_object<MessageHeader>(" MessageHeader" )
82+ // structs
83+ value_object<MessageHeader>(" MessageHeader" )
8384 .field (" objectType" , &MessageHeader::objectType)
8485 .field (" serializedObjectSize" , &MessageHeader::serializedObjectSize);
8586 value_object<dai::ImgDetection>(" ImgDetection" )
86- .ctor ()
87- .ctor (const dai::RotatedRect&, float , std::uint32_t )
88- .ctor (const dai::RotatedRect&, std::string, float , std::uint32_t )
89- .ctor (const dai::RotatedRect&, const dai::KeypointsList&, float , std::uint32_t )
90- .ctor (const dai::RotatedRect&, const dai::KeypointsList&, std::string, float , std::uint32_t )
9187 .field (" label" , &dai::ImgDetection::label)
9288 .field (" confidence" , &dai::ImgDetection::confidence)
9389 .field (" xmin" , &dai::ImgDetection::xmin)
9490 .field (" xmax" , &dai::ImgDetection::xmax)
9591 .field (" ymin" , &dai::ImgDetection::ymin)
96- .field (" ymax" , &dai::ImgDetection::ymax)
97- .field (" labelName" , &dai::ImgDetection::labelName)
98- .def (" setBoundingBox" , &dai::ImgDetection::setBoundingBox, py::arg (" boundingBox" ))
99- .def (" getBoundingBox" , &dai::ImgDetection::getBoundingBox)
100- .def (" setOuterBoundingBox" , &dai::ImgDetection::setOuterBoundingBox, py::arg (" xmin" ), py::arg (" ymin" ), py::arg (" xmax" ), py::arg (" ymax" ))
101- .def (" setKeypoints" , py::overload_cast<const dai::KeypointsList>(&dai::ImgDetection::setKeypoints), py::arg (" keypoints" ))
102- .def (" setKeypoints" , py::overload_cast<const std::vector<dai::Keypoint>&>(&dai::ImgDetection::setKeypoints), py::arg (" keypoints" ))
103- .def (" setKeypoints" ,
104- py::overload_cast<const std::vector<dai::Keypoint>, const std::vector<dai::Edge>>(&dai::ImgDetection::setKeypoints),
105- py::arg (" keypoints" ),
106- py::arg (" edges" ))
107- .def (" setKeypoints" , py::overload_cast<const std::vector<dai::Point3f>>(&dai::ImgDetection::setKeypoints), py::arg (" keypoints" ))
108- .def (" setKeypoints" , py::overload_cast<const std::vector<dai::Point2f>>(&dai::ImgDetection::setKeypoints), py::arg (" keypoints" ))
109- .def (" getKeypoints" , &dai::ImgDetection::getKeypoints)
110- .def (" setEdges" , &dai::ImgDetection::setEdges, py::arg (" edges" ))
111- .def (" getEdges" , &dai::ImgDetection::getEdges)
112- .def (" centerX" , &dai::ImgDetection::getCenterX)
113- .def (" centerY" , &dai::ImgDetection::getCenterY)
114- .def (" width" , &dai::ImgDetection::getWidth)
115- .def (" height" , &dai::ImgDetection::getHeight)
116- .def (" angle" , &dai::ImgDetection::getAngle);
92+ .field (" ymax" , &dai::ImgDetection::ymax);
11793
11894 // classes
11995 class_<dai::ImgFrame>(" ImgFrame" )
@@ -122,9 +98,10 @@ EMSCRIPTEN_BINDINGS(depthai_js) {
12298 .property (" height" , &dai::ImgFrame::getHeight);
12399 class_<dai::ImgDetections>(" ImgDetections" )
124100 .smart_ptr_constructor (" ImgDetections" , &std::make_shared<dai::ImgDetections>)
125- .property (" detections" , &dai::ImgDetections::detections)
126- // module global functions
127- function (" deserializeImgFrame" , &daiDeserializeFromJS<dai::ImgFrame>);
101+ .property (" detections" , &dai::ImgDetections::detections);
102+
103+ // module global functions
104+ function (" deserializeImgFrame" , &daiDeserializeFromJS<dai::ImgFrame>);
128105 function (" deserializeImgDetections" , &daiDeserializeFromJS<dai::ImgDetections>);
129106 function (" getMessageType" , &daiGetMessageType);
130107}
0 commit comments