dev_update_off()
dev_close_window ()
read_image (Image, '1')
get_image_size(Image, Width, Height)
dev_open_window_fit_image (Image, 0, 0, 700, -1, WindowHandle)
dev_clear_window ()
dev_display (Image)
set_display_font (WindowHandle, 16, 'mono', 'true', 'false')
dev_set_draw ('fill')
dev_set_line_width (3)
rgb1_to_gray (Image, GrayImage)
threshold (GrayImage, Regions, 116, 254)
connection (Regions, ConnectedRegions)
select_shape (ConnectedRegions, SelectedRegions, 'area', 'and', 204.71, 500)
dilation_circle (SelectedRegions, RegionDilation, 5)
union1 (RegionDilation, RegionUnion)
reduce_domain (GrayImage, RegionUnion, ImageReduced)
points_foerstner (ImageReduced, 1.5, 2, 3, 250, 0.2, 'gauss', 'false', RowJunctions, ColumnJunctions, CoRRJunctions, CoRCJunctions, CoCCJunctions, RowArea, ColumnArea, CoRRArea, CoRCArea, CoCCArea)
gen_circle (Circle, RowJunctions, ColumnJunctions, [0 : |RowJunctions|-1]*0+30)
union1 (Circle, RegionUnion1)
connection (RegionUnion1, ConnectedRegions1)
select_shape_std (ConnectedRegions1, SelectedRegions1, 'max_area', 70)
reduce_domain (ImageReduced, SelectedRegions1, ImageReduced1)
points_foerstner (ImageReduced1, 1.5, 2, 3, 250, 0.2, 'gauss', 'false', RowJunctions, ColumnJunctions, CoRRJunctions, CoRCJunctions, CoCCJunctions, RowArea, ColumnArea, CoRRArea, CoRCArea, CoCCArea)
gen_cross_contour_xld (Cross, RowJunctions, ColumnJunctions, 50, 0.785398)
dev_display (Image)
dev_display (Cross)
执行结果: