Skip to content

Commit f97ac6a

Browse files
committed
fix always draw circle even when not debug
1 parent ff9bc27 commit f97ac6a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/prm_vision/opencv_armor_detector/src/OpenCVArmorDetector.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,12 @@ std::vector<cv::Point2f> OpenCVArmorDetector::detectArmorsInFrame(cv::Mat &frame
200200
std::vector<cv::Point2f> armor_points_2 = rectToPoint(second);
201201

202202
// Draw a dot on the top and bottom of each light bar using rectToPoint
203+
#ifdef DEBUG
203204
cv::circle(frame, armor_points_1[0], 0, cv::Scalar(0, 255, 0), -1);
204205
cv::circle(frame, armor_points_1[1], 0, cv::Scalar(0, 255, 0), -1);
205206
cv::circle(frame, armor_points_2[0], 0, cv::Scalar(0, 255, 0), -1);
206207
cv::circle(frame, armor_points_2[1], 0, cv::Scalar(0, 255, 0), -1);
207-
208+
#endif
208209
return {rectToPoint(first)[0], rectToPoint(first)[1], rectToPoint(second)[0], rectToPoint(second)[1]};
209210
}
210211
}

0 commit comments

Comments
 (0)