mercredi 11 mars 2015

Coverting image data to rows in a data frame


Vote count:

0




I have a parent directory holding a bunch of sub-directories, each sub-directory contains a bunch of grayscale jpeg images that have all been converted to identical size already. I am looking for an efficient way to create a data frame for the images that holds the name of the folder it is in and another column to hold the name of the image file. Obviously there will be a lot of columns holding the pixel data from the image as well. If the image is 40x40 then there will be 1600 columns of pixel data. I can make this work already if I don't include the non-numeric columns. All the ways I have tried to do this are painfully slow, which includes first creating a list of lists then flattening into a dataframe. I'm guessing this should be pretty easy, but I haven't found a simple or efficient solution yet when 100K+ images need to be processed.



asked 27 secs ago

Beaker

980






Coverting image data to rows in a data frame

Aucun commentaire:

Enregistrer un commentaire