ITK Pre-Processing Algorithm Wrappers in Python/OpeningByReconstruction

From FarsightWiki
(Difference between revisions)
Jump to: navigation, search
m
m
 
Line 9: Line 9:
  
 
[[ITK_Pre-Processing_Algorithm_Wrappers_in_Python|Back to main page]]
 
[[ITK_Pre-Processing_Algorithm_Wrappers_in_Python|Back to main page]]
 +
 +
Following are some images obtained by performing Opening by reconstruction on the image [[:Image:seg_orig.jpg|seg_orig]]. Figures 1, 2, and 3 show how the radius of the structuring element affects the opening process. Notice that as the radius increases, very small objects slowly start disappearing from the image. However, the shape of the object does not change when compared to the original image. Comparison of figures 3 and 4 show the effect of toggling the PreserveIntensities parameter. When PreserveIntensities is switched OFF, the intensities of objects is reduced. Comparison of figures 3 and 5 shows the effect of toggling the FullyConnected parameter. For all the images, the value of the parameter used are given in the captions.
 +
 +
[[Image:Openingbyrecon_seg_orig_pres1_rad1_conn1.jpg|left|frame|Fig. 1: PreserveIntensity = True, Radius = 1, FullyConnected = True]]
 +
[[Image:Openingbyrecon_seg_orig_pres1_rad3_conn1.jpg|center|frame|Fig. 2: PreserveIntensity = True, Radius = 3, FullyConnected = True]]
 +
[[Image:Openingbyrecon_seg_orig_pres1_rad5_conn1.jpg|left|frame|Fig. 3: PreserveIntensity = True, Radius = 5, FullyConnected = True]]
 +
[[Image:Openingbyrecon_seg_orig_pres0_rad5_conn1.jpg|center|frame|Fig. 4: PreserveIntensity = False, Radius = 5, FullyConnected = True]]
 +
[[Image:Openingbyrecon_seg_orig_pres1_rad5_conn0.jpg|left|frame|Fig. 5: PreserveIntensity = True, Radius = 5, FullyConnected = False]]

Latest revision as of 21:18, 30 July 2009

Opening by Reconstruction Image Filter

Opening by Reconstruction is implemented using the itkOpeningByReconstructionImageFilter class in ITK. This algorithm is different from the morphogical opening. First, the image is subject to normal grayscale erosion. Then, the dilation is performed with reconstruction. The result of applying this filter is the following - small regions of the foreground that cannot contain the structuring element are removed. The shapes of the remaining foreground regions is preserved. Unless the parameter PreserveIntensities is selected, the intensities of the brightest pixels are brought down.

Parameters:

  • 1. Radius - this describes the radius of the structuring element used. As of now, the binary ball structuring element is used.
  • 2. PreserveIntensities - this is a binary variable, where it takes 1 (for True) and 0 (for False). The assigned true, then the intensities of the foreground regions that are reconstructed are maintained as the original image.
  • 3. FullyConnected - this describes the connectedness of the pixels. It is a binary variable with values 1 (for True) and 0 (for False). If FullyConnected is False, then the connectivity of pixels is defined as only face connectivity. This corresponds to the 4-neighbour connectivity for 2-D images and 6-neighbour connectivity for 3-D images. If FullyConnected is chosen to be True, then the connectivity of pixels is defined as face+edge+vertex connectivity. This is also known as 8-neighbour connectivity in 2-D images and 26-neighbour connectivity in 3-D images.

Back to main page

Following are some images obtained by performing Opening by reconstruction on the image seg_orig. Figures 1, 2, and 3 show how the radius of the structuring element affects the opening process. Notice that as the radius increases, very small objects slowly start disappearing from the image. However, the shape of the object does not change when compared to the original image. Comparison of figures 3 and 4 show the effect of toggling the PreserveIntensities parameter. When PreserveIntensities is switched OFF, the intensities of objects is reduced. Comparison of figures 3 and 5 shows the effect of toggling the FullyConnected parameter. For all the images, the value of the parameter used are given in the captions.

Fig. 1: PreserveIntensity = True, Radius = 1, FullyConnected = True
Fig. 2: PreserveIntensity = True, Radius = 3, FullyConnected = True
Fig. 3: PreserveIntensity = True, Radius = 5, FullyConnected = True
Fig. 4: PreserveIntensity = False, Radius = 5, FullyConnected = True
Fig. 5: PreserveIntensity = True, Radius = 5, FullyConnected = False
Personal tools