フィルターのクリア

How can I write a matlab script for median filter in temporal domain?

1 回表示 (過去 30 日間)
Bibhu Prasad  Das
Bibhu Prasad Das 2017 年 3 月 24 日
回答済み: Image Analyst 2017 年 3 月 25 日
I want to implement median filter on my results, I used to the predefined function "medfilt2" in matlab but it is not showing any better results so far, and I also don't understand it works in spatial domain or temporal domain.

回答 (2 件)

dpb
dpb 2017 年 3 月 24 日
Results of any filtering operation are totally dependent upon the suitability of the chosen filter for the purpose and the data.
The domain to which medfilt1/2 are applied is dependent upon the domain of the input; it doesn't care, it just operates on the input given.
  2 件のコメント
Bibhu Prasad  Das
Bibhu Prasad Das 2017 年 3 月 24 日
can we write our code for median filter, if so please help
dpb
dpb 2017 年 3 月 25 日
編集済み: dpb 2017 年 3 月 25 日
No idea what you're trying to ask here; medfilt1/2 implements the median filter for either 1D or 2D arrays; what else is there to do?
Whether it works or not has more (everything, actually) to do with the data and what one is trying to do than does the actual computation itself.
ADDENDUM
At least medfilt1 is just an m-file (I don't have the 2D version but presume it is as well); you can look at the TMW implementation. It just boils down to a loop, though, that works thru the total vector in pieces computing the median for the selected filter size--no magic there at all.

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


Image Analyst
Image Analyst 2017 年 3 月 25 日
Simply use medfilt1() in the Signal Processing Toolbox. It does not care what units the elements are in - time or distance - to medfilt1(), they're simply elements and the units don't matter. Example code is given in the help for medfilt1.

カテゴリ

Help Center および File ExchangeSignal Generation and Preprocessing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by