opencv自适应阈值原理
1、先将原图像进行平滑(均值平滑,中值平滑,高斯平滑…),得到一个平滑后的图像记为smoothImg;
2、得到自适应矩阵 Thresh = (1-ratio)*smoothImg ; ratio一般为0.15
3、利用局部阈值进行分割 , 即利用Thresh和原图进行比较分割
优点是对于光照不均匀的图像进行二值化处理,相对会比全局性的二值化(OTSU算法和最大熵算法、全局Thresh)效果会好。
adaptiveThreshold参数意义
@param src Source 8-bit single-channel image.
@param dst Destination image of the same size and the same type as src.
@param maxValue Non-zero value assigned to the pixels for which the condition is satisfied
@param adaptiveMethod Adaptive thresholding algorithm to use, see #AdaptiveThresholdTypes.
The #BORDER_REPLICATE | #BORDER_ISOLATED is used to process boundaries.
@param thresholdType Thresholding type that must be either #THRESH_BINARY or #THRESH_BINARY_INV,
see #ThresholdTypes.
@param blockSize Size of a pixel neighborhood that is used to calculate a threshold value for the
pixel: 3, 5, 7, and so on.
@param C Constant subtracted from the mean or
OpenCV自适应阈值原理及参数意义

最低0.47元/天 解锁文章
1974

被折叠的 条评论
为什么被折叠?



