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

    Jun 27 2010 | 4:02 pm
    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

    • Jun 28 2010 | 4:06 pm
      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): (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):
      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)..!
      sorry for the mess. lock to make it look cleaner.
    • Jun 29 2010 | 6:40 am
      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:
    • Jun 29 2010 | 11:39 am
      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!
    • Jun 29 2010 | 5:04 pm
      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?
    • Jun 29 2010 | 11:20 pm
      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!
    • Jun 30 2010 | 2:44 am
      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.