检测钢柱个数


read_image (Image, '1')
dev_close_window ()
get_image_size (Image, Width, Height)
dev_open_window (0, 0, Width/4, Height/4, 'black', WindowHandle)
dev_display (Image)
binary_threshold (Image, Region, 'max_separability', 'light', UsedThreshold)
opening_circle (Region, RegionOpening, 13.5)
closing_circle (RegionOpening, RegionClosing, 113.5)
smallest_circle (RegionClosing, Row, Column, Radius)
gen_circle (Circle, Row, Column, Radius)
reduce_domain (Image, Circle, ImageReduced)
binary_threshold (ImageReduced, Region1, 'max_separability', 'dark', UsedThreshold1)
opening_circle (Region1, RegionOpening1, 113)
connection (RegionOpening1, ConnectedRegions)
shape_trans (ConnectedRegions, RegionTrans, 'outer_circle')
count_obj (RegionTrans, Number)
set_display_font (WindowHandle, 16, 'mono', 'true', 'false')
disp_message (WindowHandle, '总的数量'+Number, 'window', 100, 100, 'black', 'true')

浙公网安备 33010602011771号