尝试一下,
----------------------------------------------------
read_image (Image, 'E:/test25/t1.png')
get_image_size (Image, Width, Height)
dev_close_window ()
dev_open_window (0, 0, Width, Height, 'black', WindowHandle)
dev_display (Image)
rgb1_to_gray (Image, Image1)
fft_generic (Image1, ImageFFT, 'to_freq', -1, 'sqrt', 'dc_center', 'complex')
power_byte (ImageFFT, PowerByte)
threshold (PowerByte, Regions1, 35, 255)
paint_region (Regions1, ImageFFT, ImageResult, 0, 'fill')
fft_generic (ImageResult, ImageFFT1, 'from_freq', 1, 'sqrt', 'dc_center', 'real')
calculate_lines_gauss_parameters (5, 50, Sigma, Low, High)
lines_gauss (ImageFFT1, Lines, Sigma, Low, High, 'dark', 'true', 'bar-shaped', 'true')
union_collinear_contours_xld (Lines, UnionContours, 75, 3.5,5, 0.7, 'attr_keep')
select_shape_xld (UnionContours, SelectedXLD, 'contlength', 'and',20, 99999)
gen_region_contour_xld ( SelectedXLD, Region, 'filled')
union1 (Region, RegionUnion)
connection (RegionUnion, ConnectedRegions)
skeleton (ConnectedRegions,Skeleton )
dev_display (Image)
dev_display (Skeleton)
|