cv.jit.touches: ensuring constant order in labels (despite blob loss)

Jun 27, 2010 at 4:02pm

cv.jit.touches: ensuring constant order in labels (despite blob loss)

hello!

I’ve been playing around with cv.jit.touches for a bit and have one concern:

how can I keep up an even order in labels? usually I have to deal with blobs going lost – so after a while I won’t have 10 blobs from 0 – 9, but 10 blobs accommodating labels as 1, 4, 6, 8, 9, 12, 14, 15, 19, 24 (due to dropouts). blobs moving up just take the next value (available in order)

I’d like to change that – have the next detected blob merely taking the last blob’s place/label. it’s important for installation issues that I keep a constant order in labels, to constantly avoid dropouts in values.

I’ve tried wrapping my head around it all day (it works to some extent). and won’t see the wood for the trees for now..

the main issue: considering/combining continuative blob labeling with & without previous blob loss.

thankful for any advice..!

all the best

-jonas

– Pasted Max Patch, click to expand. –
#51084
Jun 28, 2010 at 4:06pm

hello!

the above approach doesn’t lead anywhere, so I’ve tried solving the issue with grand ‘ol COLL

and still – flaws remain, as you can see in the following vid (1MB):

http://jonaswolf.com/cv.jit.touches.mov (download for bigger view)

it starts off they way I want it to actually proceed:
the first time my 2 blobs are lost/released (leave the screen), they get their old label back on return (I know that the actual issue here is that they don’t literally RETURN).
on further loss-return activity they continue the old game – blob labelled “1″ gets lost, next detected blob is labelled “2″.

for anyone who’s interested, here’s what my max window tells me (outtake):

http://jonaswolf.com/cv.jit.touches.rtf

t for touch (new blob detected)
d for drag (current blob movement)
r for release (blob’s lost)
(obviously)

don’t look at it too long, it gets crazier & crazier :)

I’m certain I’m quite close in having cleansed my mistake, although I’m going quite nuts by now.

any suggestions appreciated (even if it’s quite a diverging approach)..!

cheers

-jonas

– Pasted Max Patch, click to expand. –

sorry for the mess. lock to make it look cleaner.

#183267
Jun 29, 2010 at 6:40am

Hi,

I made an abstraction that renumbers the IDs output by cv.jit.touches. Try it out and let me know if it does what you want:

http://jmpelletier.com/using-cv-jit-touches-recycling-index-values/

Jean-Marc

#183268
Jun 29, 2010 at 11:39am

had it running in 1min [with live video feed] :)

it’s exactly what I was looking for. thanks alot, jean-marc.. your cv.jit package is great work

all the best!

-jonas

#183269
Jun 29, 2010 at 5:04pm

I tested the patch myself and it seems it has to be a specific size otherwise it detects multiple blobs where there is only one. Is that true or am I doing something wrong?

#183270
Jun 29, 2010 at 11:20pm

Silly me! I now read what cv.jit.touches does. Track similarly-sized blobs. hehehhe. But it sure is sensitive to size. A little bigger and you screw everything!

#183271
Jun 30, 2010 at 2:44am

Yeah, setting the parameters right is important, but it helps a lot if you have a good setup, hardware and lighting-wise. It works a lot better if you can get really clean-looking blobs in the first place.

#183272

You must be logged in to reply to this topic.