「mrcImageBilateralFilter」の版間の差分
(→アルゴリズム) |
|||
| 行33: | 行33: | ||
<td>-i</td> | <td>-i</td> | ||
<td>必須</td> | <td>必須</td> | ||
| − | <td> | + | <td>入力ファイル:[[mrcImage]]</td> |
<td>NULL</td> | <td>NULL</td> | ||
</tr> | </tr> | ||
| 行39: | 行39: | ||
<td>-o</td> | <td>-o</td> | ||
<td>選択</td> | <td>選択</td> | ||
| − | <td> | + | <td>出力ファイル:[[mrcImage]]</td> |
<td>stdout(設定しなければ標準出力)</td> | <td>stdout(設定しなければ標準出力)</td> | ||
</tr> | </tr> | ||
| 行53: | 行53: | ||
<td>Kernel Type of Density (int) </td> | <td>Kernel Type of Density (int) </td> | ||
<td>0</td> | <td>0</td> | ||
| − | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
| 行72: | 行71: | ||
<td>Kernel Type of Space (int) </td> | <td>Kernel Type of Space (int) </td> | ||
<td>0</td> | <td>0</td> | ||
| − | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
| 行90: | 行88: | ||
===モードの詳細=== | ===モードの詳細=== | ||
| + | <table border="1"> | ||
| + | <tr> | ||
| + | <th>モード</th> | ||
| + | <th>説明</th> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <td>0</td> | ||
| + | <td></td> | ||
| + | </tr> | ||
| + | </table> | ||
| + | ===-kTD の詳細=== | ||
<table border="1"> | <table border="1"> | ||
<div align="left"> | <div align="left"> | ||
| 行96: | 行105: | ||
<th>説明</th> | <th>説明</th> | ||
</tr> | </tr> | ||
| − | + | <tr> | |
| + | <td>0</td> | ||
| + | <td>Gaussian</td> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <td>1</td> | ||
| + | <td>Lerentzian</td> | ||
| + | </tr> | ||
</div> | </div> | ||
</table> | </table> | ||
| + | |||
| + | ===-kTS の詳細=== | ||
| + | <table border="1"> | ||
| + | <tr> | ||
| + | <th>モード</th> | ||
| + | <th>説明</th> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <td>0</td> | ||
| + | <td>Gaussian</td> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <td>1</td> | ||
| + | <td>Lerentzian</td> | ||
| + | </tr> | ||
| + | </table> | ||
== 実行例 == | == 実行例 == | ||
| + | ===入力ファイルの画像=== | ||
| + | <table> | ||
| + | <tr> | ||
| + | <td>[[画像:Input-mrcImageBilateralFilter.png]]</td> | ||
| + | <td><p align="left">最小<br> | ||
| + | 最大<br> | ||
| + | 平均値<br> | ||
| + | 標準偏差<br> | ||
| + | 標準誤差<br></p> | ||
| + | </td> | ||
| + | <td><p align="left">0 (0, 0, 0)<br> | ||
| + | 5 (34, 41, 36)<br> | ||
| + | 0.00471829<br> | ||
| + | 0.0933498<br> | ||
| + | 0.000162869<br></p> | ||
| + | </td> | ||
| + | </tr> | ||
| + | </table> | ||
| + | |||
| + | ===オプション必須項目のみの場合=== | ||
| + | <table> | ||
| + | <tr> | ||
| + | <td>[[画像:Outdata-mrcImageBilateralFilter.png]]</td> | ||
| + | <td><p align="left">最小<br> | ||
| + | 最大<br> | ||
| + | 平均値<br> | ||
| + | 標準偏差<br> | ||
| + | 標準誤差<br></p> | ||
| + | </td> | ||
| + | <td><p align="left">0 (0, 0, 0)<br> | ||
| + | 3.07666 (34, 41, 36)<br> | ||
| + | 0.00427798<br> | ||
| + | 0.0537691<br> | ||
| + | 9.38122e-05<br></p> | ||
| + | </td> | ||
| + | </tr> | ||
| + | </table> | ||
| + | |||
| + | ===オプション -sD=== | ||
| + | ====sD=5で実行==== | ||
| + | <table> | ||
| + | <tr> | ||
| + | <td>[[画像:Outdata-sD-mrcImageBilateralFilter.png]]</td> | ||
| + | <td><p align="left">最小<br> | ||
| + | 最大<br> | ||
| + | 平均値<br> | ||
| + | 標準偏差<br> | ||
| + | 標準誤差<br></p> | ||
| + | </td> | ||
| + | <td><p align="left">0 (0, 0, 0)<br> | ||
| + | 1.28324 (38, 49, 38)<br> | ||
| + | 0.00460695<br> | ||
| + | 0.0535931<br> | ||
| + | 9.35051e-05<br></p> | ||
| + | </td> | ||
| + | </tr> | ||
| + | </table> | ||
| + | |||
| + | ===オプション -kTD=== | ||
| + | ====kTD=1で実行==== | ||
| + | <table> | ||
| + | <tr> | ||
| + | <td>[[画像:Outdata-kTD-mrcImageBilateralFilter.png]]</td> | ||
| + | <td><p align="left">最小<br> | ||
| + | 最大<br> | ||
| + | 平均値<br> | ||
| + | 標準偏差<br> | ||
| + | 標準誤差<br></p> | ||
| + | </td> | ||
| + | <td><p align="left">0 (0, 0, 0)<br> | ||
| + | 2.25561 (34, 41, 36)<br> | ||
| + | 0.00418186<br> | ||
| + | 0.0536041<br> | ||
| + | 9.35243e-05<br></p> | ||
| + | </td> | ||
| + | </tr> | ||
| + | </table> | ||
| + | |||
| + | ===オプション -sS=== | ||
| + | ====sS=10で実行==== | ||
| + | <table> | ||
| + | <tr> | ||
| + | <td>[[画像:Outdata-sS-mrcImageBilateralFilter.png]]</td> | ||
| + | <td><p align="left">最小<br> | ||
| + | 最大<br> | ||
| + | 平均値<br> | ||
| + | 標準偏差<br> | ||
| + | 標準誤差<br></p> | ||
| + | </td> | ||
| + | <td><p align="left">0 (0, 0, 0)<br> | ||
| + | 2.04458 (34, 41, 36)<br> | ||
| + | 0.00412041<br> | ||
| + | 0.0474459<br> | ||
| + | 8.278e-05<br></p> | ||
| + | </td> | ||
| + | </tr> | ||
| + | </table> | ||
| + | |||
| + | ===オプション -sS3=== | ||
| + | ====sS3=(0.1, 2.0, 0.3)で実行==== | ||
| + | <table> | ||
| + | <tr> | ||
| + | <td>[[画像:Outdata-sS3-mrcImageBilateralFilter.png]]</td> | ||
| + | <td><p align="left">最小<br> | ||
| + | 最大<br> | ||
| + | 平均値<br> | ||
| + | 標準偏差<br> | ||
| + | 標準誤差<br></p> | ||
| + | </td> | ||
| + | <td><p align="left">0 (0, 0, 0)<br> | ||
| + | 4.41127 (34, 41, 36)<br> | ||
| + | 0.00451863<br> | ||
| + | 0.066146<br> | ||
| + | 0.000115406<br></p> | ||
| + | </td> | ||
| + | </tr> | ||
| + | </table> | ||
| + | |||
| + | ===オプション -kTS=== | ||
| + | ====kTS=1で実行==== | ||
| + | <table> | ||
| + | <tr> | ||
| + | <td>[[画像:Outdata-kTS-mrcImageBilateralFilter.png]]</td> | ||
| + | <td><p align="left">最小<br> | ||
| + | 最大<br> | ||
| + | 平均値<br> | ||
| + | 標準偏差<br> | ||
| + | 標準誤差<br></p> | ||
| + | </td> | ||
| + | <td><p align="left">0 (0, 0, 0)<br> | ||
| + | 2.69849 (34, 41, 36)<br> | ||
| + | 0.00421041<br> | ||
| + | 0.0507483<br> | ||
| + | 8.85416e-05<br></p> | ||
| + | </td> | ||
| + | </tr> | ||
| + | </table> | ||
| + | |||
| + | ===オプション -kS=== | ||
| + | ====kS=10で実行==== | ||
| + | <table> | ||
| + | <tr> | ||
| + | <td>[[画像:Outdata-kS-mrcImageBilateralFilter.png]]</td> | ||
| + | <td><p align="left">最小<br> | ||
| + | 最大<br> | ||
| + | 平均値<br> | ||
| + | 標準偏差<br> | ||
| + | 標準誤差<br></p> | ||
| + | </td> | ||
| + | <td><p align="left">0 (0, 0, 0)<br> | ||
| + | 3.04982 (34, 41, 36)<br> | ||
| + | 0.00427045<br> | ||
| + | 0.053421<br> | ||
| + | 9.32049e-05<br></p> | ||
| + | </td> | ||
| + | </tr> | ||
| + | </table> | ||
| + | ===オプション -kS3=== | ||
| + | ====kS3=(0.1, 2.0, 0.3)で実行==== | ||
| + | <table> | ||
| + | <tr> | ||
| + | <td>[[画像:Outdata-kS3-mrcImageBilateralFilter.png]]</td> | ||
| + | <td><p align="left">最小<br> | ||
| + | 最大<br> | ||
| + | 平均値<br> | ||
| + | 標準偏差<br> | ||
| + | 標準誤差<br></p> | ||
| + | </td> | ||
| + | <td><p align="left">0 (0, 0, 0)<br> | ||
| + | 4.87021 (34, 41, 36)<br> | ||
| + | 0.00471256<br> | ||
| + | 0.0817567<br> | ||
| + | 0.000142643<br></p> | ||
| + | </td> | ||
| + | </tr> | ||
| + | </table> | ||
== 参考資料 == | == 参考資料 == | ||
* C. Tomasi and R. Manduchi, Bilateral Filtering for Gray and Color Images, Proceedings of the 1998 IEEE International Conference on Computer Vision, Bombay, India | * C. Tomasi and R. Manduchi, Bilateral Filtering for Gray and Color Images, Proceedings of the 1998 IEEE International Conference on Computer Vision, Bombay, India | ||
2013年11月25日 (月) 06:11時点における版
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 |
モードの詳細
| モード | 説明 |
|---|---|
| 0 |
-kTD の詳細
| モード | 説明 |
|---|---|
| 0 | Gaussian |
| 1 | Lerentzian |
-kTS の詳細
| モード | 説明 |
|---|---|
| 0 | Gaussian |
| 1 | Lerentzian |
実行例
入力ファイルの画像
![]() |
最小 最大 |
0 (0, 0, 0) 5 (34, 41, 36) |
オプション必須項目のみの場合
![]() |
最小 最大 |
0 (0, 0, 0) 3.07666 (34, 41, 36) |
オプション -sD
sD=5で実行
![]() |
最小 最大 |
0 (0, 0, 0) 1.28324 (38, 49, 38) |
オプション -kTD
kTD=1で実行
![]() |
最小 最大 |
0 (0, 0, 0) 2.25561 (34, 41, 36) |
オプション -sS
sS=10で実行
![]() |
最小 最大 |
0 (0, 0, 0) 2.04458 (34, 41, 36) |
オプション -sS3
sS3=(0.1, 2.0, 0.3)で実行
![]() |
最小 最大 |
0 (0, 0, 0) 4.41127 (34, 41, 36) |
オプション -kTS
kTS=1で実行
![]() |
最小 最大 |
0 (0, 0, 0) 2.69849 (34, 41, 36) |
オプション -kS
kS=10で実行
![]() |
最小 最大 |
0 (0, 0, 0) 3.04982 (34, 41, 36) |
オプション -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








