Effacer les filtres
Effacer les filtres

Detect square and circle shapes on natural image

2 vues (au cours des 30 derniers jours)
laura kenny
laura kenny le 8 Juil 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.

Réponses (1)

Image Analyst
Image Analyst le 8 Juil 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.

Catégories

En savoir plus sur Get Started with Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by