Re: get values of known positions on Image

Christopher Barker <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>
ioannis syntychakis wrote:
> But I don't want to have the positions, but the pixelvalues where the 
> pixels are above the 200.

there may be a way to do this directly with PIL, but with numpy:

In [13]: a
Out[13]: array([1, 7, 3, 4, 9, 5, 7, 8, 5])

In [14]: a[a > 4]
Out[14]: array([7, 9, 5, 7, 8, 5])

For more details and options, see the numpy docs and/or ask on the numpy 
list.

-CHB


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[email protected]
_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.