* 关闭窗口后重新打开
dev_close_window()
dev_open_window (0, 0, 600, 400, 'black', WindowHandle)
* 创建一张空白图片
gen_empty_obj (Images)
* Image Acquisition 01: Code generated by Image Acquisition 01
list_files ('C:/Users/yr/Desktop/Images', ['files','follow_links'], 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
* 图片统一大小
zoom_image_size (Image, ImageZoom, 200, 200, 'constant')
concat_obj (Images, ImageZoom, Images)
endfor
* 合并图片(按行填充,一行填满4张图片后再填充下一行)
tile_images (Images, TiledImage, 4, 'horizontal')
dev_display (TiledImage)
合并之后效果如图。
关键算子:
tile_images (Images, TiledImage, 4, ‘horizontal’)