//框选模板区域
gen_circle (ROI_0, 318.869, 191.105, 51.2842)
reduce_domain (Image, ROI_0, ImageReduced)
create_shape_model (ImageReduced, 'auto', rad(-180), rad(180), 'auto', 'auto','use_polarity', 'auto', 'auto', ModelID)
get_shape_model_contours (ModelContours, ModelID, 1)
write_shape_model (ModelID, 'model.shm')
//读取模版
read_shape_model ('model.shm', ModelID1)
//查找匹配
find_shape_model (Image, ModelID1, rad(-180), rad(180), 0.6, 3, 0.8, 'least_squares', 0, 0.9, Row, Column, Angle, Score)
tuple_length (Angle, Length)
gen_cross_contour_xld (TransContours, Row, Column, 20, Angle)
halcon 图像处理之形状匹配,创建模版,保存模版,读取模版
最新推荐文章于 2024-07-30 05:22:03 发布