Detectign a rhombus (rotated square).

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

Have you seen the find_rectangles() command? It finds rectangles with sharp white to black borders.

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 …

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.

Thank you very much for your usual prompt help.