Temporal processing of image stack

11 views (last 30 days)
Ian Blum
Ian Blum on 10 Jun 2012
Hello,
Not super familiar with the image toolbox in Matlab and we was wondering if there was an easy way to use arithmetic operations (or something similar) to process a time-series of still images that are currently in a tiff stack.
Briefly, we have some relatively noisy images and would like to run a filter which uses temporal information to remove the random noise. Since the nearest neighbour images i.e. the one before and the one after, should be almost identical, in terms of the actual image (but not the noise) we were thinking that by comparing two images and then plotting the lowest value of the two for each pixel we would be able to eliminate the random noise will preserving the real data (with only a minor dimming of the image itself). We would then run this as a recursive filter so that it would happen for each image in the stack (except the last of course) and then resave the tiff file with a suffix or some such attached.
The question now is, can this be coded simply in Matlab? and were should I begin in terms of resources to figure this out?
Thanks to anyone taking the time to read and help us out.
  2 Comments
Ryan
Ryan on 11 Jun 2012
By taking the low value you are assuming your noise is all high frequency and that you have no salt and pepper noise. I believe it is common to average pictures if you have multiple to remove noise. (i.e. 3 pictures of the same thing). You could also explore doing a quick median filter or gaussian filter for noise removal.
Ashish Uthama
Ashish Uthama on 11 Jun 2012
Are all the images in the stack of the same still scene? If so, consider using MEAN (http://www.mathworks.com/help/techdoc/ref/mean.html). You can ask MEAN to work on the third dimension.

Sign in to comment.

Answers (1)

Geoff
Geoff on 10 Jun 2012
Well, I'm not known for my solutions that take advantage of inbuilt MatLab functions... Maybe something like filter would be useful, but here... Assuming mono images (ie 3rd dimension is the frame number)
nframes = zeros( size(frames) - [0,0,1] );
for f = 1:size(nframes,3)
nframes(:,:,f) = min( frames(:,:,f), frames(:,:,f+1);
end
That would do your min-filtering on two frames... One thing I would try is to take 3 frames (f + [-1,0,1]), choose the centre value of the three. Could probably just take advantage of sort() here, which would be about as efficient as doing comparisons manually...
nframes = zeros(size(frames)); % Keep filtered frame numbers related to original
for f = 2:size(frames,3)-1
ff = sort( frames(:,:,f+[-1,0,1]), 3 );
nframes(:,:,f) = ff(:,:,2);
end

Categories

Find more on Convert Image Type 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!