Using blob tracking to draw shapes

    Aug 21 2010 | 6:47 am
    I should probably preface this by saying I'm stuck in the world of 'trial and error' at the moment - I'm not totally sure if I'm on the right track, so any suggestions at all are gratefully appreciated...
    I'm trying to find a way to use cv.jit.blobs to create shapes - probably with OpenGL, which I've had some success with. The catch is that I don't want to use a perfectly round or square (like cv.jit.bounds) shape - I'd prefer that it fitted the area considered a blob a little closer.
    I've been playing with vade's v001.posterize filter, to try and 'crush' the number of colour values into something similar, but because I need to make this a binary image for cv.jit anyway, it isn't making a great deal of difference. The closest I've got is using cv.jit.blobs.color, but I'm hoping to create a more abstract shape with OpenGL than the coloured areas in a jitter matrix.
    Hopefully this all makes some sense, but if not, here is the patch I've been testing some different cv.jit.blobs styles on...

    • Aug 22 2010 | 12:42 pm
      Just giving this a bit of a nudge by way of another patch - my last post was probably too general anyway.
      Basically, what I'm trying to work out is how to take a video feed, crush the colours so I'm left with only a few distinct shades of grey (so that identifying different brightnesses is easier) and loosely tracing those shapes with OpenGL.
      Attached is a photoshopped image of the 'crushed colour' effect I'm expecting would make shape tracking easier. The left and right side show before and after, respectively.
      What I'm really stuck on now is how to separate each shade, so that I can work with them individually.
      The attached image should work with this patch...
    • Aug 23 2010 | 5:01 pm
      i believe jit.charmap is your friend in producing the "crushed colors" effect.
    • Aug 24 2010 | 4:40 am
      Thanks very (very, very) much for the nudge in the right direction, robtherich. jit.charmap did indeed do the trick... I just need to get those cv.jit.features values to draw some shapes for me!
    • Aug 24 2010 | 3:39 pm
      your question is still quite broad, if you get no further response i suggest you simplify/specify your question, perhaps breaking it into parts and reposting to forum.
    • Aug 25 2010 | 4:30 am
      You're right robtherich - sorry about that. So jit.charmap took care of finding the edges I was after, which I then used with cv.jit.features to find coordinates. What I'm trying to figure out is how to use these coordinates to draw a shape with OpenGL.
      I realise that the points I'm getting from cv.jit.features aren't ordered to give me a sequential perimeter of the shape, but I don't seem to be getting any output at all in
      I've checked over my OpenGL syntax many times, but I'm still not sure where the output is falling down...
    • Aug 25 2010 | 5:21 am
      I've actually just gotten to the bottom of this: wasn't happy with the format of the message being passed to it - sending it through a message first sort it out.
    • Jun 11 2011 | 1:03 am
      Kodamapixel, or anyone else that understands what his last post meant, would you mind explaining? In what way did you reformat the message such that could handle it?