cv.jit.faces + jit.grab + exportimage


    Nov 24 2008 | 4:03 am
    hello,
    my patch is detecting faces with [cv.jit.faces].
    i am also using [exportimage /Users/xxx/photo jpeg] with [jit.qt.grab]
    i am interested in adding a sequential variable to the end of the filename. currently it overwrites the same image.
    i have tried something like this [exportimage /Users/xxx/photo $1 jpeg].
    the ultimate goal is to exportimage of a jit.qt.grab every time cv.jit.faces detects a face.
    thanks in advance!
    here is my patch for reference: http://pastebin.com/m62e3da3c

    • Nov 24 2008 | 4:47 am
      Check out the sprintf object. I'm guessing your problem is that you have a space between your variable and "photo".
      Zachary
    • Nov 24 2008 | 7:05 pm
      thanks zach, that did the trick!
      i'm curious — how can i use a bang on a [counter] only once even if it keeps banging? for example, check if it's the first bang, and if it is, do not accept more bangs for x amount of time.
    • Nov 24 2008 | 7:58 pm
      check out "onebang"
      David
    • Nov 24 2008 | 8:26 pm
      try [onebang], [speedlim] and else ...
    • Nov 24 2008 | 11:58 pm
      thanks that worked beautifully with a [counter]
    • Mar 13 2012 | 10:37 pm
      Hi, I see this post is quite old, but I have the same problem and I can't understand the answer about the sprintf because I am new to MAX.
      [exportimage /Users/xxx/photo $1 jpeg]
      If I just erase the space between photo and the variable then I just have a photo named photo$1
      What can be done?
      Ty
    • Mar 14 2012 | 9:39 pm
      It might be easier to just use the combine object for this stuff.