- list_files ('C:/Users/Administrator/Desktop/新建文件夹', ['files','follow_links','recursive'], ImageFiles)
- tuple_regexp_select (ImageFiles, ['\\.(tif|tiff|gif|bmp|jpg|jpeg|jp2|png|pcx|pgm|ppm|pbm|xwd|ima|hobj)$','ignore_case'], ImageFiles)
- for Index := 0 to |ImageFiles| - 1 by 1
- read_image (Image, ImageFiles[Index])
- * Image Acquisition 01: Do something
- decompose3 (Image, Image1, Image2, Image3)
- trans_from_rgb (Image1, Image2, Image3, ImageResult1, ImageResult2, ImageResult3, 'hsv')
- median_rect (Image3, ImageMedian, 35, 35)
- emphasize (ImageMedian, ImageEmphasize, 77, 77, 11)
- threshold (ImageEmphasize, Region, 120, 255)
- fill_up (Region, RegionFillUp)
- connection (RegionFillUp, ConnectedRegions)
- select_shape_std (ConnectedRegions, SelectedRegions, 'max_area', 70)
- dev_display (Image2)
- dev_display (SelectedRegions)
- stop ()
- endfor
复制代码 能提个大概区域
|