Thank you Stefan and Anne for such quick replies.
I am writing a gimp plugin, and if anybody is interested in how do that --
there are only about 10-20 examples that I"ve found -- this plugin is
attempting to do raster-to-vector conversion on the bluest pixels. It outputs
SVG and a python tupl
Hi,
I have this silly color filter that Stefan gave me:
def vanderwalt(image, f):
"""colorfilter, thanks to Stefan van der Walt"""
RED, GRN, BLU = 0, 1, 2
bluemask = (image[...,BLU] > f*image[...,GRN]) & \
(image[...,BLU] > f*image[...,RED])
return bluemask
To c
Hi,
What am I doing wrong here? The reshape doesn"t take.
% cat test1.py
import numpy as np
a = np.uint8([39, 39, 231, 239, 39, 231, 39, 39, 231,
39, 39, 231, 239, 39, 231, 39, 39, 231,
39, 39, 231, 239, 39, 231, 39, 39, 231,
39, 39, 231, 239, 3
Hi,
> >>> median(m.T)
> array([ 1.e+20, 2.12298948e-01, 3.57822574e-01,
I believe 1.e+20 is a reserved value and signifys the
missing value or NaN in your case. That"s the way it was in
a Fortran77 package I worked with ten years ago...
--- On Thu, 9/18/08, Peter Saffr
> coords were tossed.
> > Can you show me a cheap way to return a line:
> >
> >line=[(3, 0), (2, 1), (0, 2), (1, 2), (3, 2), (0,
> 3), (4, 3), (3, 4)]
> >
> > type-o-thing?
>
> Sure, how about
>
> np.array(bluemask.nonzero()).swapaxes(0,1)
>
> Does that do what you want?
Exactly. Very co
> Maybe this helps:
>
> # silly algorithm for guessing blue pixels
> >>> bluemask = (a[...,2] > 1.25*a[...,1]) & (a[...,2] > 1.25*a[...,0])
>
> >>> a[bluemask, :]
> array([[107, 11, 185],
>[101, 91, 251],
>[ 61, 23, 79],
>[ 25, 131, 211],
>[169, 83, 214],
>
Hi,
I"m just learning numpy and I am not a math. I just need it.
I need to do a color filter; I have it working in python
but it runs forever on some of my images. And I dont know
enuf c or c++ to use weave (or Boost or Pyrex or...)
This looks like the best way, and I have somebody who is
a