lundi 2 mars 2015

An efficient way to store image information after segmentation with Spyder? (TIFF)

From my searching, this appears to be a topic that's been discussed at some length, so I'll do my best to be detailed with my problem and the solutions I've drafted up. I'm hoping that input here can suggest a new approach to this or perhaps help me understand understand the pro/con of the existing ones a little better.


The short version is that I'm filtering image data, identifying points of interest, and segmenting out the data centered around those points to analyze further down the line. I simply want to save those segments separately so I can access them in the next program I will be working on. That being said, I would like (read:need) to include the data about their location on the cameras chip (location of the segments top/left pixel will suffice, but will add more if it's convenient).


Complications:



  • I'm trying to avoid more modules. In a perfect world I would like to be able to download Spyder on any computer and run this program right off the bat.

  • As I'm hoping to be run large stacks of images through the program, I'm trying to keep it pretty clean in terms of extra files and how long each iteration takes.

  • I would like the user to be able to see and sift through the images in windows if they so choose. This simply implies some level of "cleanliness" to how its saved. Giant lines of giberish for file-names ect are not helpful for a new user sifting through images in windows explorer.


Possible Solutions:



  • Metadata: I'm decently python veteran, so this is a little foreign to me. I'm not sure if its a viable approach or not. I've seen some say that PIL is useless by itself for storing information alongside a tiff image, but I've seen others describe it as doable using custom tags. I have yet to see an explicit example for how this works so I feel pretty dumb in this category. That being said, on paper it's my favorite solution so if anyone has any advice I'm all ears.

  • Separate Text file(s): My first thought here was to save a tiny text file for each segment, but having a ton of text files that have to be organized with every segment for every image sounds dreadful to me. Perhaps one larger text file? But then I have to deal with organizing the multiple points of interest per image. That seems pretty doable and is on the top of my list as it stands.

  • Save information in the name of the segmented file: This is a pretty straight forward option. Not hard to implement, just have to sort it back out of the string in the next program. It seems messy to me just from a user standpoint. Perhaps dumping each image set into a simple descriptive folder would be enough and including all of the relevant information in the filenames would then be of no detriment?

  • csv file(s): seems like it could be a pretty clean way of organizing things. I have experience reading them in, but not writing them out. That being said, I'm sure it wouldn't be a catastrophic undertaking. Unless someone is convinced that this is a really bad idea I don't think much discussion is necessary on this one.


Aucun commentaire:

Enregistrer un commentaire