Specifications

Histogram, Threshold, and Compare Functions
10-3
10
threshold
The threshold value to use for each pixel. The
pixel value in the output is set to the maximum
presentable value if it is greater than or equal to
the threshold value (for each channel). Otherwise
the pixel value in the output is set to the
minimum presentable value.
Discussion
The function iplThreshold() thresholds the source image
srcImage
using the value
threshold
to create the resultant image
dstImage
.The
pixel value in the output is set to the maximum presentable value (for
example, 255 for an 8-bit-per-channel image) if it is greater than or equal
to the threshold value. Otherwise it is set to the minimum presentable value
(for example, 0 for an 8-bit-per-channel image). This is done for each
channel in the input image.
To convert an image to bitonal, you can use
iplThreshold() function as
shown in Example 10-1.