halocn读取本地文件

来源:互联网 发布:java行业发展前景 编辑:程序博客网 时间:2024/05/29 16:42
*读取图片操作*11111111111111ImagePath :=[]ImagePath[0] :='E:/image/1.png'ImagePath[1] :='E:/image/2.png'ImagePath[2] :='E:/image/3.png'ImagePath[3] :='E:/image/4.png'for I :=0 to 3 by 1    read_image(Image,ImagePath[I])endfor*222222222222222for I :=1 to 4 by 1    read_image(Image,'E:/image/'+I+'.png')endfor*33333333333333* Image Acquisition 01: Code generated by Image Acquisition 01*遍历指定文件夹下所有文件提出指定规则文件(文件夹,获取方式,数组)*获取文件限制:files:指定收索格式为文件 directories:指定收索格式为文件夹 *recursive:递归遍历文件夹文件 max_depth 5:查看文件深度5 max_files 100:查看文件数量限制100list_files ('E:/image', ['files','follow_links'], ImageFiles)*选择符合规则的索引(输入,规则,输出)*[]正则表达式\\.->转义成点 ()集合用或运算 'ignore_case'忽略大小写字母tuple_regexp_select (ImageFiles, ['\\.(tif|tiff|gif|bmp|jpg|jpeg|jp2|png|pcx|pgm|ppm|pbm|xwd|ima)$','ignore_case'], ImageFiles)for Index := 0 to |ImageFiles| - 1 by 1    read_image (Image, ImageFiles[Index])    * Image Acquisition 01: Do somethingendfor*补充:使用助手打开新的Image Acquisition 可以选择连接外部设备 
原创粉丝点击