aruco_pose: draw detected markers in aruco_map/debug topic

This commit is contained in:
Oleg Kalachev
2019-03-01 12:38:07 +03:00
parent db9d3cb398
commit 9a8202422e

View File

@@ -216,6 +216,7 @@ publish_debug:
// publish debug image (even if no map detected)
if (debug_pub_.getNumSubscribers() > 0) {
Mat mat = cv_bridge::toCvCopy(image, "bgr8")->image; // copy image as we're planning to modify it
cv::aruco::drawDetectedMarkers(mat, corners, ids); // draw detected markers
if (valid) {
cv::aruco::drawAxis(mat, camera_matrix_, dist_coeffs_, rvec, tvec, 1.0); // draw board axis
}