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

1 visualización (últimos 30 días)
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 comentarios
KALYAN ACHARJYA
KALYAN ACHARJYA el 26 de Dic. de 2018
Can you clarfy your issue? Please ask one question at a time (be specific)?

Iniciar sesión para comentar.

Respuesta aceptada

Image Analyst
Image Analyst el 26 de Dic. de 2018
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.

Más respuestas (0)

Categorías

Más información sobre Images en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by