sharpening image and removing noise

<<
>>
Hi I have an image which I want to do two things with it. 1- I want to remove the background noise 2- I want to detect between the boundary of different parts of image. . Can you suggest me any method to do that?

댓글 수: 8

Ben11
Ben11 2014년 7월 25일
I think you forgot to attach your image
Image Analyst
Image Analyst 2014년 7월 25일
Attach the REAL image, not the pseudocolored image or a figure/screenshot of the image+colorbar, but the actual gray scale image.
A question: why are several gray scale ranges mapped to the same green color?
And what are the boundaries? It's not clear where any boundaries are.
chess
chess 2014년 7월 25일
I need to separate different parts by different color, so the two big gray parts were shown by green and make the background blue.
chess
chess 2014년 7월 25일
I tried median filter with a big windows size, thenI apply my colormap and it was kind of effective.But as you mentioned I need something to help me detect the boundaries as you mentioned.
Image Analyst
Image Analyst 2014년 7월 25일
What I mentioned was that there are no clear boundaries. Even seeing the original grayscale image, I can't make heads nor tails of that. If you were to trace out some area that was "foreground" or "objects", and background, where would the traces be? Then, let's say we could segment into foreground and background, what would you want to know about the foreground? Average gray level? Area or area fraction? Perimeter? Standard deviation? Entropy? What???
Image Analyst
Image Analyst 2014년 7월 26일
Why did you remove the image?
chess
chess 2014년 7월 29일
Second image is colormap version after adding median filter plus applying colormap plus erosion to it. You see if I look at the top image more closely . the black region is slightly bigger. I want those parts to be green as well.
chess
chess 2014년 7월 30일
Any suggestion how to change the grayscale image above to the color one when the boundaries are separated.with or without colormap?

댓글을 달려면 로그인하십시오.

답변 (2개)

Ben11
Ben11 2014년 7월 25일
편집: Ben11 2014년 7월 25일

0 개 추천

If you have the Image Processing Toolbox (to check if you do type 'ver' in the command window), look up "fspecial" which is very handy.
1) Among others you can use a median, mean or gaussian filter (i.e. low-pass) to smooth the image and reduce noise. The median is less sensitive to outliers than the gaussian and preserves considerable details. You can implement this filter like the following using medfilt2, which requires a grayscale image so you need either to use rgb2gray(YourImage) or take individual channels:
for Channel = 1:3
MedianFiltered(:,:,Channel) = medfilt2(YourImage(:,:,Channel),[Radius Radius]);
end
where [Radius Radius] can be modified to span larger areas from which to compute the median. Larger radius yields more blurry images with less details. You can also compute other filters with "fspecial" I mentionned above, like mean or gaussian filters.
If you don't have the Image Processing Toolbox you can make up your own mean filter, for example, using convolution like the following. More info about convolution can be found on Wikipedia here
% Build a 3 x 3 kernel, for example, used to apply the mean filter:
kernel = ones(3,3)/9;
FilteredImage = conv2(YourImage,kernel,'same'); % Keep the size of your original image.
2) The second part of your question looks like an image segmentation problem. Look here for nice examples on the Mathworks website.
Hope that helps!
Spandan Tiwari
Spandan Tiwari 2014년 7월 26일

0 개 추천

Also for the image sharpening part, you can use the function IMSHARPEN in the Image Processing Toolbox. It has parameters that you can try to change to sharpen legitimate edges in the image and not noise (although that's not always possible).

댓글 수: 3

chess
chess 2014년 7월 26일
편집: chess 2014년 7월 26일
The command is not working in my Matlab because I have Matlab 2012.I believe it was introduced in Matlab 2013. Do you know anything equivalent to that.
Image Analyst
Image Analyst 2014년 7월 26일
You can use conv2() or imfilter() with the proper kernel (positive in the middle and negative weights surrounding it). But they most likely work for your image as I remember it. (I'm still trying to figure out why you removed your image if you want our help. Most people want to make it easy for people to answer their question, not harder.)
chess
chess 2014년 7월 30일
Any suggestion how to change the grayscale image above to the color one when the boundaries are separated.with or without colormap?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Images에 대해 자세히 알아보기

질문:

2014년 7월 25일

편집:

2014년 8월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by