Forums > Jitter

Re: cv.jit.label – cv.jit.blobs.centroids for multiple objects- no scissors

October 8, 2007 | 2:41 pm

I forgot to mention that I tried jit.scissors as well but that does not seem to work correctly either…

jit.scissors @columns 3

still gives me all of the data from the first outlet…

thanks
jamie

—– Original Message —-
From: jamie jewett
Sent: Monday, October 8, 2007 9:27:45 AM
Subject: Re: [jitter] cv.jit.label – cv.jit.blobs.centroids for multiple objects

thanks nesa

sorry to be thick headed about this but how to best then chop up the data fro cv.jit.centroids into several one cell matrix(s) (matrixi) (( :? ))

I tried to use
jit.submatrix @dim 1 1 @offset 0 0
and
jit.submatrix @dim 1 1 @offset 1 0

but get no values from this

well – just zero values – if I use dim 4 1 for example, with 3 tracked objects then I get 3 cells showing up in my jit cell block – but they are all a 0.0 value

you said that centroids iterates through but I am not seeing this if i print the data -
(or i am not properly understanding this somehow)
here are 2 example bangs

129.953 121.553 190.000, 161.600 158.482 85.000, 165.500 163.000 2.000

126.138 150.408 152.000, 160.090 182.321 78.000, 165.000 185.875 8.000

hmmm –
can someone give me a direction to fumble in please

thanks

jamie

—– Original Message —-
From: nesa
Sent: Sunday, October 7, 2007 1:04:09 PM
Subject: Re: [jitter] cv.jit.label – cv.jit.blobs.centroids for multiple objects

>
> tracking for one as follows – how to do this with 3….

tracking is the same for multiple blobs too.

from cv.jit.blobs.centroids helpfile:

cv.jit.blobs outputs a single-row, 3-plane char matrix where the
number of cells is the same as the number of labeled components. The
contents of each plane is as follows:
Plane 1: x-coordinate
Plane 2: y-coordinate
Plane 3: area

If you open cv.jit.blobs.centroids.draw patch, you’ll see that
jit.iter iterates through all the cells in the matrix(all blobs)
giving you a list of maxland values(x , y, area).

hope this helps,
nesa

>
> many thanks
>
> jamie
>
> max v2;
> #N vpatcher 20 74 620 474;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P newex 102 91 46 196617 jit.print;
> #P newex 77 224 107 196617 jit.op @op * @val -1.;
> #P newex 60 278 53 196617 jit.pack 3;
> #P newex 95 248 143 196617 jit.map @map 0 1000 0. 0.01;
> #P newex 77 200 130 196617 jit.map @map 0 239 -1. 1.;
> #P newex 60 172 130 196617 jit.map @map 0 319 -1. 1.;
> #P newex 60 145 63 196617 jit.unpack 3;
> #P newex 60 121 106 196617 cv.jit.blobs.centroids;
> #P newex 60 60 190 196617 cv.jit.label @charmode 1 @threshold 10;
> #P connect 0 0 1 0;
> #P connect 1 0 2 0;
> #P connect 2 0 3 0;
> #P connect 3 0 6 0;
> #P connect 2 1 4 0;
> #P connect 4 0 7 0;
> #P connect 7 0 6 1;
> #P connect 2 2 5 0;
> #P connect 5 0 6 2;
> #P pop;
>
>
>


Viewing 1 post (of 1 total)