Point Operation
#include "dip_point.h"
dip_Error dip_Threshold ( in, out, threshold, foreground, background, binaryOutput )
integer, float
This function thresholds an image at the threshold value. If the boolean binaryOutput is true, Threshold will produce a binary image. Otherwise an image of the same type as the input image is produced, with the pixels set to either foreground or background. In other words: out = ( in >= threshold ? foreground : background)
Data type | Name | Description |
dip_Image | in | Input image |
dip_Image | out | Output image |
dip_float | threshold | Threshold value |
dip_float | foreground | Foreground value |
dip_float | background | Background value |
dip_Boolean | binaryOutput | Convert output image to binary |
See section 10.3, "Segmentation", in Fundamentals of Image Processing.
RangeThreshold, SelectValue, NotZero, Compare, HysteresisThreshold, IsodataThreshold, Clip