How to remove specific portions of a image?

10 views (last 30 days)
arjun
arjun on 30 Jul 2014
Commented: Steve Eddins on 31 Jul 2014
Hey, I wish to remove circles from my image by specifying its center and the radius. Its a bw image and i wish to specifically remove few selected circles by specifying their centers and radii. I know strel can be used but i am not able to figure out how to use it for this purpose. Thanks.
  1 Comment
Steve Eddins
Steve Eddins on 31 Jul 2014
See today's blog post for a little bit more on this question.

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 30 Jul 2014
Keeping in mind that an image must remain rectangular, what does "remove" mean to you? You can't really remove those pixels but you can replace them with something, such as another image, a texture, a uniform gray level, or smear the boundaries inwards with roifill(). What do you want to do?
  3 Comments
Image Analyst
Image Analyst on 30 Jul 2014
If you just want to replace all pixels above some value, like 250, with 0, then do this
binaryImage = grayImage > 250; % or whatever.
grayImage(binaryImage) = 0; % Set to 0.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!