[Numpy-discussion] get information/position of value from matrix
ioannis syntychakis
ioannis87@gmail....
Fri Apr 9 03:47:45 CDT 2010
hallo, can anybody help me with this;
I think i have to post in this mail list because i think i have to use numpy
to do it.
I have a grayscale (L mode) image. On some places on the image i want to
calculate the average pixel value (i know how to do that).
But i want to let the user of the program choose the place! So i want that
the user get a square on his mouseclick en be able to select the square
where python has to calculate the averagepigelvalue.
any ideas how i would do this?
thanks in advance everybody
2010/4/8 Michael Gilbert <michael.s.gilbert@gmail.com>
> On Thu, 8 Apr 2010 09:06:16 +0200, ioannis syntychakis wrote:
> > thanks for all your answers.
> > Now i can get al the values above the 150, but i would also like to have
> > their positions in de matrix.
> >
> > excample:
> >
> > [[1. 4. 5. 6. 7. 1
> > 2. 5. 7. 8. 9. 3
> > 3. 5. 7. 1. 3. 7]]
> >
> > so, if i now look for values above the 8. the ouput should be; 1 value on
> > position (4,1) (beginnning from 0)
>
> a == 8
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100409/39175cd7/attachment.html
More information about the NumPy-Discussion
mailing list