Filters (Spatial) Anisotropic Diffusion and Filters (Spatial) Laplacian: Difference between pages

From MIPAV
(Difference between pages)
Jump to navigation Jump to search
MIPAV>Olga Vovk
mNo edit summary
 
MIPAV>Olga Vovk
No edit summary
 
Line 1: Line 1:
''Edge detection'' is the identification of meaningful discontinuities in gray level or color images. Edges are formed between two regions that have differing intensity values. This algorithm calculates the laplacian of an image (or VOI of the image) using the second derivatives (''Gxx'', ''Gyy'', and ''Gzz'' [3D]) of the Gaussian function at a user-defined scale sigma [standard deviation (SD)] and convolving it with image. The convolution of the second derivatives of the Gaussian with an image is a robust method of extracting edge information. By varying the SD, a scale-space of edges can easily be constructed.


=== Summary ===
=== Background ===
This algorithm anisotropically diffuses an image. That is, it blurs over regions of an image where the gradient magnitude is relatively small (homogenous regions) but diffuses little over areas of the image where the gradient magnitude is large (i.e., edges). Therefore, objects are blurred, but their edges are blurred by a lesser amount.


{| width="90%" border="1" frame="hsides" frame="hsides"
Figure 1 shows the 1D signal of an object. The first derivative of the object is shown next. Last, the Laplacian (defined later) is shown. Note that the zero-crossing of the second derivative corresponds to the edges of the object.
|-
| width="9%" valign="top" |
[[Image:exampleicon.gif]]
| width="81%" bgcolor="#B0E0E6" |
Figure 1 illustrates the relationship between anisotropic diffusion and gradient magnitude. In the figure, the original signal is noisy but two major peaks are still visible. Applying the diffusion process to the original signal and using the gradient magnitude to attenuate the diffusion process at places where the edge is strong produces a signal in which the overall signal-to-noise ratio has improved.
|}


<br /><div>
<div>


{| border="1" cellpadding="5"
{| border="1" cellpadding="5"
|+ <div>'''Figure 1. A 1D example of anisotropic diffusion ''' </div><div>Note how the noise of the diffused signal is removed while only blurring the edge a small amount. The diffusion at the edge of the signals is attenuated by using a function of the gradient magnitude. </div>
|+ <div>'''Figure 1. Edge detection using laplacian operators''' </div>
|-
|-
|
|
<div><div><center>[[Image:AnisotropicDiffusionLineChart.jpg]]</center></div> </div>
<div><div align="left">[[Image:LaplacianGrid5.jpg]]</div> </div>
|}
|}


  </div>
  </div>


