loop for and file nonexistant
显示 更早的评论
hi,
I have a folder 'Base' that contains 80 images (image 1 is called '1. jpg ', the second is '2. jpg', ............ '80. jpg ') I want to read these images using a loop for.I writethis:
for i = 1:80 imread ('Base \% d.jpg ', i);
but an error stating nonexistent file.
What's the problem. Please help
采纳的回答
更多回答(1 个)
Walter Roberson
2013-8-30
0 个投票
Spacing is important. '%d' not '% d' for example. But a more immediate problem is that imread() must be given a complete file name; it will not construct one like you have shown.
类别
在 帮助中心 和 File Exchange 中查找有关 Denoising and Compression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!