Detect Shape in Image and How many times shapes come in Image

15 views (last 30 days)
Hello Everyone, I hope you are doing well.
I have the following image i want to detect the shape in the image and count how many time shapes exist for example in image im_003002 (1) The peroidic shape which comes six time, i want to detect the shape and show the shapes exist 6 time in the image. similarly in im_005001 (1) the shapes comes 7 times
Can any body help me in this please

Answers (1)

Image Analyst
Image Analyst on 27 Mar 2022
Did you try bwlabel()? If mask is the second image with the slanted lines:
[labeledImage, count] = bwlabel(mask);
  7 Comments
Med Future
Med Future on 31 Mar 2022
@Image Analyst Its not working on second image, I want it to work for the second image eg im_003002 (1)

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by