22 #include <opencv2/core/core.hpp>
150 itsArUco = addSubComponent<ArUco>(
"aruco");
169 std::vector<int> ids;
170 std::vector<std::vector<cv::Point2f> > corners;
171 itsArUco->detectMarkers(cvimg, ids, corners);
174 std::vector<cv::Vec3d> rvecs, tvecs;
175 if (
itsArUco->dopose::get() && ids.empty() ==
false)
176 itsArUco->estimatePoseSingleMarkers(corners, rvecs, tvecs);
182 itsArUco->sendSerial(
this, ids, corners,
w,
h, rvecs, tvecs);
199 inimg.
require(
"input",
w,
h, V4L2_PIX_FMT_YUYV);
204 outimg = outframe.get();
213 std::vector<int> ids;
214 std::vector<std::vector<cv::Point2f> > corners;
215 std::vector<cv::Vec3d> rvecs, tvecs;
216 itsArUco->detectMarkers(cvimg, ids, corners);
218 if (
itsArUco->dopose::get() && ids.empty() ==
false)
219 itsArUco->estimatePoseSingleMarkers(corners, rvecs, tvecs);
228 itsArUco->drawDetections(outimg, 3,
h+5, ids, corners, rvecs, tvecs);
231 itsArUco->sendSerial(
this, ids, corners,
w,
h, rvecs, tvecs);
234 std::string
const & fpscpu = timer.
stop();
250 unsigned short winw, winh;
254 int x = 0, y = 0;
unsigned short iw = 0, ih = 0;
260 helper.
itext(
"JeVois-Pro ArUco Marker Detection");
266 std::vector<int> ids;
267 std::vector<std::vector<cv::Point2f> > corners;
268 std::vector<cv::Vec3d> rvecs, tvecs;
269 itsArUco->detectMarkers(cvimg, ids, corners);
271 if (
itsArUco->dopose::get() && ids.empty() ==
false)
272 itsArUco->estimatePoseSingleMarkers(corners, rvecs, tvecs);
278 itsArUco->drawDetections(helper, ids, corners, rvecs, tvecs);
281 itsArUco->sendSerial(
this, ids, corners,
w, h, rvecs, tvecs);
284 std::string
const & fpscpu = timer.stop();
285 helper.
iinfo(inframe, fpscpu, winw, winh);