Skip to content

imgproc: fix minAreaRect()#19068

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
alalek:issue_18157
Dec 11, 2020
Merged

imgproc: fix minAreaRect()#19068
opencv-pushbot merged 1 commit intoopencv:3.4from
alalek:issue_18157

Conversation

@alalek
Copy link
Copy Markdown
Member

@alalek alalek commented Dec 10, 2020

resolves #18157

This is a one line fix.

  • rotatingCalipers() uses usual cartesian coordinates
  • rotatingCalipers() code expects /* this is a first base vector (a,b) initialized by (1,0) */
  • but it is trashed by base_a = orientation; with following negative width / height values
  • resolved by forcing CCW orientation.

P.S. Code of rotcalipers.cpp requires refactoring.

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Dec 11, 2020

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

minAreaRect angle calculation fails with a particular contour

2 participants