请选择 进入手机版 | 继续访问电脑版

Hello Mat

 找回密码
 立即注册
查看: 6213|回复: 2

读取当前路径文件夹里面的图像

[复制链接]

1288

主题

1514

帖子

90

金钱

管理员

Rank: 9Rank: 9Rank: 9

积分
22589
发表于 2016-12-22 21:33:23 | 显示全部楼层 |阅读模式
path:='.//图库'
list_image_files(path, 'default', [], ImageFiles)
for i:= 0 to |ImageFiles|-1 by 1
    read_image(Image, ImageFiles[i])
    stop()
endfor
算法QQ  3283892722
群智能算法链接http://halcom.cn/forum.php?mod=forumdisplay&fid=73
回复

使用道具 举报

1288

主题

1514

帖子

90

金钱

管理员

Rank: 9Rank: 9Rank: 9

积分
22589
 楼主| 发表于 2016-12-22 21:36:11 | 显示全部楼层
如果读取指定路径下的所有子文件夹里面的图像:
path:='.'
list_image_files(path,'default','recursive',ImageFiles)
for i:= 0 to |ImageFiles|-1 by 1
    read_image(Image, ImageFiles[i])
    stop()
endfor
算法QQ  3283892722
群智能算法链接http://halcom.cn/forum.php?mod=forumdisplay&fid=73
回复 支持 反对

使用道具 举报

1288

主题

1514

帖子

90

金钱

管理员

Rank: 9Rank: 9Rank: 9

积分
22589
 楼主| 发表于 2016-12-22 21:37:08 | 显示全部楼层
如果只是读取 bmp格式的图像,则代码如下:
path:='.'
list_image_files(path,'bmp','recursive',ImageFiles)
for i:= 0 to |ImageFiles|-1 by 1
    read_image(Image, ImageFiles[i])
    stop()
endfor
算法QQ  3283892722
群智能算法链接http://halcom.cn/forum.php?mod=forumdisplay&fid=73
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Python|Opencv|MATLAB|Halcom.cn ( 蜀ICP备16027072号 )

GMT+8, 2024-3-29 17:21 , Processed in 0.208866 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表