Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
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.

Tutorials

If you are interested in automatic thresholding, you may have a look at

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.