cv.jit.blob.bounds.draw: how to extract values of DIFFERENT blobs?

    Mar 24 2010 | 2:13 am
    hi there. i was looking for a way to extract from the values of left,top,right and bottom coordinates of just the FIRST blob.. i know how to exrtract the number of the last blob detected and their coordinates( by jit.iter and unpack the first 3 values), but then i could not find a way to have the different ones distinguished between multiple blobs detected.. is there a way to do it?
    thank you very much.

    • Mar 24 2010 | 3:04 am
      I actually just made an example for blob bounds..does this help? each of the 4 colors are each coordinate and there are 4 values for each one so you could see the values for 4 sepearate blobs..if you want more just add more options to unpack..jit.spill is what you want to get stuff out of cellblocks:
    • Mar 24 2010 | 1:57 pm
      thank you so much mate!, it was very useful your tip, and very fast the answer as well! just one thing: when it detects more than one blob, the detector gets confused. when i'm trying to get the values of the first one only and on the detection there are more than one, the first values of the jit.spill/unpack try to track the last blob anyway.. but i guess is a problem of the object itself...
    • Mar 29 2010 | 9:55 am
      the cv.jit.blobs.centroids tracks blobs left to right, top to bottom. so, yes, if your blobs cross over each other's X axis, their order will get switched. I ran into this problem when the order was essential in my tracking, and still haven't found an answer... though cv.jit.label can help.
    • Mar 10 2011 | 7:23 pm
      this is really helpful for me, too. i'm trying to get to a point where the size of a single blob can be determined...
    • Apr 11 2012 | 4:00 am
      Hey :) Sorry Im still a complete noob at this.
      With the example, which is the left, top, right and bottom coordinates? Are each of the different coloured sections giving these coordinates correspondingly? (Like red=left, green=top, blue=right, orange=bottom?) And if so what are the 4 values they are outputting? So then if there is only one bounding box, shouldnt each plane (each colour) be unpacking only one value?
      Or is each colour for a different blob, and is thus unpacking left, top, right, and bottom coordinates for 4 blobs each?
      Sorry if this is a real dumb question but I would REALLY appreciate the help! :)
    • Oct 02 2012 | 5:20 am
      @ANNEKE Yes, you understood it right : red = left, green=top, etc... In this case, jit.spill will output a list whose size or quantity of values is equal to the amount of blobs found. If you use the arrows.gif file, jit.spill @plane 0 will output one value per blob(arrow) – 10 values (left coordinates) according to your settings.
      jit.spill @plane 4 will output the first plane (0), with an offset of one value, jit.spill @plane 8 with an offset of two values and so on...
      If you connect the output of cv.jit.blobs.bounds to the jit.iter object, you can join the number of the blob and its coordinates. This small code below does that : outputs a list with five values The first is the number of the blob (remember -> left to right, top to bottom) and it's coordinates.
      Best, Rafael
    • Apr 30 2015 | 6:57 pm
      There's a brand new build for Mac and Windows that’s 64-bit compatible and tested on Max 7!
      Download the cv.jit Starter Kit at
      Leave a comment and let us know how it’s working for you!
      Happy patching!
    • Nov 18 2016 | 11:24 am
      Just to confirm does each blob have a red,green,blue,orange value? By this I mean does the top left arrow have the coordinates 54,4,137,32 giving an overall orientation within the frame? Sorry to resurrect such an old thread with such a foolish question.
    • Feb 07 2017 | 4:44 pm
      More maxology tutorials or example would be nice!