Hexagon vs square

General discussion about topics related to OpenMV.
widnerkj
Posts: 2
Joined: Tue Jan 07, 2020 10:08 am

Hexagon vs square

Postby widnerkj » Tue Jan 07, 2020 10:15 am

I apologize in advance as I suspect the answer may be far easier than I realize. But I'm very new to this.
I have a project where I'd like to use an H7 as a machine vision system. I have sockets traveling around a radius that will come into view of the H7. What I would like to do is trigger an output if the socket is upside down. (square up). And trigger a second output if the socket is right side up. (hexagon pointed up). I've been attempting with the find squares, circles, and or, keypoints. To no avail. Any assistance would be greatly appreciated.
User avatar
kwagyeman
Posts: 4431
Joined: Sun May 24, 2015 2:10 pm

Re: Hexagon vs square

Postby kwagyeman » Wed Jan 08, 2020 1:56 am

Use the find_line_segments() method. Then constrain the roi for the find_line_segments algorithm to where you expect the object to be.

Then, count the number of returned line segments and threshold the returned line segments for only ones that are quite strong.

You should end up with 4 line segments or 6 depending side.

Just run the find_line_segments() demo to get started. Its under feature detection.
Nyamekye,
widnerkj
Posts: 2
Joined: Tue Jan 07, 2020 10:08 am

Re: Hexagon vs square

Postby widnerkj » Wed Jan 08, 2020 10:21 am

Thank you. I'll get on that. I very much appreciate the nudge in the correct direction.

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 5 guests