フィルターのクリア

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

1 回表示 (過去 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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMatched Filter and Ambiguity Function についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by