CommonestFilter
✖
CommonestFilter
CommonestFilter[data,r]
範囲 r の近傍のすべての値を最頻値で置換することで data にフィルタをかける.
CommonestFilter[data,{r1,r2,…}]
データの 次元のフィルタリングに riを使う.
詳細

- CommonestFilterは,大多数フィルタとも呼ばれるもので,局所的最頻値を返すことでデータにフィルタをかけるために使われる. どの程度の効果があるかは r の値に依存する.
- 範囲 r の各近傍に適用される関数はCommonestである.
- 最頻画素が複数存在し,中心画素がその一つである場合は,中心画素が使われる.それ以外の場合は 画素がランダムな最頻画素で置換される.
- data は次のいずれでもよい.
-
list 任意階数の数値配列 tseries TimeSeriesやTemporalData等の時間データ image 任意のImageオブジェクトまたはImage3Dオブジェクト audio Audioオブジェクト - 多チャンネルの画像については,CommonestFilterは各画素を近傍の最頻画素ベクトルで置換する.
- CommonestFilter[data,{r1,r2,…}]は,各サンプルを中心とした
ブロック中の最頻値を計算する.
- CommonestFilterは,リストおよび画像について指標座標系を仮定する.
- CommonestFilterは,データの境界ではより小さい近傍を使う.


例題
すべて開くすべて閉じる例 (3)基本的な使用例
In[45]:=45

✖
https://wolfram.com/xid/0v5mspv2e197e-wee8ks
Out[45]=45

TimeSeriesにフィルタをかける:
In[1]:=1

✖
https://wolfram.com/xid/0v5mspv2e197e-fx6jf7
In[2]:=2

✖
https://wolfram.com/xid/0v5mspv2e197e-g9fo2
Out[2]=2

In[3]:=3

✖
https://wolfram.com/xid/0v5mspv2e197e-dulvtd
Out[3]=3

In[1]:=1

✖
https://wolfram.com/xid/0v5mspv2e197e-lhc1w0
Out[1]=1

スコープ (11)標準的な使用例のスコープの概要
データ (7)
In[1]:=1

✖
https://wolfram.com/xid/0v5mspv2e197e-8fkivw
Out[1]=1

In[1]:=1

✖
https://wolfram.com/xid/0v5mspv2e197e-cxywqj

In[1]:=1

✖
https://wolfram.com/xid/0v5mspv2e197e-jopin9
In[2]:=2

✖
https://wolfram.com/xid/0v5mspv2e197e-coijx0
Out[2]=2

EventSeriesにフィルタをかける:
In[1]:=1

✖
https://wolfram.com/xid/0v5mspv2e197e-qv5tki
In[2]:=2

✖
https://wolfram.com/xid/0v5mspv2e197e-jdyrqd
Out[2]=2

In[3]:=3

✖
https://wolfram.com/xid/0v5mspv2e197e-hncxk2
Out[3]=3

Audio信号にフィルタをかける:
In[1]:=1

✖
https://wolfram.com/xid/0v5mspv2e197e-p90slf
In[2]:=2

✖
https://wolfram.com/xid/0v5mspv2e197e-em7h2s
Out[2]=2

In[3]:=3

✖
https://wolfram.com/xid/0v5mspv2e197e-j5yrn4
Out[3]=3

In[1]:=1

✖
https://wolfram.com/xid/0v5mspv2e197e-dc0gtv
Out[1]=1

In[1]:=1

✖
https://wolfram.com/xid/0v5mspv2e197e-dauq0o
Out[1]=1

パラメータ (4)
In[101]:=101

✖
https://wolfram.com/xid/0v5mspv2e197e-tlzgi7
Out[101]=101

In[1]:=1

✖
https://wolfram.com/xid/0v5mspv2e197e-ibus74
Out[1]=1

In[1]:=1

✖
https://wolfram.com/xid/0v5mspv2e197e-gdx3zh
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/0v5mspv2e197e-hzoyls
Out[2]=2

In[1]:=1

✖
https://wolfram.com/xid/0v5mspv2e197e-37xttb
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/0v5mspv2e197e-5u7xo
Out[2]=2

アプリケーション (2)この関数で解くことのできる問題の例
特性と関係 (1)この関数の特性および他の関数との関係
最頻値フィルタはバイナリ画像に対してMedianFilterと同じ結果を与える:
In[11]:=11

✖
https://wolfram.com/xid/0v5mspv2e197e-cdiszd
Out[12]=12

考えられる問題 (1)よく起る問題と予期しない動作
Wolfram Research (2008), CommonestFilter, Wolfram言語関数, https://reference.wolfram.com/language/ref/CommonestFilter.html (2016年に更新).
✖
Wolfram Research (2008), CommonestFilter, Wolfram言語関数, https://reference.wolfram.com/language/ref/CommonestFilter.html (2016年に更新).
テキスト
Wolfram Research (2008), CommonestFilter, Wolfram言語関数, https://reference.wolfram.com/language/ref/CommonestFilter.html (2016年に更新).
✖
Wolfram Research (2008), CommonestFilter, Wolfram言語関数, https://reference.wolfram.com/language/ref/CommonestFilter.html (2016年に更新).
CMS
Wolfram Language. 2008. "CommonestFilter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/CommonestFilter.html.
✖
Wolfram Language. 2008. "CommonestFilter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/CommonestFilter.html.
APA
Wolfram Language. (2008). CommonestFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CommonestFilter.html
✖
Wolfram Language. (2008). CommonestFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CommonestFilter.html
BibTeX
✖
@misc{reference.wolfram_2025_commonestfilter, author="Wolfram Research", title="{CommonestFilter}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/CommonestFilter.html}", note=[Accessed: 11-July-2025
]}
BibLaTeX
✖
@online{reference.wolfram_2025_commonestfilter, organization={Wolfram Research}, title={CommonestFilter}, year={2016}, url={https://reference.wolfram.com/language/ref/CommonestFilter.html}, note=[Accessed: 11-July-2025
]}