# Detectign a rhombus (rotated square)

**URL:** <https://forums.openmv.io/t/detectign-a-rhombus-rotated-square/1391>\
**Category:** OpenMV Boards\
**Created:** [August 27, 2019, 5:23pm UTC](https://forums.openmv.io/t/detectign-a-rhombus-rotated-square/1391 "2019-08-27T17:23:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimmie](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@jimmie](https://forums.openmv.io/u/jimmie)\
**Post date:** [August 27, 2019, 5:23pm UTC](https://forums.openmv.io/t/detectign-a-rhombus-rotated-square/1391/1 "2019-08-27T17:23:01Z")

</div>

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](https://canada1.discourse-cdn.com/flex029/uploads/openmv1/original/1X/a4bf421a7857d92bab94d3ed7acd54e804421e99.jpeg)

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [August 27, 2019, 6:08pm UTC](https://forums.openmv.io/t/detectign-a-rhombus-rotated-square/1391/2 "2019-08-27T18:08:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jimmie](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@jimmie](https://forums.openmv.io/u/jimmie)\
**Post date:** [August 27, 2019, 6:13pm UTC](https://forums.openmv.io/t/detectign-a-rhombus-rotated-square/1391/3 "2019-08-27T18:13:24Z")

</div>

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 …

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [August 27, 2019, 7:08pm UTC](https://forums.openmv.io/t/detectign-a-rhombus-rotated-square/1391/4 "2019-08-27T19:08:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jimmie](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@jimmie](https://forums.openmv.io/u/jimmie)\
**Post date:** [August 27, 2019, 7:11pm UTC](https://forums.openmv.io/t/detectign-a-rhombus-rotated-square/1391/5 "2019-08-27T19:11:37Z")

</div>

Thank you very much for your usual prompt help.
