Showing Error imread due the saved as of each image in the database of the folder

1 次查看(过去 30 天)
Hello Image Analyst, I have issues with sytax below
for i=1:980
i1=num2str(i);
I = imread(['C:\Users\Administrator\Documents\DistortedImages\t',i1,'.bmp']);
Command Window
Error using imread
File "C:\Users\Administrator\Documents\DistortedImages\t1.bmp" does not exist.
It is observed that each image of the 980 distorted images is saved as t(1), t(2), t(3) and so on till it reaches the last image with t(980) all distorted images with different distortion types and levels.
Also, what is the syntax code using referenece image of about 20 images and corresponding distorted images which is about 980 images. with every reference image compared and obtain an output score with respect to the respective 49 distorted images
first reference image to 49 distorted images
second reference image to 49 distorted images
and so till it reaches the 20th refernce image and corresponding distorted image
All the distorted images are in the database are saved as t(1), t(2) and on till it reaches t(980).
Thank you in advance.
  3 个评论

请先登录,再进行评论。

采纳的回答

Image Analyst
Image Analyst 2018-12-26
You should use the robust code in the FAQ: The FAQ
So either use dir() to get what files are actually there, OR build up the filename with sprintf() but check with exist() if the file is actually there before trying to process it.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

产品


版本

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by