IR tracking


    Oct 04 2007 | 9:58 pm
    Greetings Folks
    I am working on a project that involves tracking IR LED's used as markers -
    one issue is that an LED is not real large -particularly at a distance - so I am working on creating a larger marker...
    In my testing with cv.jit.track and jit.findbounds (tutorial 25) the CV object loses the VERY small led much more easily than the findbounds...
    I did try using the cv.jit.dilate object as a precursor to the cv.jit.track object in hopes of making my object bigger and thus easier to track...
    I was hoping to us the cv.jit object due to the ability to track several objects - particularly ones that come through the same color...
    any ideas with this one?
    thanks jamie

    • Oct 05 2007 | 12:52 am
      ok.
      1) which cv.jit object?
      2) can you post your patch?
      j
      On Oct 4, 2007, at 5:58 PM, jamie jewett wrote:
      > Greetings Folks > > I am working on a project that involves tracking IR LED's used as > markers - > > one issue is that an LED is not real large -particularly at a > distance - so I am working on creating a larger marker... > > In my testing with cv.jit.track and jit.findbounds (tutorial 25) > the CV object loses the VERY small led much more easily than the > findbounds... > > I did try using the cv.jit.dilate object as a precursor to the > cv.jit.track object in hopes of making my object bigger and thus > easier to track... > > I was hoping to us the cv.jit object due to the ability to track > several objects - particularly ones that come through the same > color... > > > any ideas with this one? > > thanks > jamie > > >
    • Oct 05 2007 | 1:45 am
      sorry - I didn't think it mattered as I had not really gone very far - but here's all the info
      as I mentioned I was looking at cv.jit.track and then tried making the tracked object bigger using cv.jit.dilate before tracking with the cv.jit.track
      I'm finding that jit.findbounds works better - I can post that patch as well if it would be helpful
      I'm on a 2.4 Ghz macbook pro, 4 gigs of ram, jit 1.6.3, max 4.6.3, OS 10.4.10, quicktime 7.1.6,
      thanks for any thoughts...
      essentially just a simple hack of the help files as follows:
      ----- Original Message ---- From: joshua goldberg Sent: Thursday, October 4, 2007 8:52:42 PM Subject: Re: [jitter] IR tracking
      ok.
      1) which cv.jit object?
      2) can you post your patch?
      j
      On Oct 4, 2007, at 5:58 PM, jamie jewett wrote:
      > Greetings Folks > > I am working on a project that involves tracking IR LED's used as > markers - > > one issue is that an LED is not real large -particularly at a > distance - so I am working on creating a larger marker... > > In my testing with cv.jit.track and jit.findbounds (tutorial 25) > the CV object loses the VERY small led much more easily than the > findbounds... > > I did try using the cv.jit.dilate object as a precursor to the > cv.jit.track object in hopes of making my object bigger and thus > easier to track... > > I was hoping to us the cv.jit object due to the ability to track > several objects - particularly ones that come through the same > color... > > > any ideas with this one? > > thanks > jamie > > >
    • Oct 05 2007 | 1:56 am
      Don't use cv.jit.track for these situations. Use cv.jit.label + cv.jit.blobs.centroids or cv.jit.blobs.bounds. cv.jit.blobs.bounds in particular works essentially like jit.findbounds but can track several objects at the same time.
    • Oct 05 2007 | 2:29 am
      many thanks!
      I'll give that a try
      best jamie
      ----- Original Message ---- From: Jean-Marc Pelletier Sent: Thursday, October 4, 2007 9:56:14 PM Subject: [jitter] Re: IR tracking
      Don't use cv.jit.track for these situations. Use cv.jit.label + cv.jit.blobs.centroids or cv.jit.blobs.bounds. cv.jit.blobs.bounds in particular works essentially like jit.findbounds but can track several objects at the same time.
    • Oct 05 2007 | 3:55 am
      Hello again
      I tried using cv.jit.label but it sees the background as one large blob.. and does not see the two small points
      any suggestions - I'm just working with the help file - no mods...
      thanks jamie
      ----- Original Message ---- From: Jean-Marc Pelletier Sent: Thursday, October 4, 2007 9:56:14 PM Subject: [jitter] Re: IR tracking
      Don't use cv.jit.track for these situations. Use cv.jit.label + cv.jit.blobs.centroids or cv.jit.blobs.bounds. cv.jit.blobs.bounds in particular works essentially like jit.findbounds but can track several objects at the same time.
    • Oct 05 2007 | 4:28 am
      You need to process the image before sending it to cv.jit.label. If you are tracking LEDs than I assume they show up as bright spots. Your object sequence would then be something like: [jit.qt.grab]->[jit.rgb2luma]->[jit.op @op >]->[cv.jit.label @charmode 1]
      The cv.jit.blobs.bounds helpfile is built this way. You need, of course, to provide jit.op with the proper threshold value. If it picks up the whole backgound, then your threshold value is too low.
    • Oct 05 2007 | 11:16 am
      CV objects also have threshold value argument (default 20). Try changing the value.
      j
    • Oct 05 2007 | 11:59 am
      I use also JIT.BRCOSA with negative importance of the contrast, for determination integer sorry for bad english *(
    • Oct 05 2007 | 2:16 pm
      no need for extra calculation . just change jit.op @op > into jit.op @op < to get inverse result .
      j
    • Oct 11 2007 | 2:10 am
      Hi, I'm wondering what you're using to pick up the IR -- a special camera of some sort? Wondering if simply using a cluster of LEDs for each point would give cv. more to work with. I'm doing some sensor stuff too and would like to hear how your project is going. The nice thing about the IR LEDs (versus an IR distance sensor, which I'm using) is the price... very cheap.
      The prior answers about processing the image / matrix are what you're looking for, tweaking the threshold values for jit.op (after RGB2LUMA) does the trick. No need for jit.brcosa, though that's certainly another way to do it. I do think (though I'm not sure) that a jit.op > or < is more efficient than jit.brcosa, based on the math needed (less complex calculations, usually). It's important to optimize what you can, as cv.blobs etc. use a lot of processing, just by their nature.
      --CJ
    • Oct 11 2007 | 2:43 am
      Quote: seejayjames wrote on Wed, 10 October 2007 20:10 ---------------------------------------------------- It's important to optimize what you can, as cv.blobs etc. use a lot of processing, just by their nature. ----------------------------------------------------
      Not really. cv.jit.label is fairly efficient and either blobs.bounds and blobs.centroids should not be particularly slower than jit.findbounds or cv.jit.centroids. The objects that really eat up CPU time are cv.jit.faces, cv.jit.HS/LKflow and cv.jit.lines.
      For IR tracking, I had the best results with a few LEDs arranged in a distinctive L-shaped pattern. This allowed me to compute not only the position but the orientation and the slant of the object.
    • Oct 11 2007 | 2:55 am
      I am using some special high brightness LEDs from ebay - they seem to have 3 elements in them and are quite large - 10mm I think - If you sand the plastic then the light is defused and you can see the LED form any angle -
      then I am using the cheapest sony camera I could find (used) on ebay that has night-night Putting an inexpensive IR filter on this camera and I have found that using the night shot option works better than just the filter - this said, I put a piece of tape over the IR emitter in the camera to minimize the general IR and this seems to help as well you have to be careful of what the lighting is in the room you are in as well - dimmable compact fluorescents seem to work the best as florescent light has very little IR in it.
      I did find that going in to a jit.op > worked just fine and there was no need to do something more complicated....
      the LEDs are quite small at a distance - so the large form factor has been quite important and work much better than the smaller units I found at a similar brightness... you can grind the plastic on the LED and end up with something flatter if form factor is important...
      hope this helps jamie
      ----- Original Message ---- From: Seejay James Sent: Wednesday, October 10, 2007 10:10:08 PM Subject: [jitter] Re: IR tracking
      Hi, I'm wondering what you're using to pick up the IR -- a special camera of some sort? Wondering if simply using a cluster of LEDs for each point would give cv. more to work with. I'm doing some sensor stuff too and would like to hear how your project is going. The nice thing about the IR LEDs (versus an IR distance sensor, which I'm using) is the price... very cheap.
      The prior answers about processing the image / matrix are what you're looking for, tweaking the threshold values for jit.op (after RGB2LUMA) does the trick. No need for jit.brcosa, though that's certainly another way to do it. I do think (though I'm not sure) that a jit.op > or < is more efficient than jit.brcosa, based on the math needed (less complex calculations, usually). It's important to optimize what you can, as cv.blobs etc. use a lot of processing, just by their nature.
      --CJ
    • Oct 11 2007 | 3:26 am
      the L shape is a good idea - here's a link to a 'real' marker:
      a wireless boomerang marker - bet those are cheap!
      and better yet that your dancers will be happy wearing them -
      mine just balked at 2 AAA batts and now I'm back to trying to get blood (100mA) from a stone (button cell)!
      but I am finding the the oldschool 'flingy' or 'throwie' works surprisingly well - tape, a button cell and your LED! can't really understand why the spec on the LED says it wants 100-500 mA but it seems just as bright when driven by a 3mA max 3v button cell...
      go figure...
      jamie
      ----- Original Message ---- From: Jean-Marc Pelletier Sent: Wednesday, October 10, 2007 10:43:58 PM Subject: [jitter] Re: IR tracking
      Quote: seejayjames wrote on Wed, 10 October 2007 20:10 ---------------------------------------------------- It's important to optimize what you can, as cv.blobs etc. use a lot of processing, just by their nature. ----------------------------------------------------
      Not really. cv.jit.label is fairly efficient and either blobs.bounds and blobs.centroids should not be particularly slower than jit.findbounds or cv.jit.centroids. The objects that really eat up CPU time are cv.jit.faces, cv.jit.HS/LKflow and cv.jit.lines.
      For IR tracking, I had the best results with a few LEDs arranged in a distinctive L-shaped pattern. This allowed me to compute not only the position but the orientation and the slant of the object.
    • Oct 11 2007 | 3:36 am
      You can also use a reflective marker like Skotchlite tape. This will reflect IR more strongly than any other material and thus will appear as a brighter spot in your image. You need a strong external IR light source but regular incandescent and halogen lights emit a lot of light in the IR spectrum.
    • Oct 11 2007 | 4:06 am
      also -
      if you can make your LED's a little 'lamp shade' lik with some interfacing or something you will end up with a larger - but friendly - target...
      best jamie
    • Oct 11 2007 | 4:16 am
      another idea would be to put some Skotchlite behind your LED with a tiny amount of space - thus amplifying the size of the marker w/o having the external IR issue... I 'm gonna try that !
      best jamie
      ----- Original Message ---- From: Jean-Marc Pelletier Sent: Wednesday, October 10, 2007 11:36:58 PM Subject: [jitter] Re: Re: IR tracking
      You can also use a reflective marker like Skotchlite tape. This will reflect IR more strongly than any other material and thus will appear as a brighter spot in your image. You need a strong external IR light source but regular incandescent and halogen lights emit a lot of light in the IR spectrum.
    • Oct 11 2007 | 6:15 am
      wow, my bad. Awesome that you're on the forums Jean, your objects are fantastic. I guess I saw the performance drop only on my aging system ;-)
      I have no idea what kind of algorithms you had to come up with to make these objects work, very complex, it's great that you did. Thanks for all that!! These make a lot of additional projects possible.... wondering what cool stuff you've been working with.
      --thanks again, CJ
    • Nov 07 2007 | 3:27 pm
      Quote: Jean-Marc Pelletier wrote on Wed, 10 October 2007 20:43 ---------------------------------------------------- > Quote: seejayjames wrote on Wed, 10 October 2007 20:10 > ---------------------------------------------------- > It's important to optimize what you can, as cv.blobs etc. use a lot of processing, just by their nature. > ---------------------------------------------------- > > Not really. cv.jit.label is fairly efficient and either blobs.bounds and blobs.centroids should not be particularly slower than jit.findbounds or cv.jit.centroids. The objects that really eat up CPU time are cv.jit.faces, cv.jit.HS/LKflow and cv.jit.lines. > > For IR tracking, I had the best results with a few LEDs arranged in a distinctive L-shaped pattern. This allowed me to compute not only the position but the orientation and the slant of the object. > > ----------------------------------------------------
      Jean,
      I am doing a very similar project, which will hopefully be 3 visible LED's (instead of IR), which will be able to give me the x/y position, which I have already managed to do with your cv.jit.label and cv.jit.blobs.centroids objects (these are great by the way!). These LEDs will be mounted on a case which the user will hold, and will press against a fabric frame - the light from the LED lights up areas of the underside of the fabric and the camera tracks these light spots. I would really like to be able to get orientation data from these 3 spots - so twisting the case clockwse/anticlockwise will produce a value. I have tried using the cv.jit.direction and orientation objects, but am still a little confused as to their workings.
      You say that you mount your LEDs in an L shape, and are able to get the orienation and the slant information out of these. Is this using the cv.jit.orientation or direction object? If I were to mount my LEDs in an isosceles triangle or L shape, would cv.jit.direction be able to calculate the angle of the triangle pointing to it's tip? Also, I notice you say it computes the orientation of a shape's main axis. If I have got 3 blobs on my screen (in a L shape for example), will it interpret the 3 blobs as 1 shape, or does this object only like to work with 1 shape to start with? I hope this makes sense :-)
      Regards,
    • Nov 08 2007 | 7:48 am
      I'm just looking at the coordinates for the 3 points and calculating the distance between them. Since the shape is like an L, by looking at the length of the segments, I can know where each corner is. Also, if I know what relative length the segments should be if the shape were flat, I can also calculate (to some extent) the surface's slant. For this, all I need the the cv.jit.blob.centroids object.
      Quote: spbinns wrote on Wed, 07 November 2007 08:27
      > You say that you mount your LEDs in an L shape, and are able to get the orienation and the slant information out of these. Is this using the cv.jit.orientation or direction object? If I were to mount my LEDs in an isosceles triangle or L shape, would cv.jit.direction be able to calculate the angle of the triangle pointing to it's tip? Also, I notice you say it computes the orientation of a shape's main axis. If I have got 3 blobs on my screen (in a L shape for example), will it interpret the 3 blobs as 1 shape, or does this object only like to work with 1 shape to start with? I hope this makes sense :-)
    • Nov 15 2007 | 10:06 pm
      Just want to mention that if you put an already processed/developed empty camera film-roll in front of a webcam it will filter out everything but the IR. Totaly cool for tracking IR in jitter! Im working on a similar project at the moment..