PROCESSIMAGES Procedure

THRESHOLD Statement

  • THRESHOLD METHOD=threshold-method <options>;

The THRESHOLD statement applies a threshold value to each pixel in an image. For more information about this statement, see the section THRESHOLD. Table 7 summarizes the options in this statement.

Table 7: THRESHOLD Statement Options

Option Description
Required Option
METHOD= Specifies the method to use in thresholding
Other Options
DELTA= Specifies the delta value to use for the ADAPTIVE_GAUSSIAN or ADAPTIVE_MEAN threshold method
KERNELSIZE= Specifies the size of the square kernel in pixels to use for the ADAPTIVE_GAUSSIAN or ADAPTIVE_MEAN threshold method
TYPE= Specifies the type of thresholding to use
VALUE= Specifies the threshold value


You must specify the following option:

METHOD=threshold-method

specifies the method of thresholding, which is either Gaussian (ADAPTIVE_GAUSSIAN) or based on the mean (ADAPTIVE_MEAN) or fixed-level (BASIC).

By default, METHOD=BASIC.

You can also specify the following options:

DELTA=number

specifies the delta value. This option is used only for the ADAPTIVE_GAUSSIAN or ADAPTIVE_MEAN threshold method.

By default, DELTA=0.

KERNELSIZE=number

specifies the size of the square kernel (in pixels) that is used in the image convolution, where number is greater than or equal to 3. This option is used only for the ADAPTIVE_GAUSSIAN or ADAPTIVE_MEAN threshold method.

By default, KERNELSIZE=3.

TYPE=BINARY |BINARY_INVERSE |OTSU |TO_ZERO |TO_ZERO_INVERSE |TRIANGLE |TRUNCATE

specifies the type of thresholding to use.

By default, TYPE=BINARY.

VALUE=number

specifies the threshold value.

Last updated: March 26, 2026