Filters (Spatial): Coherence-Enhancing Diffusion and Filters (Spatial): Gaussian Blur: Difference between pages

From MIPAV
(Difference between pages)
Jump to navigation Jump to search
m (1 revision imported)
 
MIPAV>Olgavovk
mNo edit summary
 
Line 1: Line 1:
=== Summary ===
This algorithm blurs an image or the VOI of the image with a Gaussian function at a user-defined scale sigma (standard deviation [SD]). In essence, convolving a Gaussian function produces a similar result to applying a low-pass or smoothing filter. A'' low-pass filter'' attenuates high-frequency components of the image (i.e., edges) and passes low-frequency components. This results in the blurring of the image. ''Smoothing filters'' are typically used for noise reduction and for blurring. The standard deviation of the Gaussian function controls the amount of blurring. A large standard deviation (i.e., > 2) significantly blurs, while a small standard deviation (i.e., 0.5) blurs less. If the objective is to achieve noise reduction, a rank filter (median) might be more useful in some circumstances.
Coherence-enhancing filtering is a specific technique within the general classification of diffusion filtering. Diffusion filtering, which models the diffusion process, is an iterative approach of spatial filtering in which image intensities in a local neighborhood are utilized to compute new intensity values.


Coherence-enhancing filtering is useful for filtering relatively thin, linear structures such as blood vessels, elongated cells, and muscle fibers.Two major advantages of diffusion filtering over many other spatial domain filtering algorithms are:
Advantages to convolving the Gaussian function to blur an image include:


* ''A' priori'' image information can be incorporated into the filtering process;
* Structure is not added to the image.
* The iterative nature of diffusion filtering allows for fine grain control over the amount of filtering performed.
* It, as well as the Fourier Transform of the Gaussian, can be analytically calculated.
* By varying the SD, a Gaussian scale space can easily be constructed.


There is not a consistent naming convention in the literature to identify different types of diffusion filters. This documentation follows the approach used by Weickert (see "References," below). Specifically, since the diffusion process relates a concentration gradient with a flux, ''isotropic diffusion'' means that these quantities are parallel. ''Regularized'' means that the image is filtered prior to computing the derivatives required during the diffusion process. In linear diffusion the filter coefficients remain constant throughout the image, while ''nonlinear'' diffusion means the filter coefficients change in response to differential structures within the image. Coherence-enhancing filtering is a regularized ''nonlinear'' diffusion that attempts to smooth the image in the direction of nearby voxels with similar intensity values.
=== Background ===


