Forums > Jitter

cv.jit.touches: actual blob count

Jun 27 2010 | 11:41 am


how do I get the actual blob count out of cv.jit.touches? (total count of actual blobs detected)

as the help file says, "In the context of this object, "blobs" are not connected components".. hence the [cv.jit.label] -> [jit.3m] method won’t work anymore.

thanks in advance!


Jun 27 2010 | 1:39 pm


The object recycles index numbers, so some might be tempted to look at the highest index value, but the problem with this method is that it doesn’t work in situations where, for instance, you have three blobs and one disappears.

The best way is to use the [accum] object. Attach a [t b 1] to the "touch" outlet and a [t b -1] to the "release" outlet. The bangs trigger the accum output and 1 and -1 in/decrement the accumulator (middle inlet). This will give you the number of blobs currently active.


Jun 27 2010 | 2:00 pm

did as told :) thanks, jean-marc!

and a big thank you once more for the new cv.jit package (!)

all the best


Jul 06 2010 | 6:10 am

you can also simply query the coll. that’s how i am doing it and it works great.


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

Forums > Jitter