You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even with integer center/even size, the boundingRect() estimation of a cv::RotatedRect() with a 0 angle may be one-pixel wider than expected.
This is not wrong per se (this is still a bounding rect), but it is a little pessimistic :
This may be normal since a RotatedRect is center-wise, so the size may have to be odd to match integer-pixel boundaries.
However, this is still pessimistic :
I also think the center of the box should be given by x0 + (width - 1) / 2, y0 + (height - 1) / 2
Imagine the box has a width of 5 and starts at 0, so pixels are 0, 1, 2, 3, 4. Center 2 is obviously '2', which is obtained by the formula above. If you don't subtract 1 from the width before dividing by two you get 2.5 which is wrong
OpenCV 4.4.0
Even with integer center/even size, the boundingRect() estimation of a cv::RotatedRect() with a 0 angle may be one-pixel wider than expected.
This is not wrong per se (this is still a bounding rect), but it is a little pessimistic :
This may be normal since a RotatedRect is center-wise, so the size may have to be odd to match integer-pixel boundaries.
However, this is still pessimistic :
The text was updated successfully, but these errors were encountered: