Borrar filtros
Borrar filtros

Detect square and circle shapes on natural image

2 visualizaciones (últimos 30 días)
laura kenny
laura kenny el 8 de Jul. de 2016
Respondida: Image Analyst el 8 de Jul. de 2016
My goal is to identify that a full square is present in an image. If the full square is visible, then the number of circles within this square must be counted.
Currently, I binarize the image and then count the number of holes and objects in the image using bwboundaries(): [B,L,N] = bwboundaries(BW);
I have tried to identify the square using the Hough transform, but this does not detect all lines of the square due to shadowing and the lines not being perfectly straight.
The problem is that I cannot remove shadowing and background noise and accurately identify the square shape.
I have attached a sample image from which I want to detect if the full square is in view and then count the number of circles within this square.

Respuestas (1)

Image Analyst
Image Analyst el 8 de Jul. de 2016
You'd need to post some images that you consider not a square. Otherwise maybe we can just find any boundary that contains other blobs - and this is easier.
In the meantime, see my attached shape recognition demo.

Categorías

Más información sobre Get Started with Image Processing Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by