-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Order of returned points for cv::RotatedRect::points() is inconsistent #23335
Copy link
Copy link
Closed
Labels
Description
Descripe the doc issue
The document for cv::RotatedRect::points() says
The order is bottomLeft, topLeft, topRight, bottomRight.
which is introduced in #9343.
But in a .NET wrapper for OpenCV 4.7.0 which using the same code snippet in
opencv/modules/core/src/types.cpp
Line 173 in 0052d46
| void RotatedRect::points(Point2f pt[]) const |
RotatedRect:https://github.com/shimat/opencvsharp/blob/0498156821f052ff6b2fd1205148f07a1de2781d/src/OpenCvSharp/Modules/core/Struct/RotatedRect.cs#L43-L61
It will return points that not forming the order of bottomLeft, topLeft, topRight, bottomRight when the degrees of rotation angle are within the range of 45~315°: shimat/opencvsharp#1541 (comment)
Fix suggestion
Change the implement to guarantee the order of points returned by cv::RotatedRect::points(),
or update the document to indicate the order is unstable.
Reactions are currently unavailable