Is there a way ro recognize a rotated square or rectangle?

8 views (last 30 days)
I'm trying to get a working shape recognition tool which is able to recognize a bunch of different shapes. At the moment I have a test image with different shapes in it but I can not seem to get the rotated rectangle in row 3 column 3 recognized. I also do have problems finding a pattern to recognize triangles but thats another story.
I am detecting the squares, rectangles and circles with regionprops using the Extent and BoundingBox parameters. Is there a possible way to identify the length of the sides of an object which was found with bwboundaries? I found a few posts where a user named Image Analyst used circularity to identify a shape but it seems that it is difficult to set a specific circularity for different kinds of rectangles because the moment they start varying in length and width in a different ratio there is another value associated with that specific rectangle. Same problem appears with triangles if I'm not mistaken. I hope a few of you guys out there have some good ideas I could try out. Thanks in advance!

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!