The name of the images have important information that I need to store in different variables for further processing.
For example the name of the image is: gh_368053_209864_19
And there are 8 images with different numbers. I need to access 368053 and store it in x separately and store 209864 in y. And I want to do this for all the images in the file in a loop. Store x and y in two different arrays.
I will also apply other functions to the accessed images!
How can this be done only with names of the images?
clear allclc;location = 'E:\ATR\*.JPG'; % folder in which your template images exists
img= imread('E:\ATR\gh_368053_209864_19.JPG');ds = imageDatastore(location); % Creates a datastore for all images in your folder
% fileNames={a.name};
while hasdata(ds) temp = read(ds); % read image from datastore
% Image_name = temp.name;
% figure, imshow(temp)
end
Best Answer