- dev_update_off ()
- dev_close_window ()
- read_image (Image, 'F:/Halcon练习/图片库/154602f0cycvx5zbe6p0bx.png')
- invert_image (Image, ImageInverted)
- get_image_size (Image, Width, Height)
- dev_open_window (0, 0, Width, Height, 'black', WindowHandle)
- set_display_font (WindowHandle, 16, 'mono', 'true', 'false')
- dev_display (Image)
- gen_sin_bandpass (ImageBandpass, 0.4, 'none', 'rft', Width, Height)
- rft_generic (ImageInverted, ImageFFT, 'to_freq', 'none', 'complex', Width)
- convol_fft (ImageFFT, ImageBandpass, ImageConvol)
- rft_generic (ImageConvol, Lines, 'from_freq', 'n', 'byte', Width)
- threshold (Lines, Region, 5, 255)
- connection (Region, ConnectedRegions)
- stop()
- select_shape (ConnectedRegions, SelectedRegions, 'width','and', 500, 99999)
- dilation_circle (SelectedRegions, RegionDilation, 5.5)
- union1 (RegionDilation, RegionUnion)
- dev_set_draw ('margin')
- dev_set_line_width (3)
- dev_set_colored (12)
- dev_display (Image)
- dev_display (RegionUnion)
- dump_window_image(Image1, WindowHandle)
- write_image(Image1, 'bmp', 0, 'F:\\Halcon练习\\1.bmp')
复制代码
我是在一个例程中看到的,试着用你的图片测了一下,看着差不多。 |