[Tutor] [tutor] Finding image statistics

Varsha Purohit varsha.purohit at gmail.com
Sun Mar 2 18:48:24 CET 2008


Yes i am getting this but i was confused why i am getting 3 values for
count, extrema.. and dats y i couldn't figure out how to find area of those
pixels......

On Sun, Mar 2, 2008 at 9:02 AM, Kent Johnson <kent37 at tds.net> wrote:

> Varsha Purohit wrote:
> > of this module in this application.
> >
> > I want to find other image statistics such as finding number of pixels
> > which exist after taking difference between two images, getting sum of
> > all pixels and area of pixels that are in that image etc.
>
> I don't think you can get all of that out of ImageStat, it is pretty
> basic.
>
> In [18]: import Image, ImageStat
> In [19]: i=Image.open('kent.jpg')
> In [21]: s=ImageStat.Stat(i)
> In [23]: s.extrema
> Out[23]: [(0, 255), (0, 255), (0, 251)]
> In [24]: s.count
> Out[24]: [43200, 43200, 43200]
> In [25]: s.mean
> Out[25]: [116.61453703703704, 103.23967592592592, 97.624606481481479]
>
> etc.
>
> Kent
>



-- 
Varsha Purohit,
Graduate Student
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20080302/9502ca66/attachment.htm 


More information about the Tutor mailing list