yolo roi binary box find light fix
This commit is contained in:
@@ -246,8 +246,13 @@ std::vector<fyt::auto_aim::Light> Detector::findLightsInROI(
|
|||||||
light.center += cv::Point2f(roi.x, roi.y);
|
light.center += cv::Point2f(roi.x, roi.y);
|
||||||
light.top += cv::Point2f(roi.x, roi.y);
|
light.top += cv::Point2f(roi.x, roi.y);
|
||||||
light.bottom += cv::Point2f(roi.x, roi.y);
|
light.bottom += cv::Point2f(roi.x, roi.y);
|
||||||
// Also update the RotatedRect center
|
// Also update the RotatedRect center for correct points() calculation
|
||||||
light.center = light.center; // Already updated above
|
cv::Point2f new_center = light.center;
|
||||||
|
cv::Size2f sz = light.size;
|
||||||
|
float ang = light.angle;
|
||||||
|
light = fyt::auto_aim::Light(
|
||||||
|
cv::RotatedRect(new_center, sz, ang),
|
||||||
|
light.top, light.bottom, light.length, light.width);
|
||||||
|
|
||||||
if (isLight(light)) {
|
if (isLight(light)) {
|
||||||
// Color detection within ROI
|
// Color detection within ROI
|
||||||
|
|||||||
Reference in New Issue
Block a user