- read_image (Image , 'src.png')
- gen_contour_polygon_xld (ROI_0, [372.25,352.001,370.87,392.5,371.79], [383.282,646.539,645.999,383.282,383.282])
- create_shape_model_xld (ROI_0, 2, rad(-1), rad(2), 'auto', 'auto', 'ignore_local_polarity', 5, ModelID)
- find_shape_model (Image , ModelID, rad(-1), rad(2), 0.7, 0, 0.1, 'least_squares', 0, 0.9, Row, Column, Angle, Score)
- dev_set_color ('green')
- dev_display_shape_matching_results2 (Contours, ModelID, 'red', Row, Column, Angle, 1, 1, 0)
- sort_contours_xld (Contours, SortedContours, 'upper_left', 'true', 'row')
- area_center_xld (SortedContours, Area, Row1, Column1, PointOrder)
- Number:=[1:1:|Row|]
- dev_get_window (WindowHandle)
- disp_message_ext (WindowHandle, Number, 'image', Row1-10, Column1, 'blue', 'false',15)
复制代码 |