Visual Servoing Platform  version 3.2.0 under development (2019-01-22)
Automatic thresholding

Functions

VISP_EXPORT unsigned char vp::autoThreshold (vpImage< unsigned char > &I, const vp::vpAutoThresholdMethod &method, const unsigned char backgroundValue=0, const unsigned char foregroundValue=255)
 

Detailed Description

Automatic thresholding using various well-known methods.

img-auto-threshold-grid36-03.png
Input image.
img-auto-threshold-grid36-03-otsu.png
Image automatically thresholded with the Otsu method.

Function Documentation

unsigned char vp::autoThreshold ( vpImage< unsigned char > &  I,
const vp::vpAutoThresholdMethod method,
const unsigned char  backgroundValue = 0,
const unsigned char  foregroundValue = 255 
)

Automatic thresholding.

Parameters
I: Input grayscale image.
method: Automatic thresholding method.
backgroundValue: Value to set to the background.
foregroundValue: Value to set to the foreground.
Examples:
testAutoThreshold.cpp, tutorial-autothreshold.cpp, tutorial-contour.cpp, and tutorial-count-coins.cpp.

Definition at line 374 of file vpThreshold.cpp.

References vp::AUTO_THRESHOLD_HUANG, vp::AUTO_THRESHOLD_INTERMODES, vp::AUTO_THRESHOLD_ISODATA, vp::AUTO_THRESHOLD_MEAN, vp::AUTO_THRESHOLD_OTSU, vp::AUTO_THRESHOLD_TRIANGLE, vpImageTools::binarise(), and vpImage< Type >::getSize().