Visual Servoing Platform  version 3.6.1 under development (2024-07-27)
Automatic thresholding

Functions

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

Detailed Description

Automatic thresholding using various well-known methods.

Input image.
Image automatically thresholded with the Otsu method.

Function Documentation

◆ autoThreshold()

VISP_EXPORT unsigned char VISP_NAMESPACE_NAME::autoThreshold ( VISP_NAMESPACE_ADDRESSING vpImage< unsigned char > &  I,
const 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.