<br />
The radially symmetric Gaussian, in an ''n''-dimensional space, is:''''


=== Background ===
Equation 10 <div align "left"> </div><br />


All diffusion filters attempt to determine the image [[Image:FiltersSpatialCoherenceEnhancingDiffusion4.jpg]] that solves the well-known diffusion equation, which is a second-order partial differential defined as
[[File:FiltersSpatialGaussianBlur5.jpg]]


<math>
where [[Image:FiltersSpatialGaussianBlur6.jpg]] (referred to as the ''scale''), is the standard deviation of the Gaussian and is a free parameter that describes the width of the operator (and thus the degree of blurring) and ''n'' indicates the number of dimensions.
\partial_tI = div(D\triangledown I)
</math>


where
Geometric measurements of images can be obtained by spatially convolving (shift-invariant and linear operation) a Gaussian neighborhood operator with an image, ''I'', where [[Image:FiltersSpatialGaussianBlur7.jpg]] represents an ''n''-dimensional image. The convolution process produces a weighted average of a local neighborhood where the width of the neighborhood is a function of the scale of the Gaussian operator. The scale of the Gaussian controls the resolution of the resultant image and thus the size of the structures that can be measured. A scale-space for an image [[Image:FiltersSpatialGaussianBlur8.jpg]]of increasingly blurred images can be defined by L:nx''[[Image:FiltersSpatialGaussianBlur9.jpg]] [[Image:FiltersSpatialGaussianBlur10.jpg]]'' and ''[[Image:FiltersSpatialGaussianBlur11.jpg]]'' where [[Image:xcirclenm.jpg]] represents convolution.


;;; [[Image:FiltersSpatialCoherenceEnhancingDiffusion6.jpg]] = The time derivative of the image
The following is the calculation of the full-width half max (FWHM) of the Gaussian function.
;;; ''div'' = The divergence operator
;;; ''D'' = The diffusion tensor (which may be a scalar value)
;;; [[Image:FiltersSpatialCoherenceEnhancingDiffusion7.jpg]] = The gradient of the image


The quantity that distinguishes different diffusion filters is primarily the diffusion tensor also called the diffusivity.
<div>


In ''homogeneous linear diffusion'' filtering, the diffusivity, ''D,'' is set to 1 and the diffusion equation becomes:
{| border="1" cellpadding="5"
|+
|-
|
<math>
<math>
\partial_tI = \partial_{xx}I +\partial_{yy}I
G(x, \sigma) = \frac {1}{\sqrt {2\pi\sigma^2}}e^{-\frac {x^2} {2\sigma^2}}
</math>
</math>


In ''isotropic nonlinear diffusion'' filtering, the diffusivity term is a monotonically decreasing scalar function of the gradient magnitude squared, which encapsulates edge contrast information. In this case, the diffusion equation becomes:''''
<math>
ln 0.5 \frac {1}{\sqrt {2\pi \sigma^2}} = ln \left ( \frac {1}{\sqrt {2\pi\sigma^2}}e^{-\frac {x^2} {2\sigma^2}} \right )
</math>


