How to apply Gaussian filter for multiple frames/images instead of only one ?

2 Ansichten (letzte 30 Tage)
awa
awa am 30 Jun. 2016
Kommentiert: awa am 30 Jun. 2016
I want trying to apply a Gaussian filter between 200 images in MATLAB. I understand that for a spatial Gaussian filter, it filters on only one image/frame, how could I apply the Gaussian filter for multiple images/frames and for every pixels?
I thought out to define the images like this, but I'm not sure and I don't know what to do next.
img_array(:,:,1) = img1;
Could anyone give any suggestions on this problem ?
Thanks a lot.
  1 Kommentar
awa
awa am 30 Jun. 2016
And I prefer the suggested solution is not using any built-in function so that I could understand more clearly.
Thank you.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

J Weijs
J Weijs am 30 Jun. 2016
Bearbeitet: J Weijs am 30 Jun. 2016
Simply
img_array_filtered=imfilter(img_array,filter);
should work if your filter is 2D, in which case the filter will be applied to each image seperately. If you don't want to use built-in functions, you would have to write your own spatial convolution function, which isn't difficult starting from the mathematical definition of a convolution. It will be hard to produce a function that is as effcient as Matlab's built-in function though.
  1 Kommentar
awa
awa am 30 Jun. 2016
Thanks for your answer.
What I meant is not to filter multiple images,but to filter multiple frames.
e.g. calculate the average mean value of the pixels that appears in the same location for the 1st frame, 2nd frame and 3rd frame simultaneously.
Currently the gaussian filter is only done only for all the pixels for one image, then done for other images.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by