learning opencv3: 十:Threshold Operations

 

 

Adaptive Threshold
cv::adaptiveThreshold() allows for two different adaptive threshold types depend‐
ing on the settings of adaptiveMethod. In both cases, we set the adaptive threshold
T(x, y) on a pixel-by-pixel basis by computing a weighted average of the b × b region
around each pixel location minus a constant, where b is given by blockSize and the
constant is given by C. If the method is set to cv::ADAPTIVE_THRESH_MEAN_C, then all
pixels in the area are weighted equally. If it is set to cv::ADAPTIVE_THRESH_GAUS
SIAN_C, then the pixels in the region around (x, y) are weighted according to a Gaus‐
sian function of their distance from that center point.
 

The adaptive threshold technique is useful when there are strong illumination or
reflectance gradients that you need to threshold relative to the general intensity gra‐
dient. This function handles only single-channel 8-bit or floating-point images, and it
requires that the source and destination images be distinct.
 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值