工控编程吧

标题: halcon euler_number函数介绍 [打印本页]

作者: qq263946146    时间: 2019-5-16 14:14
标题: halcon euler_number函数介绍
euler_number(Regions : : : EulerNumber)
euler_number计算欧拉数,
即,连接部件的数量与孔的数量之差。


如果传递多个区域,则结果存储在元组中,
元组中值的索引对应于输入中区域的索引。

例程
gen_circle (Circle, 200, 200, 100.5)
gen_circle (Circle1, 200, 150, 20)
gen_circle (Circle2, 200, 250, 20)
difference (Circle, Circle2, RegionDifference)
difference (RegionDifference, Circle1, RegionDifference)
euler_number (RegionDifference, EulerNumber)


区域RegionDifference内有两个孔洞,一个连接组件,
所计算欧拉数为1-2=-1个


[halcon]1[/halcon]






欢迎光临 工控编程吧 (https://www.gkbc8.com/) Powered by Discuz! X3.4