标签:autot 参考 max cpp absolute hal his https 图片
1、原理参考:https://www.cnblogs.com/guopengfei/p/4759569.html
2、公式推导:
3、同halcon的binary_threshold (Image, Region, ‘max_separability‘, ‘light‘, UsedThreshold3)算子。
具体推导如下:
gray_histo (Region, Image, AbsoluteHisto, RelativeHisto) nAveragray:=0 for Index := 0 to 255 by 1 nAveragray:=nAveragray+RelativeHisto[Index]*Index endfor wk:=0.0 uk:=0.0 MaxDiff:=0.0 Diff:=0.0 AutoThre:=0 for Index := 0 to 255 by 1 wk:=wk+RelativeHisto[Index] uk:=uk+RelativeHisto[Index]*Index if(wk<=0.0 or wk>=1.0) Diff:=0 else Diff:=(nAveragray*wk-uk)*(nAveragray*wk-uk )/(wk*(1-wk)) endif if(Diff>MaxDiff) MaxDiff:=Diff AutoThre:=Index endif endfor
标签:autot 参考 max cpp absolute hal his https 图片
原文地址:https://www.cnblogs.com/baiyy-daheng/p/11421537.html