MATLAB Answers

remove fringes in the backround

23 views (last 30 days)
xsfeng
xsfeng on 13 Mar 2012
Hey,
I am a beginner of Matlab,now I have an phantom images that I want to remove the fringes and then smooth the images for next step. But I have tried high pass filter and also low pass filter, but in vain. I have tried to make masks but the fringes still here. Or should I use the fft to find the corresponding frequency of the fringes and then cut it out, then use ifft to get the images, can anyone tell me the details about solving this probelem!
Your kind help will be highly appreciated!

  0 Comments

Sign in to comment.

Answers (2)

Image Analyst
Image Analyst on 21 Mar 2012
You could get fringes from a variety of ways. It could be a Moire pattern (aliasing), it could be noise (hum or voltage line frequency noise), it could be Gibbs noise due to filtering, it could be some artifact of your reconstruction of image processing methods, etc. If the fringes are periodic they would show up as spikes in your Fourier Transform. You could then zero them out and inverse transform. You could try a bandstop filter with median filters, like this demo:
% Program to remove annoying ripples in an image by a band stop filter.
% by ImageAnalyst
clc; % Clear the command window.
close all; % Close all figures (except those of imtool.)
imtool close all; % Close all imtool figures.
clear; % Erase all existing variables.
workspace; % Make sure the workspace panel is showing.
fontSize = 20;
% Change the current folder to the folder of this m-file.
% (The line of code below is from Brett Shoelson of The Mathworks.)
if(~isdeployed)
cd(fileparts(which(mfilename)));
end
originalGrayImage = im2double(imread('whitehouse.tif'));
subplot(2,2,1);
imshow(originalGrayImage);
title('Original Grayscale Image', 'FontSize', fontSize);
set(gcf, 'Position', get(0,'Screensize')); % Enlarge figure to full screen.
lowPassWindowWidth = 21;
highPassWindowWidth = 7;
Idm = medfilt2(originalGrayImage, [lowPassWindowWidth lowPassWindowWidth]);
subplot(2,2,2);
imshow(Idm);
title('Lowpass Image', 'FontSize', fontSize);
Ide = originalGrayImage - medfilt2(originalGrayImage, [highPassWindowWidth highPassWindowWidth]);
subplot(2,2,3);
imshow(Ide);
title('Highpass Image', 'FontSize', fontSize);
finalFilteredGrayImage = Idm + Ide;
subplot(2,2,4);
imshow(finalFilteredGrayImage);
caption = sprintf('Final Filtered Image =\nLow Pass Image + High Pass Image');
title(caption, 'FontSize', fontSize);
Here's the demo image http://i44.tinypic.com/mi30ur.jpg

  1 Comment

xsfeng
xsfeng on 21 Mar 2012
I have tried this, first use the lowpass filter which helps getting rid of the noise, but for the highpass filter, no change about the tilted stripes caused by the grating diffraction in the experiment.
I also did fourier transformation but didn't see the spike of the fringes frequency,maybe the fringes' frequency is so close to the images.

Sign in to comment.


Paul
Paul on 20 Mar 2012
Fringes are a product of filtering. You may not be able filter your way out of this situation. The fringes may have been introduced after aquisition as as a by-product of the discretization process. You may be able to adjust the dynamic range of your image to supress their visibility.

  2 Comments

xsfeng
xsfeng on 21 Mar 2012
Thank you for your information, Paul. I tried to adjust the dynamic range and suppress the visibility, it dose remove some of the noise, but for the fringes still there.
Image Analyst
Image Analyst on 21 Mar 2012
Where did you upload your image(s) to?

Sign in to comment.

Sign in to answer this question.