Re: [Numpy-discussion] Count occurrences in a nested ndarray

2010-10-20 Thread Dewald Pieterse
On Wed, Oct 20, 2010 at 1:32 AM, Lutz Maibaum wrote: > On Oct 19, 2010, at 6:09 PM, Dewald Pieterse wrote: > > for xiter in range(xindex): > > for yiter in range(yindex): > > if edges[xiter,yiter,:] == [255,0,0]: > > groenpixelarea = groenpixelarea + 1 > >

Re: [Numpy-discussion] Count occurrences in a nested ndarray

2010-10-19 Thread Lutz Maibaum
On Oct 19, 2010, at 6:09 PM, Dewald Pieterse wrote: > for xiter in range(xindex): > for yiter in range(yindex): > if edges[xiter,yiter,:] == [255,0,0]: > groenpixelarea = groenpixelarea + 1 > if edges[xiter,yiter,:] == [0,255,0]: >

Re: [Numpy-discussion] Count occurrences in a nested ndarray

2010-10-19 Thread josef . pktd
On Tue, Oct 19, 2010 at 9:09 PM, Dewald Pieterse wrote: > Hi All > I have a nested array created using: > edges = scipy.misc.pilutil.imfilter(prent,'find_edges') > edges > array([[[  0, 255,   0], >         [  0, 255,   0], >         [  0, 255,   0], >         ..., >         [  0, 255,   0], >   

[Numpy-discussion] Count occurrences in a nested ndarray

2010-10-19 Thread Dewald Pieterse
Hi All I have a nested array created using: edges = scipy.misc.pilutil.imfilter(prent,'find_edges') edges array([[[ 0, 255, 0], [ 0, 255, 0], [ 0, 255, 0], ..., [ 0, 255, 0], [ 0, 255, 0], [ 0, 255, 0]], [[ 0, 255, 0],