Otsu's method大津法/最大类间方差(Otsu)

原文地址

维基百科解析

大津法由大津(otsu)于1979年提出,对图像Image,记t为前景与背景的分割阈值,前景点数占图像比例为w0,平均灰度为u0;背景点数占图像比例为w1,平均灰度为u1。图像的总平均灰度为:u=w0*u0+w1*u1。从最小灰度值到最大灰度值遍历t,当t使得值g=w0*(u0-u)2+w1*(u1-u)2 最大时t即为分割的最佳阈值。对大津法可作如下理解:该式实际上就是类间方差值,阈值t分割出的前景和背景两部分构成了整幅图像,而前景取值u0,概率为 w0,背景取值u1,概率为w1,总均值为u,根据方差的定义即得该式。因方差是灰度分布均匀性的一种度量,方差值越大,说明构成图像的两部分差别越大, 当部分目标错分为背景或部分背景错分为目标都会导致两部分差别变小,因此使类间方差最大的分割意味着错分概率最小。



亦称:最大类间方差(Otsu)


直接应用大津法计算量较大,因此我们在实现时采用了等价的公式g=w0*w1*(u0-u1)2。


In Otsu's method we exhaustively search for the threshold that minimizes the intra-class variance, defined as a weighted sum of variances of the two classes:


sigma^2_w(t)=omega_1(t)sigma^2_1(t)+omega_2(t)sigma^2_2(t)
Weights ωi are the probabilities of the two classes separated by a threshold t and sigma^2_ i variances of these classes.


Otsu shows that minimizing the intra-class variance is the same as maximizing inter-class variance:[2]
sigma^2_b(t)=sigma^2-sigma^2_w(t)=omega_1(t)omega_2(t)left[mu_1(t)-mu_2(t)right]^2
which is expressed in terms of class probabilities ωi and class means μi which in turn can be updated iteratively. This idea yields an effective algorithm.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值