Reputation: 31
In Gaussian adaptive thresholding, the threshold is calculated according to the local area in the image. What is the algorithm used in Gaussian adaptive thresholding?
Upvotes: 0
Views: 4007
Reputation: 28950
From the OpenCV manual:
void cv::adaptiveThreshold ( InputArray src,
OutputArray dst,
double maxValue,
int adaptiveMethod,
int thresholdType,
int blockSize,
double C
)
where T(x,y) is a threshold calculated individually for each pixel (see adaptiveMethod parameter)....
adaptiveMethod Adaptive thresholding algorithm to use, see cv::AdaptiveThresholdTypes. The BORDER_REPLICATE | BORDER_ISOLATED is used to process boundaries.
the threshold value T(x,y) is a weighted sum (cross-correlation with a Gaussian window) of the blockSize×blockSize neighborhood of (x,y) minus C . The default sigma (standard deviation) is used for the specified blockSize . See cv::getGaussianKernel
For even better information read the source code:
https://github.com/opencv/opencv/blob/master/modules/imgproc/src/thresh.cpp
Upvotes: 2