Ask Your Question
0

How to find the corners of a rectangular contour in pixel points?

asked 2016-01-13 05:11:43 -0600

Gren8 gravatar image

Hello,

i want to know how i can find the pixel postion of the corner points of a rectangular contour? With findcontours() and moments() i find the mass center of the contour but know i need the corner points.

Or even better is there a possibility to find the the angular orientation of the rectangle?

Please help it's important for me.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2016-01-13 06:08:20 -0600

thdrksdfthmn gravatar image

If the rectangle is not rotated, then use boundigRect.

If the rectangle may be rotated, then use minAreaRect; the corners can be computed from it.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-01-13 05:11:43 -0600

Seen: 3,642 times

Last updated: Jan 13 '16