=== Background ===
The laplacian function is defined as:''''
 
<math>
\triangledown^2G(x,y) = \frac {\partial^2G}{\partial x^2} + \frac {\partial^2G}{\partial y^2}
</math>


The following is the anisotropic diffusion equation:
An efficient method of calculating the laplacian is to analytically calculate the second derivatives of Gaussian and convolve the sum with the image. The equation for this calculation follows:


Equation 1 <div align "left"> </div><br />  
<div align="left">[[Image:FiltersSpatialLaplacian5.jpg]]</div> <div>


{| border="1" cellpadding="5"
{| border="1" cellpadding="5"
|+
|+ <div>'''Figure 2. (A) Original MR image; (B) laplacian results; and (C) extraction of the zero crossing of the laplacian (object edges)''' </div>
|-
|-
|
|
<div><div align="left">[[Image:FiltersSpatialAnisotropicDiffusion4.jpg]]</div> </div>
<div><div><center>[[Image:exampleLaplacianProcessing.jpg]]</center></div> </div>
|}
|}


where [[Image:FiltersSpatialAnisotropicDiffusion5.jpg]] is the variable conductance term. Typically, a function of the gradient magnitude [[Image:FiltersSpatialAnisotropicDiffusion6.jpg]], if [[Image:FiltersSpatialAnisotropicDiffusion7.jpg]] is a constant, then [[Image:FiltersSpatialAnisotropicDiffusion8.jpg]] which is the isotropic heat diffusion equation (Gaussian blurring).
</div><div><br /> </div>
 
In simple terms, the image ''I'' at some time ''t'' is given by the diffusion of the image where conductance term limits the diffusion process. This program uses a conductance term calculated by dividing a constant (''k'') divided by the square root of the sum of the squares of the normalized first order derivatives of the Gaussian function as an approximate gradient function. Figure 2 shows the result of applying this technique. The image on the left is a CT image before processing. The image on the right of it was diffused. Note the image was diffused within object boundary but to a much lesser amount near the boundaries of the objects.


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


You can apply this algorithm just to gray-scale images.
You can apply this algorithm to all image data types except complex and to 2D, 2.5D, and 3D images.


<div>
==== Special notes ====


{| border="1" cellpadding="5"
The resulting image is, by default, a float type image.
|+ <div>'''Figure 2. An image before and after applying the Anisotropic Diffusion algorithm  ''' </div><div> </div>
|-
|
<div><div><center>[[Image:exampleAnisotropicDiffusion.jpg]]</center></div> </div>
|}


</div>
To achieve 2.5D blurring (each slice of the volume is processed independently) of a 3D dataset, select Process each slice independently (2.5D) in the Laplacian dialog box (Figure 3).


==== Special notes ====
==== References ====


Refer to the section on Filters (Spatial): Nonlinear Noise Reduction.
Refer to the following references for more information about this algorithm:


==== References ====
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.


Refer to the following references for more information:
J. J. Koenderink, "The Structure of Images," ''Biol Cybern'' 50:363-370, 1984.


P. Perona and J. Malik. "Scale-Space and Edge Detection Using Anisotropic Diffusion," ''IEEE ''''Trans. Pattern Analysis and Machine Intelligence'', 12(7):629-639, July 1990.
Raphael C. Gonzalez and Richard E. Woods, ''Digital Image Processing'' (Boston: Addison-Wesley, 1992).


Bart M. Ter Romeney, ed. ''Geometry-Driven Diffusion in Computer Vision''. (Dordrecht, The Netherlands: Kluwer Academic Publishers, 1994).
=== Applying the Laplacian algorithm ===
 
<div id="ApplyingAnisotropicDiffusion"><div>
=== Applying the Anisotropic Diffusion algorithm ===


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


# Open an image.
# Select Algorithms &gt; Filter &gt; Laplacian. The Laplacian dialog box opens (Figure 3).
# Perform, as an option, any image processing, such as improving the contrast, eliminating noise, etc., on the image.
# Complete the fields in the dialog box.
# Select Algorithms &gt; Filters (spatial) &gt; Anisotropic Diffusion. The Anisotropic Diffusion dialog box (Figure 3) opens.
# When complete, click OK. The algorithm begins to run.
# Complete the information in the dialog box.
 
{| width="90%" border="1" frame="hsides" frame="hsides"
|-
| width="9%" valign="top" |
[[Image:noteicon.gif]]
| width="81%" bgcolor="#B0E0E6" | '''Note:''' Diffusing an image is a lengthy process. Give some consideration to the values you type into the Iterations and ''k'' boxes. The higher the number of iterations slows processing speed as does a small ''k'' value.
|}
 
<br />
 
# Click OK. The algorithm begins to run.


; A pop-up window appears with the status. The following message appears: "Diffusing image."
; A pop-up window appears with the status. The following message appears: "Calculating the Laplacian."
; When the algorithm finishes running, the pop-up window closes.
; When the algorithm finishes, the pop-up window closes. Depending on whether you selected New Image or Replace Image, the results either appear in a new window or replace the image to which the algorithm was applied.
; Depending on whether you selected New image or Replace image, the results appear in a new window or replace the image to which the algorithm was applied.


<div>
<div>.


