cv.jit.blob.centroids defaults to "0"

Aug 25, 2009 at 3:37pm

cv.jit.blob.centroids defaults to "0"

Hello-

I am using the cv.jit.blob.centroids object to track finger positions on a homemade multi-touch table. If someone is touching the table, the patch works perfectly. The fingers
are tracked as blobs and I am able to attach shapes and trails
to the positions of the fingers. The problem I’m having is that if the person lifts their fingers off the table, the first blob defaults to “0″, causing the shape and trail to jump to the corner. This makes for a rather jagged user experience.

My goal is to have the x,y position stay where the last finger was positioned rather than the “0″ effect.

Below is a striped down version of the patch I’m using. It might be difficult to recreate what is happening unless you
have a dark object with 1 point of white on it. (I’ve been using a CD case with a piece of white tape for testing). The image I’m tracking from the multi-touch table is basically dark blue except for where the fingers are and those spots are bright white.

Any help would be greatly appreciated!!
Lisa Marie

– Pasted Max Patch, click to expand. –
#45222
Aug 25, 2009 at 4:27pm

Hi Lisa Marie,

Here’s the way I often do this, considering you’re using jit.iter. Look inside the filterZeros subpatch.

best,
Zachary

– Pasted Max Patch, click to expand. –
#162972
Aug 28, 2009 at 1:26am

Thank you for the simple fix Zachary!
Your project at the ZKM looks to have been a big success.
Congratulations!

#162973

You must be logged in to reply to this topic.