assurance-tunnel
assurance-tunnel
assurance-tunnel
assurance-tunnel

Blob target proximity



  • Hi everybody,

    I'm working on an installation based on color tracking, and when the blows detected, arrive in particular areas, I want a video projection change.
    The color tracking parts works quite fine, but I have some problems in locating blobs in space: using compare guarded actor some data are loss (I dont' understand why, but expecially Y coordinates of blob), so I tried using Blob Target Proximity actor (that I've found on 1.3.1f.06). Amazing, but...
    But I don't understand exactly why this actor doesn't work as I aspect, also reading the actor help (I didn't found it on the manual)
    To let people understand my question, I try attach a simple patch that is my "canvas" right now. I know that there are many variables (video input, colored dots size, ecc...) but I hope can useful, maybe. For instance I am trying to track a green circle, and, when it goes in the lower-right part of the image in video in, trig a video starting... this is just a starting point to my final goal (i.e if the blow goes out the "target area" I want the video stops, ecc...) but I have to understand (and manage) very well this actor... Where I'm wrong?
    thank you for suggestion, ideas, help...
    Stefano

    7bbf31-color-tracking-blob-target.izz



  • Dear Stefano,

    The "Blob Target Proximity" actor isn't in the manual because I created to support work on my current artistic project SWARM -- I haven't had time to document it yet. But it's a nice actor that I think will help you with your patch.
    First of all, when working with the Eyes++ actor, you should leave the horz/vert min/max inputs of the Blobl Target Proximity actor set to the defaults (0, 100).
    If you need more than one target, then increase the 'targets' input to add more.
    For the remaining inputs: the 'x pos' and 'y pos' inputs define the center of a circle; the 'size' input define the diameter of that circle. If a blob's center point (i.e., the 'bounds center h' and 'bounds center v' outputs of the Blob Decoder) enter this circle, the 'proximity' output will start to increase from 0 -- when the center point of the blob is just inside the edge of the circle -- to 100 when the center of the circle and the blob's center point match exactly.
    So, if you simply want to know if a blob enters the 'target' area, then connect the 'proximity' output to a comparator actor, checking for the value to be greater than 0\. Or, you can use the proximity output directly as a measurement of how close the blob is to the center of the circle.
    Hopefully that makes sense. Give it a try and let me know if you need more help.
    Best Wishes,
    Mark


  • Ciao Mark,

    thanks a lot! Now I'm going to make other tests and I will tell you something. Thanks to your post, things are becoming more clear...
    --> idea: maybe can be very useful an option to the actor thad "draws" the target :)
    Stefano


  • Hi Mark, I have been testing a bit more

    I still have problems:
    First is that eyes++ actor seems to output results non in a continuos way, maybe is a performance problem, so at blob proximity arrive only some results. 
    Assuming this is a performance problem, I tried to reduce all to the minimum (obviously all others task in the computer, then the total actors in the scene, the resolution of video built-in camera input to the monitor of the eyes++ actor, very simple example videos used to test...) but is still very slow all the system (I am working on a quite good mac: i7 2.2Ghz, 16Gb RAM, ecc).  Where I'm wrong? How can I improve performance in this kind of isadora patch?
    Second problem is that I still don't understand well the way the actor reads the blob-list data the values arrive at the actor and still seems to me a bit strange. Maybe if the blob is bigger than the target arrives unexpected results?
    thanks a lot for helping
    Stefano
    --> idea: maybe can be useful an option to the actor thad "draws" the target :)


  • Dear Stefano,

    Some tips.
    1) See the resolution of the camera to the lowest possible setting, i.e., close to what the resolution of Eyes++ is as specified by the 'h res' and 'v res' parameters.
    2) Do you really need the resolution of Eyes++ to be 400 x 300? Usually I use 320x240 at the very maximum, and often I use 160x120.
    3) Try turning off the 'median filter' option. It's "smooths" the image, but is slower.
    4) Set the lifespan to 0\. This feature is a bit unpredictable I'm afraid.
    5) You've got the 'min width', 'min height' and 'min area' all set to 1\. These are pretty small values... try raising them so that it doesn't mis-track individual pixels and noise.
    6) In the Chroma Key actor, lower the 'hue width' and 'softness' inputs as much as possible, and raise the 'saturation' as much as possible. The 'hue width' can be especially problematic if it let's too many colors through.
    I've tested your patch on my Mac Book Pro, i7 (my internal web cam is set to "half size," Eyes++ is set to 400x300.) I'm getting 182 cycles per second in the Status window; what does your status window say?
    I tested the Blob Target Proximity with your patch, and it works as expected as far as I can tell.
    Try this test: set the 'size' input to 20, and the 'x pos' and 'y pos' inputs to 50 -- which will be the very center of what Eyes++ sees. Now move the object until the Blob Decoder's 'bounds ctr h' and 'bounds ctr v' both say something close to 50\. If you are at exactly horz = 50, vert = 50, the output of the Blob Target Proximity should show 100\. Now move the object to the left, keeping the bounds ctr v close to 50 as you do. As you move left, the 'bounds ctr h' of the Blob Decoder will decrease (49, 48, 47, ... etc.). As you do this, the output of the Blob Target Proximity will also decrease, until you reach 40 at which time the output will be zero. (Remember, the 'size' input is a diameter of the 'target'... so the horizontal range the the Blob Target Proximity responds to will range from 40 to 60.)
    The size of the blob does not affect the Blob Target Proximity. It only considers the distance between the 'bounds ctr h/v' of the blob, and the and the 'x pos' and 'y pos'  and diameter of the Blob Target Proximity. I just checked the code to make sure this is true.
    I hope that helps. If it doesn't, I'd like you to set the monitor 'size' input to 4, and then take a snapshot of what is shown in the Monitor window of Eyes++.
    Best Wishes,
    Mark


  • Hi Mark,

    first: thank you a lot. really :)
    In fact, your suggestion works pretty good, setting better the chroma key and lowering the camera/eyes++ resolution gives me better results: performance monitor says between 150 and 180 cycles, working with all resolutions to 400*300\. (I tried with three of chroma/eyes++ working together) and video seems set to the minimum! I want the patch working with 3 colour detected (red, green and blue) and now I am thinking maybe it is possible my idea: my final goal is to run this patch on a mac "middle class" or lower (i.e. an i5 or similar, 8Gb ram), do you think it's possible?
    Now I'm going more test...
    Stefano

Log in to reply
 

Looks like your connection to TroikaTronix Community Forum was lost, please wait while we try to reconnect.