mrcImageBilateralFilter

From EosPedia
Revision as of 00:42, 18 July 2014 by Kinoshita (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

mrcImageBilateralFilter ismrcImageファイルを平滑化するための Eos's Command. It is a method for proposed by Tomasi and Manduchi, to smooth while maintaining the edge. It is a smoothing of weighted by the intensity difference of the image. (intensity difference, distance)をガウス分布などにより重みを計算していることにより、強度差がある領域をぼかすことなく維持できる。

Algorithm

It has two weights Wx(xi, xj) and WI(Ii,Ij), they are defined as such Lorenz function or Gaussian function of |xi-xj|, |Ii-Ij|. That is because the difference between the image becomes large near the edges、weight of Smoothing in density band that themselves belong is applied to them.

Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.):

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)


List of option

Main option

Option Essential/Optional Description Default
-i Essential Input:mrcImage NULL
-o Optional Output:mrcImage stdout(The standard output by default)
-sD Optional SigmaDensity(float) [ImageAmplitude] 2.0
-kTD Optional Kernel Type of Density (int) 0
-sS Optional SigmaSpace(float) [pixel] 1.0
-sS3 Optional SigmaSpace 3D (x:float, y:float, z:float) [pixel] 1.0 1.0 1.0
-kTS Optional Kernel Type of Space (int) 0
-kS Optional Kernel Size (int) [pixel] 1.0
-kS3 Optional Kernel Size 3D (x:int, y:int, z:int) [pixel] 1.0 1.0 1.0
-c Optional ConfigurationFile NULL
-m Optional Mode 0
-h Optional Help  

-m details

Value Description
0

-kTD details

Value Description
0 Gaussian function
1 Lorenz function

-kTS details

Value Description
0 Gaussian function
1 Lorenz function


Execution example

Input file(2D) image

Input-1VOM-N-2D.png

Min

Max
Mean
SD

SE

-18651.7 (10, 1, 0)

52942.7 (24, 39, 0)
7214.87
10067.6

125.845


Example of options only essential

Outdata-mrcImageBilateralFilter.png

Min

Max
Mean
SD

SE

-18651.7 (10, 1, 0)

52942.7 (24, 39, 0)
7214.87
10067.6

125.845


Option -sD

Case: sD=50000
Outdata-sD-mrcImageBilateralFilter.png

Min

Max
Mean
SD

SE

-3963.33 (76, 66, 0)

36164.2 (26, 29, 0)
7213.95
8271.46

103.393


In the following, Setting atsD=50000.


Option -kTD

Case: kTD=1
Outdata-kTD-mrcImageBilateralFilter.png

Min

Max
Mean
SD

SE

-4063.09 (56, 4, 0)

36357.6 (26, 29, 0)
7212.18
8280.1

103.501


Option -sS

Case: sS=10
Outdata-sS-mrcImageBilateralFilter.png

Min

Max
Mean
SD

SE

-3196.78 (38, 0, 0)

32196.3 (25, 39, 0)
7210.81
8039.59

100.495


Option -kTS

Case: kTS=1, sS=10
Outdata-kTS-mrcImageBilateralFilter.png

Min

Max
Mean
SD

SE

-3198.73 (38, 0, 0)

32222.2 (25, 39, 0)
7210.86
8040.82

100.51


Option -kS

Case: kS=10
Outdata-kS-mrcImageBilateralFilter.png

Min

Max
Mean
SD

SE

-3871.71 (76, 66, 0)

35969.2 (26, 29, 0)
7213.84
8256.51

103.206


Input file(3D) image

Input-1VOM-N.png
xy-plane

Input1-1VOM-N.png
yz-plane

Min

Max
Mean
SD

SE

-2390.42 (77, 14, 69)

4374.62 (17, 62, 46)
72.1487
577.82

0.722275


Option -sD

Case: sD=1000

Outdata1-sD-mrcImageBilateralFilter.png
xy-plane

Outdata2-sD-mrcImageBilateralFilter.png
yz-plane

Min

Max
Mean
SD

SE

-1272.88 (77, 14, 69)

4131.48 (17, 62, 46)
67.6465
267.559

0.334449


In the following, Setting atsD=1000で実行する


Option -sS3

Case: sS3=(1, 0.7, 1)

Outdata-sS3-mrcImageBilateralFilter.png
xy-plane

Outdata1-sS3-mrcImageBilateralFilter.png
yz-plane

Min

Max
Mean
SD

SE

-1459.87 (77, 14, 69)

4154.41 (17, 62, 46)
68.4469
284.532

0.355665


Option -kS3

Case: kS3=(2, 2, 1)

Outdata-kS3-mrcImageBilateralFilter.png
xy-plane

Outdata1-kS3-mrcImageBilateralFilter.png
yz-plane

Min

Max
Mean
SD

SE

-1966.48 (78, 4, 26)

4354.27 (17, 62, 46)
71.3418
396.845

0.496056


References

  • C. Tomasi and R. Manduchi, Bilateral Filtering for Gray and Color Images, Proceedings of the 1998 IEEE International Conference on Computer Vision, Bombay, India