Skip to main content
. Author manuscript; available in PMC: 2018 May 22.
Published in final edited form as: Int J Numer Method Biomed Eng. 2017 Feb 10;33(11):10.1002/cnm.2862. doi: 10.1002/cnm.2862

Table 1.

Pseudo-code of the local SAG filtering based image normalization method

  1. Get grayscale image Ig and σGauss

  2. Calculate the mean value μGauss with cumulative distribution function by assigning zero to the mean and σGauss

  3. Apply Gaussian filtering with the grayscale image, μGauss and σGauss to obtain the first filtered image (If 1), whose values are used as μ(x, y) in equation (5)

  4. Take difference of the grayscale image and filtered image (If 1) to generate a new image, which we called as IDifference that correspond to the nominator in equation (4) (i.e., IDifference IgIf 1)

  5. Obtain a temporary image, Itemp, by calculating squares of intensity values in the image IDifference (i.e., ITemp IDifference^2)

  6. Apply Gaussian filtering with the image ITemp, μGauss and σGauss to obtain the second filtered image (If 2).

  7. Calculate square root of all intensity values in the image If 2 to generate a new image, IDenominator, which correspond to the denominator in equation (5).

  8. Obtain the normalized image by dividing intensity values in the image IDifference to the intensity values in the image IDenominator.