2
1
I want to take an image file (eg tiff) and convert it to a spreadsheet (csv, or whatever) such that each pixel becomes a cell with a numeric value for that pixel.
I have googled it, and everyone is trying to sell me OCR software, that is certainly not what I want.
I will be editing the image beforehand, so can convert it to any format required, and can crop it down to a managable size.
It's mainly greyscale I'm interested in, and could do the little bit of colour that I will need as 3 separate files (one per colour channel) .
I will be doing statistical analysis on the spreadsheet later. I could likelly knock somthing together in java to do it, especially given that this is a proof of concept for a (much) later programming project, but that really feels like far too much hastle for what should be a simple task.
If you say you can do Java, why not. It's not too much of an overhead, although other programming languages could probably do it in less lines of code. I don't think you'll get a readymade solution for this. You can take a look at ImageMagick's interfaces for different programming languages.
– slhck – 2011-06-04T10:41:35.947I'll just put this as a comment unless you ask for it as an answer, but using python and the PIL library. you can get to a pixel value in 3 lines of code 1) Import the library 2) open the file 3) getpixel. Everything else is just bookkeeping. – Dennis – 2011-06-04T11:10:09.240
Having no idea what python code even looks like let alone how to code it, I personally will give that one a miss, but I'm sure it may work well for others. I am currently in the middle of finding a java editor so I can see if I can remeber how to use it. – Thingomy – 2011-06-05T14:32:21.247