DIPlib Documentation - ©1995-2008 Quantitative Imaging Group, Delft University of Technology.

Threshold

Point Operation

SYNOPSIS

#include "dip_point.h"

dip_Error dip_Threshold ( in, out, threshold, foreground, background, binaryOutput )

DATA TYPES

integer, float

FUNCTION

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)

ARGUMENTS

Data typeNameDescription
dip_ImageinInput image
dip_ImageoutOutput image
dip_floatthresholdThreshold value
dip_floatforegroundForeground value
dip_floatbackgroundBackground value
dip_BooleanbinaryOutputConvert output image to binary

SEE ALSO

See section 10.3, "Segmentation", in "Fundamentals of Image Processing".

RangeThreshold, SelectValue, NotZero, Compare, HysteresisThreshold, IsodataThreshold, Clip

DIPlib on-line documentation | Function reference | Global function index