{| border="1" cellpadding="5"
{| border="1" cellpadding="5"
|+ <div>'''Figure 3. Anisotropic Diffusion dialog box  ''' </div>
|+ <div>'''Figure 3. Laplacian dialog box  ''' </div>
|-
|-
|
|
<div>'''X dimension <br />(0.5 - 5.0)*''' </div>
<div>'''X Dimension''' </div>
|
|
<div>Indicates the standard deviation (SD) of Gaussian in the ''X'' direction. </div>
<div>Specifies the standard deviation (SD) of Gaussian in the ''X'' direction. </div>
| rowspan="6" colspan="1" |
| rowspan="6" colspan="1" |
<div><div><center>[[Image:dialogboxAnisotropicDiffusion.jpg]]</center></div> </div><div> </div>
<div><div><center>[[Image:dialogboxLaplacian.jpg]]</center></div> </div><div><br /> </div><div><br /> </div>
|-
|
<div>'''Y Dimension''' </div>
|
<div>Specifies the SD of Gaussian in the ''Y'' direction. </div>
|-
|-
|
|
<div>'''Y dimension <br />(0.5 - 5.0)*''' </div>
<div>'''Z Dimension''' </div>
|
|
<div>Indicates the SD of Gaussian in the ''Y'' direction. </div>
<div>Specifies the SD of Gaussian in the ''Z'' direction. </div>
|-
|-
|
|
<div>'''Z dimension <br />(0.5 - 5.0)*''' </div>
<div>'''Amplification factor''' </div>
|
|
<div>Indicates the SD of Gaussian in the ''Z'' direction. </div>
<div>Applies, by default, the classical laplacian factor of 1.0; values greater than 1.0 and less than 1.2 enable the laplacian to act as a high-pass, or high-boost, filter. </div>
|-
|-
|
|
<div>'''Use image resolutions to normalize Z scale''' </div>
<div>'''Use image resolutions to normalize Z scale''' </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>Normalizes the Gaussian to compensate for the difference if the voxel resolution is less than the voxel resolution inplane. </div>
|-
|-
|
|
<div>'''Process each slice independently (2.5D)''' </div>
<div>'''Process each edge independently (2.5D)''' </div>
|
|
<div>Blurs each slice of the dataset independently. </div>
<div>Blurs each slice of the dataset independently. </div>
|-
|-
|
|
<div>'''Iterations <br />(1-1000)''' </div>
<div>'''Output edge image''' </div>
|
| rowspan="1" colspan="2" |
<div>Specifies the number of times the process is run. </div>
<div>Produces a binary image that represents the edges defined by the 0 crossings of the laplacian </div>
|-
|-
|
|
<div>'''k (k &gt; 1 slows diffusion)''' </div>
<div>'''Threshold edge noise between &lt;_&gt; and &lt;_&gt;''' </div>
| rowspan="1" colspan="2" |
| rowspan="1" colspan="2" |
<div>Specifies the constant used to control the blurring rate. A small value slows the diffusion process (especially across edges) per iteration. A large value speeds the diffusion process but also allows for diffusion (blurring across edges); it also makes this function act similar to Gaussian blurring. See equation above. </div>
<div>Limits the threshold edge noise to the range that you specify between the 0 crossings of the laplacian; the default range is -10 to 10. </div>
|-
|-
|
|
Line 149: Line 129:
|-
|-
|
|
<div>'''VOI regions''' </div>
<div>'''VOI region(s)''' </div>
| rowspan="1" colspan="2" |
| rowspan="1" colspan="2" |
<div>Applies the algorithm to the volumes (regions) delineated by the VOIs. </div>
<div>Applies the algorithm to the volumes (regions) delineated by the VOIs. </div>
Line 156: Line 136:
<div>'''OK''' </div>
<div>'''OK''' </div>
| rowspan="1" colspan="2" |
| rowspan="1" colspan="2" |
<div>Applies the algorithm according to the specifications in this dialog box. </div>
<div>Applies the laplacian algorithm according to the specifications in this dialog box. </div>
|-
|-
|
|
<div>'''Cancel''' </div>
<div>'''Cancel''' </div>
| rowspan="1" colspan="2" |
| rowspan="1" colspan="2" |
<div>Disregards any changes you made in this dialog box and closes the dialog box. </div>
<div>Disregards any changes that you made in this dialog box and closes the dialog box. </div>
|-
|-
|
|
Line 167: Line 147:
| rowspan="1" colspan="2" |
| rowspan="1" colspan="2" |
<div>Displays online help for this dialog box. </div>
<div>Displays online help for this dialog box. </div>
|-
| rowspan="1" colspan="3" |
<div><nowiki>*An SD greater than 1 attenuates small scale edges typically caused by noise, but reduces edge accuracy.</nowiki> </div>
|}
|}


</div>
== See also: ==
 
