imageDatastore changes filenames when creating an object

1 view (last 30 days)
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 Comment
Stephen23
Stephen23 on 5 Aug 2021
Edited: Stephen23 on 6 Aug 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?

Sign in to comment.

Answers (0)

Categories

Find more on Graphics Object Identification in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!