![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/189262/image.png)
Find all rectangle(or another shape like circle, square, and triangle) in image
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Junwon Park
el 15 de Jun. de 2018
Editada: Junwon Park
el 15 de Jun. de 2018
Hi.
I want to fine corners of rectangle in images for tracking changing coordination. For this, i think that find edge and corners of rectangle first.
How to find all rectangle's outline.
I attached 2 images. The attached image have 40 rectangles. I want to get "40". However, the image have noise. How to i get target's exactly number.
Please, help me.
Thanks.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/191271/image.png)
.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/191272/image.png)
Noise Rectangle 1
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/191273/image.png)
Noise Rectangle 2
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/191274/image.png)
0 comentarios
Respuesta aceptada
Image Analyst
el 15 de Jun. de 2018
Find the red stuff using color segmentation. Then erode the mask to separate the squares. Then examine each blob to see how many vertices it has and determine if it's a square, triangle, pentagon, or whatever. See attached demo.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/189262/image.png)
0 comentarios
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!