**[[Fast Fourier Transformation (FFT)]]
**[[Filters (Spatial): Adaptive Noise Reduction]]
**[[Filters (Frequency)]]
**[[Filters (Spatial): Adaptive Path Smooth]]
**[[Filters (Spatial) Anisotropic Diffusion]]
**[[Filters (Spatial): Coherence-Enhancing Diffusion]]
**[[Filters (Spatial): Gaussian Blur]]
**[[Filters (Spatial): Gradient Magnitude]]
**[[Filters (Spatial): Haralick Texture]]
**[[Filters (Spatial) Laplacian]]
**[[Filters (Spatial): Local Normalization]]
**[[Filters (Spatial): Mean]]
**[[Filters (Spatial): Median]]
**[[Filters (Spatial): Mode]]
**[[Filters (Spatial): Nonlinear Noise Reduction]]
**[[Filters (Spatial): Nonmaximum Suppression]]
**[[Filters (Spatial): Regularized Isotropic (Nonlinear) Diffusion]]
**[[Filters (Spatial): Slice Averaging]]
**[[Filters (Spatial): Unsharp Mask]]
 
[[Category:Help]]
[[Category:Help]]
[[Category:Help:Algorithms]]
[[Category:Help:Algorithms]]

Revision as of 17:20, 9 August 2012

Edge detection is the identification of meaningful discontinuities in gray level or color images. Edges are formed between two regions that have differing intensity values. This algorithm calculates the laplacian of an image (or VOI of the image) using the second derivatives (Gxx, Gyy, and Gzz [3D]) of the Gaussian function at a user-defined scale sigma [standard deviation (SD)] and convolving it with image. The convolution of the second derivatives of the Gaussian with an image is a robust method of extracting edge information. By varying the SD, a scale-space of edges can easily be constructed.

Background

Figure 1 shows the 1D signal of an object. The first derivative of the object is shown next. Last, the Laplacian (defined later) is shown. Note that the zero-crossing of the second derivative corresponds to the edges of the object.

Figure 1. Edge detection using laplacian operators
LaplacianGrid5.jpg

The laplacian function is defined as:'

An efficient method of calculating the laplacian is to analytically calculate the second derivatives of Gaussian and convolve the sum with the image. The equation for this calculation follows:

FiltersSpatialLaplacian5.jpg
Figure 2. (A) Original MR image; (B) laplacian results; and (C) extraction of the zero crossing of the laplacian (object edges)
ExampleLaplacianProcessing.jpg

Image types

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

Special notes

The resulting image is, by default, a float type image.

To achieve 2.5D blurring (each slice of the volume is processed independently) of a 3D dataset, select Process each slice independently (2.5D) in the Laplacian dialog box (Figure 3).

References

Refer to the following references for more information about this algorithm:

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.

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

Raphael C. Gonzalez and Richard E. Woods, Digital Image Processing (Boston: Addison-Wesley, 1992).

Applying the Laplacian algorithm

To run this algorithm, complete the following steps:

  1. Select Algorithms > Filter > Laplacian. The Laplacian dialog box opens (Figure 3).
  2. Complete the fields in the dialog box.
  3. When complete, click OK. The algorithm begins to run.
A pop-up window appears with the status. The following message appears
"Calculating the Laplacian."
When the algorithm finishes, the pop-up window closes. Depending on whether you selected New Image or Replace Image, the results either appear in a new window or replace the image to which the algorithm was applied.
.
Figure 3. Laplacian dialog box
X Dimension
Specifies the standard deviation (SD) of Gaussian in the X direction.
DialogboxLaplacian.jpg


Y Dimension
Specifies the SD of Gaussian in the Y direction.
Z Dimension
Specifies the SD of Gaussian in the Z direction.
Amplification factor
Applies, by default, the classical laplacian factor of 1.0; values greater than 1.0 and less than 1.2 enable the laplacian to act as a high-pass, or high-boost, filter.
Use image resolutions to normalize Z scale
Normalizes the Gaussian to compensate for the difference if the voxel resolution is less than the voxel resolution inplane.
Process each edge independently (2.5D)
Blurs each slice of the dataset independently.
Output edge image
Produces a binary image that represents the edges defined by the 0 crossings of the laplacian
Threshold edge noise between <_> and <_>
Limits the threshold edge noise to the range that you specify between the 0 crossings of the laplacian; the default range is -10 to 10.
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 laplacian 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.

See also: