How to delete the area around a circle in an image?

5 vues (au cours des 30 derniers jours)
Thomas Nell
Thomas Nell le 25 Nov 2018
Commenté : Thomas Nell le 26 Nov 2018
I have an image which has many circles in it, I've used viscircles to identify and draw a circle around the circles in the image. My next step is to delete the area around the circles, do you guys know how I could go about this???
Thank you so much

Réponse acceptée

Image Analyst
Image Analyst le 25 Nov 2018
Yes. viscircles() does not find circles though - perhaps you meant imfindcircles().
I don't have your code so I can't extend it so I'll just give you the steps.
  1. Use strel() to construct a disc structuring element
  2. Use imdilate() to dilate your binary image (circles mask) to enlarge the circles
  3. Use ringMask = xor(mask, dilatedMask) to get the annular mask.
  4. Use the annular mask to set the gray scale image to 0 there: grayImage(ringMask) = 0;
Attach your image and code to produce the circles if you can't do it.
  1 commentaire
Thomas Nell
Thomas Nell le 26 Nov 2018
Ah, thank you so much, will give this a try

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by