Forums > Jitter

tracking multiple objects

November 12, 2007 | 11:24 pm

I am trying to figure out a way to track multiple objects in jitter. Basically what I want to be able to get is the xy coordinates of a center point to an object, and if posssible, the area or perimeter of the object in pixels. I have found the cv.jit extensions, and the centroids extension finds the center point of everything it considers an object and gives the areas as circles. the cv.cjit.blobs.bound object gives the areas as squares, which might be easier to calculate. I am working on a way to get just the circles/crosses/squares as output, without the actual movie (see previous post).

I am trying to extract the x and y coordinates for each center point I want the x to serve as pan position for a note, y as the pitch, probably as a midi note, but maybe and/or as an MSP signal , and then if possible calculate the area blobs as volume.

Basically, what I want to do is like the use of jit.findbounds in tutorial 25, but for multiple locations rather than a single location, and in a greatly simplified color environment…red crosses, or green perimeters, over a black background, that is it, so really it is a question of just pulling / the non-zero coordinates out of the matrix, but I have not been able to figure out how. Any help would be appreciated.

~Rich


November 13, 2007 | 1:06 am

Click twice on cv.jit.blobs.centroids.draw to se the structure.


November 13, 2007 | 7:24 am

ahhh…revelation…RTFM … I clicked on just about everything else but that. It helped me understand what the blob.centroids object was doing, so I got the numbers I was looking for out of the object once I then returned to the blob.centroids help patch. this also solves the subtraction problem in the other post, as it is the numbers I was after rather than the visuals, though I am still a bit confused as to why the subtraction did not work, but I’ll post that over there. still kind of a noob to all this….thanks for the help.

~Rich


Viewing 3 posts - 1 through 3 (of 3 total)