imageDatastore changes filenames when creating an object

1 visualización (últimos 30 días)
evgeny neiterman
evgeny neiterman el 5 de Ag. de 2021
Editada: Stephen23 el 6 de Ag. de 2021
im creating a imageDatastore object from a folder:
>> imds = imageDatastore('/home/evgenyn/Exposure_Correction/exposure_dataset/training/INPUT_IMAGES_P_128/')
imds =
ImageDatastore with properties:
Files: {
' .../exposure_dataset/training/INPUT_IMAGES_P_128/indoor_10_1.jpg';
' .../exposure_dataset/training/INPUT_IMAGES_P_128/indoor_10_10.jpg';
' .../exposure_dataset/training/INPUT_IMAGES_P_128/indoor_10_100.jpg'
... and 2487 more
}
but the Files he reads into the file atribut are not real. It changes the names of the real file.
indoor_10_1.jpg is actuly indoor_1_10.jpg
indoor_10_100.jpg is actuly indoor_100_10.jpg
and so on for all the files. The format is:
indoor_<image number>_<patch number>.jpg
but imageDatastore reads it as:
indoor_<patch number>_<image number>.jpg
  1 comentario
Stephen23
Stephen23 el 5 de Ag. de 2021
Editada: Stephen23 el 6 de Ag. de 2021
I very much doubt that imageDatastore has "changed" any filename when creating the object.
What is more likely is that you need to consider the ASCIIbetical order of the filenames.
But in any case, please run this code and upload the .mat file by clicking on the paperclip button:
P = '/home/evgenyn/Exposure_Correction/exposure_dataset/training/INPUT_IMAGES_P_128/';
S = dir(fullfile(P,'*.jpg'));
save('filenamecheck.mat','S')
Question: how exactly did you check that the file named "indoor_X_Y.jpg" saved in the folder is returned by imageDatestore as "indoor_Y_X.jpg" ? What method did you use to compare the content of those files?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Graphics Object Identification en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by