You are not logged in.

#1 2009-04-11 16:09:46

palobo
Member
From: Leiria, Portugal
Registered: 2009-03-21
Posts: 68

Python Image processing. (Help needed)

Hi all.

I'm currently trying to learn python and have made some(small) progress into the matter.

However, I have an urgent need to extract some information from a bactch of photos for statistical purposes, namely:

- color saturation (red, green, and blue)
- mean luminance
- variance of luminance
- root mean square (RMS) contrast
- kurtosis
- skewness
- energy

Now I've searched for some program that could aid me in this when suddenly I remembered Python. smile

I thought I could write a little script to extract said information and save it in a file.

This is where I need the help of all you python gurus.

Need a pointer in the right direction. I'm looking into PIL. IS this the best choice? Could this give me all the info need.

To be honest, I don't even know what some of that info is (my wife needs it for here PhD thesis...)

Any help would be appreciated.

Cheers,
P.


" If it aint broke... Then you're not trying hard enough! "

Offline

#2 2009-04-11 16:35:55

buttons
Member
From: NJ, USA
Registered: 2007-08-04
Posts: 620

Re: Python Image processing. (Help needed)

http://www.pythonware.com/library/pil/h … gestat.htm

Those are all common statistical measures, but I confess I don't know that much about how they relate to images.  I can tell you that, as far as I'm aware, PIL is the best image information/manipulation module in python.  Even if the documentation is...sparse.


Cthulhu For President!

Offline

#3 2009-04-11 17:19:04

palobo
Member
From: Leiria, Portugal
Registered: 2009-03-21
Posts: 68

Re: Python Image processing. (Help needed)

@buttons: Thanks. I am currently looking through that reading. Statisctical info for RGB etc is great, just what I needed. However I can't seem to get info on contast and luminance. I will keep at it.

Cheers,
P.


" If it aint broke... Then you're not trying hard enough! "

Offline

#4 2009-04-11 17:21:56

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Python Image processing. (Help needed)

palobo wrote:

@buttons: Thanks. I am currently looking through that reading. Statisctical info for RGB etc is great, just what I needed. However I can't seem to get info on contast and luminance. I will keep at it.

All I can tell you for sure from a very dim recollection of an undergraduate graphics course is that contrast and luminance can be derived mathematically from RGB somehow.

PIL gives you the option to do pixel by pixel comparisons, so you can certainly get the info you need... the first step would be to define it though. ;-)

Dusty

Offline

#5 2009-04-11 20:37:01

palobo
Member
From: Leiria, Portugal
Registered: 2009-03-21
Posts: 68

Re: Python Image processing. (Help needed)

Thanks all for your inout. Lucky me all she really needed vas std deviation and mean of the images. stat.std and stat.mean managed that
then O converted the images to grayscale to get values for luminance.

I don't know if that is valid or not, but it rendered the results needed so three cheers for Python.

Cheers,
P.


" If it aint broke... Then you're not trying hard enough! "

Offline

Board footer

Powered by FluxBB