工控编程吧

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

作者: qq263946146    时间: 2019-5-16 12:14
标题: halcon eccentricity函数介绍
eccentricity(Regions : : : Anisometry, Bulkiness, StructureFactor)
函数用于计算Regions 的三个形状属性Anisometry, Bulkiness, StructureFactor
Anisometry = Ra/Rb
Bulkiness = π*Ra*Rb/A
StructureFactor = Anisometry *Bulkiness -1
Ra,Rb为椭圆两半径(参考elliptic_axis),
A为区域面积(参考area_center)。

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

如果没有设置其他行为,
则在空区域中所有参数的值都为0.0(请参见set_system)。


例程
read_image (Image, 'printer_chip/printer_chip_01')
threshold (Image, Region, 140, 255)
connection (Region, ConnectedRegions)
select_shape (ConnectedRegions, SelectedRegions, 'area', 'and', 25000, 100000)
select_obj (SelectedRegions, ObjectSelected, 1)
eccentricity (ObjectSelected, Anisometry, Bulkiness, StructureFactor)







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