<math>
<math>
\partial_tI = div (D(\left | \triangledown I \right |^2) \triangledown I
ln0.5 + ln \left ( \frac {1}{\sqrt {2\pi\sigma^2}} \right ) =ln \left ( \frac {1}{\sqrt {2\pi\sigma^2}} \right ) + ln \left (e^{-\frac {x^2} {2\sigma^2}} \right )
</math>
</math>


It is well known that derivative operations performed on a discrete grid are an ill-posed problem, meaning derivatives are overly sensitive to noise. To convert derivative operations into a well-posed problem, the image is low-pass filtered or smoothed prior to computing the derivative. ''Regularized isotropic (nonlinear) diffusion'' filtering is formulated the same as the ''isotropic nonlinear diffusion'' detailed above; however, the image is smoothed prior to computing the gradient. The diffusion equation is modified slightly to indicate regularization by including a standard deviation term in the image gradient as shown in the following equation:
<math>
-0.693 = - \frac {x^2} {2\sigma^2}
</math>


<math>
<math>
\partial_tI = div (D(\left | \triangledown I_\sigma \right |^2) \triangledown I_\sigma
1.18\sigma = x
</math>
</math>


|}


The smoothing to regularize the image is implemented as a convolution over the image and therefore this filtering operation is linear. Since differentiation is also a linear operation, the order of smoothing and differentiation can be switched, which means the derivative of the convolution kernel can be computed and convolved with the image resulting in a well-posed measure of the image derivative.


In ''edge-enhancing anisotropic diffusion'', the diffusivity function allows more smoothing parallel to image edges and less smoothing perpendicular to these edges. This variable direction smoothing means that the flux and gradient vectors no longer remaining parallel throughout the image, hence the inclusion of the term ''anisotropic'' in the filter name. Directional diffusion requires that the diffusivity function provide more information than a simple scalar value representing the edge contrast. Therefore, the diffusivity function generates a ''matrix tensor'' that includes directional information about underlying edges. We refer to a tensor-valued diffusivity function as a ''diffusivity tensor.'' In ''edge-enhancing anisotropic diffusion'', the diffusivity tensor is written as the following:
Figure 2 shows the Gaussian function. The dotted lines indicate the standard deviation of 1. The FWHM is indicated by the solid lines. For a Gaussian with a standard deviation equal to 1 ([[Image:FiltersSpatialGaussianBlur13.jpg]]), the FWHM is 2.36.
<math>
(D \left ( \triangledown I_\sigma \right )= D( \triangledown I_\sigma \triangledown I^T_\sigma)
</math>


Directional information is included by constructing an orthonormal system of eigenvectors [[Image:FiltersSpatialCoherenceEnhancingDiffusion12.jpg]] of the diffusivity tensor so that [[Image:FiltersSpatialCoherenceEnhancingDiffusion13.jpg]] and [[Image:FiltersSpatialCoherenceEnhancingDiffusion14.jpg]].
<div>


''Coherence-enhancing anisotropic diffusion'' is an extension of ''edge-enhancing anisotropic diffusion'' that is specifically tailored to enhance line-like image structures by integrating orientation information. The diffusivity tensor in this case becomes:
{| border="1" cellpadding="5"
|+ <div>'''Figure 1. Gaussian Blur algorithm processing''' </div>
|-
|
<div><div align="left">[[Image:GaussianBlurProcessing2.jpg]]</div> </div>
|}


<div align="left">[[Image:FiltersSpatialCoherenceEnhancingDiffusion15.jpg]]</div>
</div>


In this diffusivity tensor, [[Image:FiltersSpatialCoherenceEnhancingDiffusion16.jpg]] is a Gaussian kernel of standard deviation [[Image:FiltersSpatialCoherenceEnhancingDiffusion17.jpg]], which is convolved ([[Image:xcirclenm.jpg]]) with each individual component of the [[Image:FiltersSpatialCoherenceEnhancingDiffusion19.jpg]] matrix. Directional information is provided by solving the eigensystem of the diffusivity tensor without requiring [[Image:FiltersSpatialCoherenceEnhancingDiffusion20.jpg]] and [[Image:FiltersSpatialCoherenceEnhancingDiffusion21.jpg]].
Figure 1 shows a Gaussian scale-space of the sagittal view of a MR head image. The original image is shown in the upper left ([[Image:FiltersSpatialGaussianBlur14.jpg]]). Varying ''s'' from 0.5 to 5.5 in steps of 0.5 blurs the other images (from left to right and top to bottom).
 
Figure 1 shows the results of applying the coherence-enhancing anisotropic diffusion filter to an example MR knee image.


<div>
<div>


{| border="1" cellpadding="5"
{| border="1" cellpadding="5"
|+ <div>'''Figure 1. Example of coherence-enhancing diffusion''' </div>
|+ <div>'''Figure 2. Gaussian function''' </div>
|-
|-
|
|
<div> </div><div> </div><div> </div><div><div><center>[[Image:exampleCoherenceEnhancingDiffusion.jpg]]</center></div> </div>
<div><div align="left">[[Image:GaussianFunction3.jpg]]</div> </div>
|}
|}


  </div>
  </div>
Note that as the scale increases, small-scale features are suppressed. For example, at small scales the individual folds of the brain are quite defined, but, as the scale increases, these folds diffuse together resulting in the formation of a region one might define as the brain.


==== Image types ====
==== Image types ====


You can apply this algorithm to all data types except complex and to 2D, 2.5D, and 3D images.
You can apply this algorithm to all image data types except Complex and to 2D, 2.5D, 3D, and 4D images.
 
* By default, the resultant image is a float type image.
* By selecting Process each slide independently (2.5D) in the Gaussian Blur dialog box, you can achieve 2.5D blurring (each slice of the volume is blurred independently) of a 3D dataset (Figure 1).


==== Special notes ====
==== Special notes ====


The resulting image is, by default, a float image.
None.
 
==== References ====


=== Applying the Coherence-Enhancing Diffusion algorithm ===
See the following references for more information about this algorithm:
 
J. J. Koenderink, "The Structure of Images," ''Biol Cybern'' 50:363-370, 1984.
 
J. J. Koenderink and A. J. van Doorn, "Receptive Field Families," ''Biol Cybern'' 63:291-298, 1990.
 
Tony Lindeberg, "Linear Scale-Space I: Basic Theory," ''Geometry-Driven Diffusion in Computer Vision'', Bart M. Ter Har Romeney, ed. (Dordrecht, The Netherlands: Kluwer Academic Publishers, 1994), pp. 1-38.
 
R. A. Young, "The Gaussian Derivative Model for Machine Vision: Visual Cortex Simulation," ''Journal of the Optical Society of America'', GMR-5323, 1986.
 
=== Applying the Gaussian Blur algorithm ===


To run this algorithm, complete the following steps:
To run this algorithm, complete the following steps:


# Select Algorithms &gt; Filter &gt; Coherence-Enhancing Diffusion. The Coherence-Enhancing Diffusion dialog box opens (Figure 2).
# Select Algorithms &gt; Filter &gt; Gaussian Blur. The Gaussian Blur dialog box opens (Figure 3).
 
# Complete the information in the dialog box.
<div>
# Click OK.


; The algorithm begins to run, and a pop-up window appears with the status. The following message appears: "Blurring Image."
; When the algorithm finishes running, the pop-up window closes, and the results appear in either a new window or replace the image to which the algorithm was applied.
{| border="1" cellpadding="5"
{| border="1" cellpadding="5"
|+ <div>'''Figure 2. Coherence Enhancing Diffusion dialog box ''' </div>
|+ <div>'''Figure 3. Gaussian Blur dialog box ''' </div>
|-
|
<div>'''X Dimension''' </div>
|
<div>Indicates the standard deviation (SD) of Gaussian in the ''X'' direction. </div>
| rowspan="8" colspan="1" |
<div><br /> </div><div><br /> </div><div><br /> </div><div><div align="left">[[Image:dialogboxGaussianBlur.jpg]]</div> </div><div><br /> </div><div><br /> </div><div><br /> </div><div><br /> </div><div><br /> </div><div><br /> </div><div><br /> </div><div><br /> </div><div><br /> </div><div><br /> </div><div><br /> </div><div><br /> </div><div><br /> </div>
|-
|-
|
|
<div>'''Number of iterations''' </div>
<div>'''Y Dimension''' </div>
|
|
<div>Specifies the number of iterations, or number of times, to apply the algorithm to the image. </div>
<div>Indicates the SD of Gaussian in the ''Y'' direction. </div>
| rowspan="5" colspan="1" |
<div><div><center>[[Image:dialogboxCoherenceEnhancingDiffusion.jpg]]</center></div> </div>
|-
|-
|
|
<div>'''Diffusitivity denominator''' </div>
<div>'''Z Dimension''' </div>
|
|
<div>Specifies a factor that controls the diffusion elongation. </div>
<div>Indicates the SD of Gaussian in the ''Z'' direction. </div>
|-
|-
|
|
<div>'''Derivative scale space''' </div>
<div>'''Use image resolutions to normalize Z scale''' </div>
|
|
<div>Specifies the standard deviation of the Gaussian kernel that is used for regularizing the derivative operations. </div>
<div>Normalizes the Gaussian to compensate for the difference if the voxel resolution is less between slices than the voxel resolution in-plane. This option is selected by default. </div>
|-
|-
|
|
<div>'''Gaussian scale space''' </div>
<div>'''Process each slice independently (2.5D)''' </div>
|
|
<div>Specifies the standard deviation of the Gaussian filter applied to the individual components of the diffusivity tensor. </div>
<div>Blurs each slice of the dataset independently of adjacent slices. </div>
|-
|-
|
|
<div>'''Process each slice separately''' </div>
<div>'''Process red channel''' </div>
|
<div>Applies the algorithm to the red channel only. </div>
|-
|
<div>'''Process green channel''' </div>
|
<div>Applies the algorithm to the green channel only. </div>
|-
|
<div>'''Process blue channel''' </div>
|
<div>Applies the algorithm to the blue channel only. </div>
|-
|
<div>'''New image''' </div>
| rowspan="1" colspan="2" |
<div>Shows the results of the algorithm in a new image window. </div>
|-
|
<div>'''Replace image''' </div>
| rowspan="1" colspan="2" |
<div>Replaces the current active image with the results of the algorithm. </div>
|-
|
<div>'''Whole image''' </div>
| rowspan="1" colspan="2" |
<div>Applies the algorithm to the whole image. </div>
|-
|
|
<div>Applies the algorithm to each slice individually. By default, this option is selected. </div>
<div>'''VOI region(s)''' </div>
| rowspan="1" colspan="2" |
<div>Applies the algorithm to the volumes (regions) delineated by the VOIs. </div>
|-
|-
|
|
Line 135: Line 192:
<div>Displays online help for this dialog box. </div>
<div>Displays online help for this dialog box. </div>
|}
|}
</div>
# Complete the fields in the dialog box.
# When complete, click OK.
; The algorithm begins to run, and a status window appears. When the algorithm finishes, the resulting image appears in a new image window.
<div>
{| border="1" cellpadding="5"
|+ <div>'''Figure 3. Status message that appear when the Coherence-Enhancing Diffusion algorithm is running''' </div>
|-
|
<div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 1pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font size="2pt"><font color="#000000"><div><center>[[Image:messageCoherenceEnhancingDiffusion.jpg]]</center></div><br /> </font></font></div>
|}
</div><div> </div>
=== References ===
# Weickert, Joachim. "Nonlinear Diffusion Filtering," in ''Handbook of Computer Vision and Applications,'' Volume 2, eds.
# Bernd Jahne, Horst Haussecker, and Peter Geissler. (Academic Press, April 1999), 423-450.
# Weickert, Joachim. ''Anisotropic Diffusion in Image Processing'' (Stuttgart, Germany: Teubner, 1998).


[[Category:Help]]
[[Category:Help]]
[[Category:Help:Algorithms]]
[[Category:Help:Algorithms]]

Revision as of 18:17, 18 May 2012

This algorithm blurs an image or the VOI of the image with a Gaussian function at a user-defined scale sigma (standard deviation [SD]). In essence, convolving a Gaussian function produces a similar result to applying a low-pass or smoothing filter. A low-pass filter attenuates high-frequency components of the image (i.e., edges) and passes low-frequency components. This results in the blurring of the image. Smoothing filters are typically used for noise reduction and for blurring. The standard deviation of the Gaussian function controls the amount of blurring. A large standard deviation (i.e., > 2) significantly blurs, while a small standard deviation (i.e., 0.5) blurs less. If the objective is to achieve noise reduction, a rank filter (median) might be more useful in some circumstances.

Advantages to convolving the Gaussian function to blur an image include:

  • Structure is not added to the image.
  • It, as well as the Fourier Transform of the Gaussian, can be analytically calculated.
  • By varying the SD, a Gaussian scale space can easily be constructed.

Background

The radially symmetric Gaussian, in an n-dimensional space, is:'

Equation 10


FiltersSpatialGaussianBlur5.jpg

where FiltersSpatialGaussianBlur6.jpg (referred to as the scale), is the standard deviation of the Gaussian and is a free parameter that describes the width of the operator (and thus the degree of blurring) and n indicates the number of dimensions.

Geometric measurements of images can be obtained by spatially convolving (shift-invariant and linear operation) a Gaussian neighborhood operator with an image, I, where FiltersSpatialGaussianBlur7.jpg represents an n-dimensional image. The convolution process produces a weighted average of a local neighborhood where the width of the neighborhood is a function of the scale of the Gaussian operator. The scale of the Gaussian controls the resolution of the resultant image and thus the size of the structures that can be measured. A scale-space for an image FiltersSpatialGaussianBlur8.jpgof increasingly blurred images can be defined by L:nxFiltersSpatialGaussianBlur9.jpg FiltersSpatialGaussianBlur10.jpg and FiltersSpatialGaussianBlur11.jpg where Xcirclenm.jpg represents convolution.

The following is the calculation of the full-width half max (FWHM) of the Gaussian function.


Figure 2 shows the Gaussian function. The dotted lines indicate the standard deviation of 1. The FWHM is indicated by the solid lines. For a Gaussian with a standard deviation equal to 1 (FiltersSpatialGaussianBlur13.jpg), the FWHM is 2.36.

Figure 1. Gaussian Blur algorithm processing
GaussianBlurProcessing2.jpg

Figure 1 shows a Gaussian scale-space of the sagittal view of a MR head image. The original image is shown in the upper left (FiltersSpatialGaussianBlur14.jpg). Varying s from 0.5 to 5.5 in steps of 0.5 blurs the other images (from left to right and top to bottom).

Figure 2. Gaussian function
GaussianFunction3.jpg

Note that as the scale increases, small-scale features are suppressed. For example, at small scales the individual folds of the brain are quite defined, but, as the scale increases, these folds diffuse together resulting in the formation of a region one might define as the brain.

Image types

You can apply this algorithm to all image data types except Complex and to 2D, 2.5D, 3D, and 4D images.

  • By default, the resultant image is a float type image.
  • By selecting Process each slide independently (2.5D) in the Gaussian Blur dialog box, you can achieve 2.5D blurring (each slice of the volume is blurred independently) of a 3D dataset (Figure 1).

Special notes

None.

References

See the following references for more information about this algorithm:

J. J. Koenderink, "The Structure of Images," Biol Cybern 50:363-370, 1984.

J. J. Koenderink and A. J. van Doorn, "Receptive Field Families," Biol Cybern 63:291-298, 1990.

Tony Lindeberg, "Linear Scale-Space I: Basic Theory," Geometry-Driven Diffusion in Computer Vision, Bart M. Ter Har Romeney, ed. (Dordrecht, The Netherlands: Kluwer Academic Publishers, 1994), pp. 1-38.

R. A. Young, "The Gaussian Derivative Model for Machine Vision: Visual Cortex Simulation," Journal of the Optical Society of America, GMR-5323, 1986.

Applying the Gaussian Blur algorithm

To run this algorithm, complete the following steps:

  1. Select Algorithms > Filter > Gaussian Blur. The Gaussian Blur dialog box opens (Figure 3).
  2. Complete the information in the dialog box.
  3. Click OK.
The algorithm begins to run, and a pop-up window appears with the status. The following message appears
"Blurring Image."
When the algorithm finishes running, the pop-up window closes, and the results appear in either a new window or replace the image to which the algorithm was applied.
Figure 3. Gaussian Blur dialog box
X Dimension
Indicates the standard deviation (SD) of Gaussian in the X direction.



DialogboxGaussianBlur.jpg













Y Dimension
Indicates the SD of Gaussian in the Y direction.
Z Dimension
Indicates the SD of Gaussian in the Z direction.
Use image resolutions to normalize Z scale
Normalizes the Gaussian to compensate for the difference if the voxel resolution is less between slices than the voxel resolution in-plane. This option is selected by default.
Process each slice independently (2.5D)
Blurs each slice of the dataset independently of adjacent slices.
Process red channel
Applies the algorithm to the red channel only.
Process green channel
Applies the algorithm to the green channel only.
Process blue channel
Applies the algorithm to the blue channel only.
New image
Shows the results of the algorithm in a new image window.
Replace image
Replaces the current active image with the results of the algorithm.
Whole image
Applies the algorithm to the whole image.
VOI region(s)
Applies the algorithm to the volumes (regions) delineated by the VOIs.
OK
Applies the algorithm according to the specifications in this dialog box.
Cancel
Disregards any changes that you made in this dialog box and closes the dialog box.
Help
Displays online help for this dialog box.