Detectign a rhombus (rotated square).

OpenMV related project discussion.
jimmie
Posts: 22
Joined: Wed Aug 21, 2019 11:22 pm

Detectign a rhombus (rotated square).

Postby jimmie » Tue Aug 27, 2019 1:23 pm

I have a project where I would like to detect a rhombus (it is a rotated square).

How can this be done?

Thanks in advance.
rohm.jpg
rohm.jpg (9.19 KiB) Viewed 1808 times
User avatar
kwagyeman
Posts: 3715
Joined: Sun May 24, 2015 2:10 pm

Re: Detectign a rhombus (rotated square).

Postby kwagyeman » Tue Aug 27, 2019 2:08 pm

Have you seen the find_rectangles() command? It finds rectangles with sharp white to black borders.
Nyamekye,
jimmie
Posts: 22
Joined: Wed Aug 21, 2019 11:22 pm

Re: Detectign a rhombus (rotated square).

Postby jimmie » Tue Aug 27, 2019 2:13 pm

Thank you. Yes, I did before writing the post but I meant to say I only want to find a rhombus. I do not want to find rectangles so I can speed up the search ....
User avatar
kwagyeman
Posts: 3715
Joined: Sun May 24, 2015 2:10 pm

Re: Detectign a rhombus (rotated square).

Postby kwagyeman » Tue Aug 27, 2019 3:08 pm

You have to filter out the detections of what you aren't interested in by looking at the properties of the rectangles returned and rejecting ones that don't fit what you want. Please see the standard python 3 filter method.
Nyamekye,
jimmie
Posts: 22
Joined: Wed Aug 21, 2019 11:22 pm

Re: Detectign a rhombus (rotated square).

Postby jimmie » Tue Aug 27, 2019 3:11 pm

Thank you very much for your usual prompt help.

Return to “Project Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests