Ask Your Question

What method is used to detect this rectangle?

asked 2016-02-12 08:54:58 -0500

Pomagalski gravatar image

updated 2016-02-12 08:56:22 -0500

Rotating Target changed distances computed with SolvePnP

I'm trying to detect the pose of a hexagon shape with a similar frame around it but I'm not able to isolate out everything that is going on in the background. Perhaps another issue I have is that I'm really only familiar with Python and there are no comments in this code (and most others in the Github/samples directory). I have followed each of the tutorial lessons for OpenCV Python on and

Can the author or anyone help identify the method?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-02-12 18:15:19 -0500

Tetragramm gravatar image

It seems to be drawing on the border between white and black, so edge detection.

Do Sobel and remove any that aren't strong enough to be white to black transitions. Then do something like contour detection and remove any that aren't long straight lines.

There are a couple of other ways of doing it, but that's probably the simplest.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-02-12 08:54:58 -0500

Seen: 297 times

Last updated: Feb 12 '16