ITK Pre-Processing Algorithm Wrappers in Python/SigmoidFilter

From FarsightWiki
Jump to: navigation, search

Sigmoid filter

This filter is implemented using the class itkSigmoidImageFilter in ITK. The sigmoid filter is used to highlight a range of intensities of the input image, and smoothly cutting off the values beyond it. It is often used as a pre-processing step for segmentation algorithms. With appropriate choice of parameters, we could consider the sigmoid filter as a contrast enhancement filter also.

The equation used for finding the output pixel intensities is given by y = (M - m)\frac {1}{1 + e^{- \frac {x-\beta}{\alpha}} } + m , where y and x represent the output and input image pixel intensities, M and m represent the maximum and the minimum output image pixel intensities, respectively. α and β are the other two parameters for the filter, and they are described below.

Parameters:

  • 1. Beta - this parameter controls the point around which the input intensity range is centered. The value of beta chooses the pixel intensity that needs to be highlighted. For example, if the foreground pixels of an image are centered around the value of 200, and we would like to highlight the foreground, we should choose beta to be 150.
  • 2. Alpha - this parameter controls the width of the input intensity range. This defines the range of values around beta that need to be highlighted. Continuing the example above, the foreground could belong to a range of [140,160], in the scale of pixel intensities. The value of alpha should be 10 and the value of beta should be 150. Note that this does not mean that all the values outside this range will be mapped to the minimum and the maximum value. How quickly the values away from beta are mapped to the output minimum and maximum values are determined by the value of Alpha.
  • 3. OutputMaximum - the maximum value of the output pixel intensity. All the values of the output pixel are mapped between the OutputMinimum and OutputMaximum values.
  • 4. OutputMinimum - the minimum value of the output pixel intensity.

Below is an example of an image obtained using the Sigmoid filter. The values of the parameters used are given in the captions. Figure 1 shows the case when we are interested in increasing the contrast of pixels near the grayscale intensity of 150 (8-bit), with an alpha value of 5, for the image seg_orig. The minimum and maximum output pixel intensities are 30 and 240, respectively. (A better example will be added soon.)

Back to main page.

Fig. 1: Sigmoid filter applied on seg_orig, with α = 5, β = 150, output minimum = 30, and output maximum = 240.
Personal tools