「mrcImageBilateralFilter」の版間の差分
行154: | 行154: | ||
== 実行例 == | == 実行例 == | ||
− | ===[[Media:Input-1VOM-N-2D.mrc | 入力ファイル]]の画像=== | + | ===[[Media:Input-1VOM-N-2D.mrc | 入力ファイル]](2D)の画像=== |
<table> | <table> | ||
<tr> | <tr> | ||
行174: | 行174: | ||
− | ===オプション必須項目のみの場合=== | + | ====オプション必須項目のみの場合==== |
<table> | <table> | ||
<tr> | <tr> | ||
行194: | 行194: | ||
− | ===オプション -sD=== | + | ====オプション -sD==== |
− | ====sD=50000で実行==== | + | =====sD=50000で実行===== |
<table> | <table> | ||
<tr> | <tr> | ||
行218: | 行218: | ||
− | ===オプション -kTD=== | + | ====オプション -kTD==== |
− | ====kTD=1で実行==== | + | =====kTD=1で実行===== |
<table> | <table> | ||
<tr> | <tr> | ||
行239: | 行239: | ||
− | ===オプション -sS=== | + | ====オプション -sS==== |
− | ====sS=10で実行==== | + | =====sS=10で実行===== |
<table> | <table> | ||
<tr> | <tr> | ||
行260: | 行260: | ||
− | ===オプション - | + | ====オプション -kTS==== |
− | ==== | + | =====kTS=1, sS=10で実行===== |
<table> | <table> | ||
<tr> | <tr> | ||
− | <td>[[画像:Outdata- | + | <td>[[画像:Outdata-kTS-mrcImageBilateralFilter.png]]</td> |
<td><p align="left">最小<br> | <td><p align="left">最小<br> | ||
最大<br> | 最大<br> | ||
行271: | 行271: | ||
標準誤差<br></p> | 標準誤差<br></p> | ||
</td> | </td> | ||
− | <td><p align="left"> | + | <td><p align="left">-3198.73 (38, 0, 0)<br> |
− | + | 32222.2 (25, 39, 0)<br> | |
− | + | 7210.86<br> | |
− | + | 8040.82<br> | |
− | + | 100.51<br></p> | |
</td> | </td> | ||
</tr> | </tr> | ||
行281: | 行281: | ||
− | ===オプション - | + | ====オプション -kS==== |
− | ==== | + | =====kS=10で実行===== |
<table> | <table> | ||
<tr> | <tr> | ||
− | <td>[[画像:Outdata- | + | <td>[[画像:Outdata-kS-mrcImageBilateralFilter.png]]</td> |
<td><p align="left">最小<br> | <td><p align="left">最小<br> | ||
最大<br> | 最大<br> | ||
行292: | 行292: | ||
標準誤差<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> | ||
行302: | 行302: | ||
− | === | + | ===[[Media:Input-1VOM-N.mrc | 入力ファイル]](3D)の画像=== |
− | + | ||
<table> | <table> | ||
<tr> | <tr> | ||
− | <td>[[画像: | + | <td><p align="Center">[[画像:Input-1VOM-N.png]]<br> |
+ | xy平面<br></p> | ||
+ | </td> | ||
+ | <td><p align="Center">[[画像:Input1-1VOM-N.png]]<br> | ||
+ | yz平面<br></p> | ||
+ | </td> | ||
<td><p align="left">最小<br> | <td><p align="left">最小<br> | ||
最大<br> | 最大<br> | ||
行313: | 行317: | ||
標準誤差<br></p> | 標準誤差<br></p> | ||
</td> | </td> | ||
− | <td><p align="left">- | + | <td><p align="left">-2390.42 (77, 14, 69)<br> |
− | + | 4374.62 (17, 62, 46)<br> | |
− | + | 72.1487<br> | |
− | + | 577.82<br> | |
− | + | 0.722275<br></p> | |
</td> | </td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | ===オプション - | + | |
− | ==== | + | ====オプション -sD==== |
+ | =====sD=1000で実行===== | ||
<table> | <table> | ||
<tr> | <tr> | ||
− | <td>[[画像: | + | <td><p align="Center">[[画像:Outdata1-sD-mrcImageBilateralFilter.png]]<br> |
+ | xy平面<br></p> | ||
+ | </td> | ||
+ | <td><p align="Center">[[画像:Outdata2-sD-mrcImageBilateralFilter.png]]<br> | ||
+ | yz平面<br></p> | ||
+ | </td> | ||
<td><p align="left">最小<br> | <td><p align="left">最小<br> | ||
最大<br> | 最大<br> | ||
行333: | 行343: | ||
標準誤差<br></p> | 標準誤差<br></p> | ||
</td> | </td> | ||
− | <td><p align="left"> | + | <td><p align="left">-1272.88 (77, 14, 69)<br> |
− | + | 4131.48 (17, 62, 46)<br> | |
− | + | 67.6465<br> | |
− | + | 267.559<br> | |
− | 0. | + | 0.334449<br></p> |
</td> | </td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
+ | |||
+ | |||
+ | <div>以降はsD=1000で実行する</div> | ||
+ | |||
+ | |||
+ | ====オプション -sS3==== | ||
+ | =====sS3=(1, 0.7, 1)で実行===== | ||
+ | <table> | ||
+ | <tr> | ||
+ | <td><p align="Center">[[画像:Outdata-sS3-mrcImageBilateralFilter.png]]<br> | ||
+ | xy平面<br></p> | ||
+ | </td> | ||
+ | <td><p align="Center">[[画像:Outdata1-sS3-mrcImageBilateralFilter.png]]<br> | ||
+ | yz平面<br></p> | ||
+ | </td> | ||
+ | <td><p align="left">最小<br> | ||
+ | 最大<br> | ||
+ | 平均値<br> | ||
+ | 標準偏差<br> | ||
+ | 標準誤差<br></p> | ||
+ | </td> | ||
+ | <td><p align="left">-1459.87 (77, 14, 69)<br> | ||
+ | 4154.41 (17, 62, 46)<br> | ||
+ | 68.4469<br> | ||
+ | 284.532<br> | ||
+ | 0.355665<br></p> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | |||
+ | ====オプション -kS3==== | ||
+ | =====kS3=(2, 2, 1)で実行===== | ||
+ | <table> | ||
+ | <tr> | ||
+ | <td><p align="Center">[[画像:Outdata-kS3-mrcImageBilateralFilter.png]]<br> | ||
+ | xy平面<br></p> | ||
+ | </td> | ||
+ | <td><p align="Center">[[画像:Outdata1-kS3-mrcImageBilateralFilter.png]]<br> | ||
+ | yz平面<br></p> | ||
+ | </td> | ||
+ | <td><p align="left">最小<br> | ||
+ | 最大<br> | ||
+ | 平均値<br> | ||
+ | 標準偏差<br> | ||
+ | 標準誤差<br></p> | ||
+ | </td> | ||
+ | <td><p align="left">-1966.48 (78, 4, 26)<br> | ||
+ | 4354.27 (17, 62, 46)<br> | ||
+ | 71.3418<br> | ||
+ | 396.845<br> | ||
+ | 0.496056<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 |
2014年1月16日 (木) 02:26時点における版
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 | ローレンツ関数 |
実行例
入力ファイル(2D)の画像
![]() |
最小 最大 |
-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) |
オプション -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) |
入力ファイル(3D)の画像
最小 最大 |
-2390.42 (77, 14, 69) 4374.62 (17, 62, 46) |
オプション -sD
sD=1000で実行
最小 最大 |
-1272.88 (77, 14, 69) 4131.48 (17, 62, 46) |
オプション -sS3
sS3=(1, 0.7, 1)で実行
最小 最大 |
-1459.87 (77, 14, 69) 4154.41 (17, 62, 46) |
オプション -kS3
kS3=(2, 2, 1)で実行
最小 最大 |
-1966.48 (78, 4, 26) 4354.27 (17, 62, 46) |
参考資料
- C. Tomasi and R. Manduchi, Bilateral Filtering for Gray and Color Images, Proceedings of the 1998 IEEE International Conference on Computer Vision, Bombay, India