「mrcImageBilateralFilter」の版間の差分
細 (Kinoshita がページ「MrcImageBilateralFilter」を「mrcImageBilateralFilter」に移動しました) |
|||
| 行19: | 行19: | ||
W_x(xi,xj) = 1/(1+|xi-xj|^2/sigmaSpace^2 ) | W_x(xi,xj) = 1/(1+|xi-xj|^2/sigmaSpace^2 ) | ||
W_I(Ii,Ij) = 1/(1+|Ii-Ij|^2/sigmaDensity^2) | W_I(Ii,Ij) = 1/(1+|Ii-Ij|^2/sigmaDensity^2) | ||
| + | |||
== オプション一覧 == | == オプション一覧 == | ||
| 行83: | 行84: | ||
<td>Kernel Size 3D (x:int, y:int, z:int) [pixel]</td> | <td>Kernel Size 3D (x:int, y:int, z:int) [pixel]</td> | ||
<td>1.0 1.0 1.0 </td> | <td>1.0 1.0 1.0 </td> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <td>-c</td> | ||
| + | <td>選択</td> | ||
| + | <td>コンフィグファイル設定</td> | ||
| + | <td>NULL</td> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <td>-m</td> | ||
| + | <td>選択</td> | ||
| + | <td>モードを設定</td> | ||
| + | <td>0</td> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <td>-h</td> | ||
| + | <td>選択</td> | ||
| + | <td>ヘルプを表示</td> | ||
| + | <td> </td> | ||
</tr> | </tr> | ||
</div> | </div> | ||
| 行98: | 行117: | ||
</tr> | </tr> | ||
</table> | </table> | ||
| + | |||
===-kTD の詳細=== | ===-kTD の詳細=== | ||
<table border="1"> | <table border="1"> | ||
| 行107: | 行127: | ||
<tr> | <tr> | ||
<td>0</td> | <td>0</td> | ||
| − | <td> | + | <td>ガウス関数</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>1</td> | <td>1</td> | ||
| − | <td> | + | <td>ローレンツ関数</td> |
</tr> | </tr> | ||
</div> | </div> | ||
| 行124: | 行144: | ||
<tr> | <tr> | ||
<td>0</td> | <td>0</td> | ||
| − | <td> | + | <td>ガウス関数</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>1</td> | <td>1</td> | ||
| − | <td> | + | <td>ローレンツ関数</td> |
</tr> | </tr> | ||
</table> | </table> | ||
| 行134: | 行154: | ||
== 実行例 == | == 実行例 == | ||
| − | === | + | ===[[Media:Input-1VOM-N-2D.mrc | 入力ファイル]]の画像=== |
<table> | <table> | ||
<tr> | <tr> | ||
| − | <td>[[画像:Input- | + | <td>[[画像:Input-1VOM-N-2D.png]]</td> |
<td><p align="left">最小<br> | <td><p align="left">最小<br> | ||
最大<br> | 最大<br> | ||
| 行144: | 行164: | ||
標準誤差<br></p> | 標準誤差<br></p> | ||
</td> | </td> | ||
| − | <td><p align="left"> | + | <td><p align="left">-18651.7 (10, 1, 0)<br> |
| − | + | 52942.7 (24, 39, 0)<br> | |
| − | + | 7214.87<br> | |
| − | + | 10067.6<br> | |
| − | + | 125.845<br></p> | |
</td> | </td> | ||
</tr> | </tr> | ||
| − | </table> | + | </table> |
| + | |||
===オプション必須項目のみの場合=== | ===オプション必須項目のみの場合=== | ||
| 行163: | 行184: | ||
標準誤差<br></p> | 標準誤差<br></p> | ||
</td> | </td> | ||
| − | <td><p align="left"> | + | <td><p align="left">-18651.7 (10, 1, 0)<br> |
| − | + | 52942.7 (24, 39, 0)<br> | |
| − | + | 7214.87<br> | |
| − | + | 10067.6<br> | |
| − | + | 125.845<br></p> | |
</td> | </td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
| + | |||
===オプション -sD=== | ===オプション -sD=== | ||
| − | ====sD= | + | ====sD=50000で実行==== |
<table> | <table> | ||
<tr> | <tr> | ||
| 行183: | 行205: | ||
標準誤差<br></p> | 標準誤差<br></p> | ||
</td> | </td> | ||
| − | <td><p align="left"> | + | <td><p align="left">-3963.33 (76, 66, 0)<br> |
| − | + | 36164.2 (26, 29, 0)<br> | |
| − | + | 7213.95<br> | |
| − | + | 8271.46<br> | |
| − | + | 103.393<br></p> | |
</td> | </td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
| + | |||
| + | |||
| + | <div>以降はsD=50000で実行する</div> | ||
| + | |||
===オプション -kTD=== | ===オプション -kTD=== | ||
| 行203: | 行229: | ||
標準誤差<br></p> | 標準誤差<br></p> | ||
</td> | </td> | ||
| − | <td><p align="left"> | + | <td><p align="left">-4063.09 (56, 4, 0)<br> |
| − | + | 36357.6 (26, 29, 0)<br> | |
| − | + | 7212.18<br> | |
| − | + | 8280.1<br> | |
| − | + | 103.501<br></p> | |
</td> | </td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
| + | |||
===オプション -sS=== | ===オプション -sS=== | ||
| 行223: | 行250: | ||
標準誤差<br></p> | 標準誤差<br></p> | ||
</td> | </td> | ||
| − | <td><p align="left"> | + | <td><p align="left">-3196.78 (38, 0, 0)<br> |
| − | + | 32196.3 (25, 39, 0)<br> | |
| − | + | 7210.81<br> | |
| − | + | 8039.59<br> | |
| − | + | 100.495<br></p> | |
</td> | </td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
| + | |||
===オプション -sS3=== | ===オプション -sS3=== | ||
| 行251: | 行279: | ||
</tr> | </tr> | ||
</table> | </table> | ||
| + | |||
===オプション -kTS=== | ===オプション -kTS=== | ||
| − | ====kTS= | + | ====kTS=1, sS=10で実行==== |
<table> | <table> | ||
<tr> | <tr> | ||
| 行263: | 行292: | ||
標準誤差<br></p> | 標準誤差<br></p> | ||
</td> | </td> | ||
| − | <td><p align="left"> | + | <td><p align="left">-3198.73 (38, 0, 0)<br> |
| − | 2 | + | 32222.2 (25, 39, 0)<br> |
| − | + | 7210.86<br> | |
| − | + | 8040.82<br> | |
| − | + | 100.51<br></p> | |
</td> | </td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
| + | |||
===オプション -kS=== | ===オプション -kS=== | ||
| 行283: | 行313: | ||
標準誤差<br></p> | 標準誤差<br></p> | ||
</td> | </td> | ||
| − | <td><p align="left"> | + | <td><p align="left">-3871.71 (76, 66, 0)<br> |
| − | + | 35969.2 (26, 29, 0)<br> | |
| − | + | 7213.84<br> | |
| − | + | 8256.51<br> | |
| − | + | 103.206<br></p> | |
</td> | </td> | ||
</tr> | </tr> | ||
2014年1月16日 (木) 01:39時点における版
mrcImageBilateralFilterとはmrcImageファイルを平滑化するためのEosのコマンドである。 Tomasi and Manduchiにより提唱された手法であり、エッジを保ちつつ、平滑化するための手法である。像の強度差による重みを付けた平滑化である。二つの偏差(強度差、距離)をガウス分布などにより重みを計算していることにより、強度差がある領域をぼかすことなく維持できる。
アルゴリズム
Wx(xi, xj)とWI(Ii,Ij)の二つのウェイトをもち、いずれも|xi-xj|, |Ii-Ij|のガウス関数もしくはローレンツ関数などとして定義されている。すなわち、エッジ付近では、画像の差が大きくなるため、自分自身が属する密度帯での平滑化のウェイトがかかる。
fi = Sigma_j(W(i,j)*Ij)/ Sigma_j(Wj)
,where W(i,j)=W_x(xi,xj)*W_I(Ii,Ij)
------- linfo.mode : 0
W_x(xi,xj) = exp(-|xi-xj|^2/2 sigmaSpace^2 )
W_I(Ii,Ij) = exp(-|Ii-Ij|^2/2 sigmaDensity^2)
------- linfo.mode : 1
W_x(xi,xj) = 1/(1+|xi-xj|^2/sigmaSpace^2 )
W_I(Ii,Ij) = 1/(1+|Ii-Ij|^2/sigmaDensity^2)
オプション一覧
メインオプション
| オプション | 必須項目/選択項目 | 説明 | デフォルト |
|---|---|---|---|
| -i | 必須 | 入力ファイル:mrcImage | NULL |
| -o | 選択 | 出力ファイル:mrcImage | stdout(設定しなければ標準出力) |
| -sD | 選択 | SigmaDensity(float) [ImageAmplitude] | 2.0 |
| -kTD | 選択 | Kernel Type of Density (int) | 0 |
| -sS | 選択 | SigmaSpace(float) [pixel] | 1.0 |
| -sS3 | 選択 | SigmaSpace 3D (x:float, y:float, z:float) [pixel] | 1.0 1.0 1.0 |
| -kTS | 選択 | Kernel Type of Space (int) | 0 |
| -kS | 選択 | Kernel Size (int) [pixel] | 1.0 |
| -kS3 | 選択 | Kernel Size 3D (x:int, y:int, z:int) [pixel] | 1.0 1.0 1.0 |
| -c | 選択 | コンフィグファイル設定 | NULL |
| -m | 選択 | モードを設定 | 0 |
| -h | 選択 | ヘルプを表示 |
モードの詳細
| モード | 説明 |
|---|---|
| 0 |
-kTD の詳細
| モード | 説明 |
|---|---|
| 0 | ガウス関数 |
| 1 | ローレンツ関数 |
-kTS の詳細
| モード | 説明 |
|---|---|
| 0 | ガウス関数 |
| 1 | ローレンツ関数 |
実行例
入力ファイルの画像
![]() |
最小 最大 |
-18651.7 (10, 1, 0) 52942.7 (24, 39, 0) |
オプション必須項目のみの場合
![]() |
最小 最大 |
-18651.7 (10, 1, 0) 52942.7 (24, 39, 0) |
オプション -sD
sD=50000で実行
![]() |
最小 最大 |
-3963.33 (76, 66, 0) 36164.2 (26, 29, 0) |
オプション -kTD
kTD=1で実行
![]() |
最小 最大 |
-4063.09 (56, 4, 0) 36357.6 (26, 29, 0) |
オプション -sS
sS=10で実行
![]() |
最小 最大 |
-3196.78 (38, 0, 0) 32196.3 (25, 39, 0) |
オプション -sS3
sS3=(0.1, 2.0, 0.3)で実行
![]() |
最小 最大 |
0 (0, 0, 0) 4.41127 (34, 41, 36) |
オプション -kTS
kTS=1, sS=10で実行
![]() |
最小 最大 |
-3198.73 (38, 0, 0) 32222.2 (25, 39, 0) |
オプション -kS
kS=10で実行
![]() |
最小 最大 |
-3871.71 (76, 66, 0) 35969.2 (26, 29, 0) |
オプション -kS3
kS3=(0.1, 2.0, 0.3)で実行
![]() |
最小 最大 |
0 (0, 0, 0) 4.87021 (34, 41, 36) |
参考資料
- C. Tomasi and R. Manduchi, Bilateral Filtering for Gray and Color Images, Proceedings of the 1998 IEEE International Conference on Computer Vision, Bombay, India








