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

조회 수: 3 (최근 30일)
awa
awa 2016년 6월 30일
댓글: awa 2016년 6월 30일
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
awa
awa 2016년 6월 30일
And I prefer the suggested solution is not using any built-in function so that I could understand more clearly.
Thank you.

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

답변 (1개)

J Weijs
J Weijs 2016년 6월 30일
편집: J Weijs 2016년 6월 30일
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
awa
awa 2016년 6월 30일
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.

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

Community Treasure Hunt

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

Start Hunting!

Translated by