noise removal from the part of the medical image where noise is actually present, not the whole image
Show older comments
i am doing one algorithm where i need to remove noise from an image , but i cant apply any kind of filter or any noise removal algorithm directly to the whole image since i am working in medical image and it might blur or might take any tissue or connected organ as a noise and remove it and will change my output. i would like to know the best possible way to remove noise from only those parts of the image where noise actually exists. thank you..
2 Comments
Kian Azami
on 18 Oct 2017
Can you upload an image as an example?
syeda musfia
on 18 Oct 2017
Accepted Answer
More Answers (2)
Kian Azami
on 18 Oct 2017
Edited: Kian Azami
on 18 Oct 2017
close all
% Read the
I = imread('input.jpg');
% Remove noise
se1 = strel('disk',1);
I1 = imclose(I, se1);
se2 = strel('disk',2)
I2 = imopen(I1, se2);
% Original Image
figure
imshow(I)
% Image after noise
figure
imshow(I2)
Basically, imopen(I,se1) will remove the pixels that are left alone.
Then, imclose(I1,se2) will do the opposite. It will unite the pixels with the same color.
se1 and se2 are the structures that tell imopen and imclose how to remove or unite the pixels.
By the command 'strel' you define the zone by which you can remove or unite the pixels. For example, strel('disk',2) is a disk like zone with a dimension of 2. So, when you apply this structure in your image by 'imopen' it will divide the image into disk like shapes with the dimension of 2 and if it see discontinuity with the picture colors it will remove the pixels in that zone which is possibly a noise. You can play with the dimensions and see the change in your image.
You can define many different kinds of strel and if you go to help you can see them: strel Documentation
Image Analyst
on 18 Oct 2017
I agree with Bjorn - the radiologist will be able to mentally filter out the noisy areas.
If you still want to do it for some reason, then you'll have to find a mask for identifying the noisy areas (for example use stdfilt() but exclude edge regions), then remove noise for the entire image, and replace the noise pixels with noise free pixels.
mask = some algorithm to identify noisy regions.
noiseFreeImage = ReduceNoise(grayImage); % Remove noise over the entire image.
noiseReducedImage = grayImage; % Initialize.
% Replace pixels in noise region with noise-free pixels.
noiseReducedImage (mask) = noiseFreeImage(mask);
Categories
Find more on Image Filtering in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!