SIMPLE QUESTION: How to convert a image file name "1.jpg" into a string or # "1"?
Ignore what's below (unless you have the time to answer it), but ^ this is mainly what I need
So, I created images using a function called imagegenerator & data inputs such as "volume" and "location."
I saved each image generated as a # (i.e. 1.jpg, 2.jpg, 3.jpg.....).
I also saved the input data/variables used for each image (volume & location) as files (i.e. 1.jmat, 2.jmat, 3.jmat....)
Then, using machine learning, I clustered the images into three groups and saved each group of images into three separate folders (cluster0, clsuter1, cluster2)
Now, I want to choose one of these folders (i.e. cluster0) and save the image files as variables in a list. So, say that cluster 0 has these images in it: "1.jpg, 23.jpg, and 52.jpg". I want to make a list called imagenumbers= [1, 23, 52]
Then, I want to use these numbers to retrieve the data/variables that match to these numbers (1.jmat, 23.jmat, 52.jmat) so that I can input similar volume & location values through the imagegenerator function & create similar images to 1.jpg, 23.jpg, and 52.jpg.
I'm just not sure how I can save the image files as #s in a list & then use these #s to call in the variables from the matching jmat files (i.e. volume & location stored in 1.jmat, 23.jmat, and 52.jmat) -- one by one in a for loop