Filter löschen
Filter löschen

Detect square and circle shapes on natural image

2 Ansichten (letzte 30 Tage)
laura kenny
laura kenny am 8 Jul. 2016
Beantwortet: Image Analyst am 8 Jul. 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.

Antworten (1)

Image Analyst
Image Analyst am 8 Jul. 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.

Kategorien

Mehr zu Get Started with Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by