how to clean up and refine edges of this image

9 次查看(过去 30 天)
Hi, In the image shown above, I want to remove the noise from the main image shown in the red circles. Also i want to smooth out the edges of the image. I tried curve fitting of the end points, but I am not getting the best results. Any suggestions?
  3 个评论
Hemant Agiwal
Hemant Agiwal 2018-9-7
by original you mean without the red circles? Because this is the starting image...
KALYAN ACHARJYA
KALYAN ACHARJYA 2018-9-7
编辑:KALYAN ACHARJYA 2018-9-7
You can do that very easily, upload/attach the original image(without red circles)

请先登录,再进行评论。

回答(2 个)

Matt J
Matt J 2018-9-7
编辑:Matt J 2018-9-7
BW= bwareafilt(~yourImage,1);
newImage=~(imclose(BW,strel('disk', something) ) );

Image Analyst
Image Analyst 2018-9-7
One way is to blur it and re-threshold it.
See attached testGrayImage.m
Another way is to get the x and y coordinates with bwboundaries() and smooth them with a Savitzky-golay Filter (a moving polynomial filter). See attached demo.
  4 个评论
Hemant Agiwal
Hemant Agiwal 2018-9-18
hi, Thanks for all your help.
Can you please explain
"% Threshold again.
binaryImage = blurredImage > 0.5;"
How did you come up with the number 0.5 and what is its significance. If you could send me some link that explains the theory behind this, it would be really helpful.
Thanks again
Image Analyst
Image Analyst 2018-9-18
That's the midpoint of the blur. If you pick that, then the area of the second binary image should be really close to the area of the original binary image.

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by