创建模型:create_metrology_model
设置图像大小:set_metrology_model_image_size
添加测量模型:add_metrology_object_rectangle2_measure
设置对象参数:set_metrology_object_param
设置模型参数:set_metrology_model_param
对齐测量模型:align_metrology_model
应用测量模型:apply_metrology_model
获取结果:get_metrology_object_result
显示结果:get_metrology_object_result_contour、get_metrology_object_measures
create_metrology_model(MetrologyHandle)
set_metrology_model_image_size(MetrologyHandle, Width, Height)
*前面找圆的部分已省略,row, col为圆心坐标
add_metrology_object_circle_measure(MetrologyHandle, Row2, Column2, Radius, 50, 10, 1, 100, [], [], Index)
*想要查找的实例数量
set_metrology_object_param (MetrologyHandle, Index, 'num_instances', 2)
*分值过低,有可能会找到非圆
set_metrology_object_param (MetrologyHandle, Index, 'min_score', 0.6)
*标尺的数量,数量越大,标尺就越密。
set_metrology_object_param (MetrologyHandle, Index, 'num_measures', 40)
apply_metrology_model(Image, MetrologyHandle)
get_metrology_object_measures(Contours, MetrologyHandle, 'all', 'all', Row1, Column1)
get_metrology_object_result(MetrologyHandle, 'all', 'all', 'result_type', 'row', Parameter1)
get_metrology_object_result(MetrologyHandle, 'all', 'all', 'result_type', 'column', Parameter2)
get_metrology_object_result(MetrologyHandle, 'all', 'all', 'result_type', 'radius', Parameter3)
get_metrology_object_result_contour(Contour1, MetrologyHandle, 'all', 'all', 1.5)