31.11、几何定位---实例六(异步缩放)

目标:定位下图中x、y方向都有放缩的目标。

 

 

read_image (Image, 'smd/smd_capacitors_01')

 

dev_set_draw ('margin')

draw_region (Region, 3600)

draw_region (Region1, 3600)

difference (Region, Region1, RegionDifference)

reduce_domain (Image, RegionDifference, ImageReduced)

*Contrast--'auto'---[40,50,60]--[40,50,5]

 

create_aniso_shape_model (ImageReduced, 'auto', rad(-10), rad(20), 'auto', 0.6, 2, 'auto', 0.7, 1.4, 'auto', 'auto', 'use_polarity', 'auto', 'auto', ModelID)

get_shape_model_contours (ModelContours, ModelID, 1)

find_aniso_shape_model (Image, ModelID, rad(-10), rad(20), 0.6, 2, 0.7, 1.4, 0.5, 7, 0.5, 'least_squares', 0, 0.9, Row, Column, Angle, ScaleR, ScaleC, Score)

dev_display_shape_matching_results (ModelID, 'red', Row, Column, Angle, ScaleR, ScaleC, 0)

posted @ 2022-05-10 23:06  ihh2021  阅读(63)  评论(0编辑  收藏  举报