开发者

OpenCV - Find skewed rectangle

开发者 https://www.devze.com 2023-03-01 11:42 出处:网络
I want to draw a \"bounding box\" around a skewed rectangle. I thought I could use the cvMinAreaRect2() function but it only handles the rotation, see this image:

I want to draw a "bounding box" around a skewed rectangle. I thought I could use the cvMinAreaRect2() function but it only handles the rotation, see this image:

OpenCV - Find skewed rectangle

开发者_如何学C

Is there any function to solve this? If not, any ideas how to implement it?


Compute both MinAreaRect and ConvexHull. Then, for each of the four points found by MinAreaRect, find the corresponding nearest point in the convex hull.

0

精彩评论

暂无评论...
验证码 换一张
取 消