[Image-SIG] get values of known positions on Image

Christopher Barker Chris.Barker at noaa.gov
Wed Jun 23 19:00:06 CEST 2010


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

Chris.Barker at noaa.gov


More information about the Image-SIG mailing list