Forums > Jitter

cv.jit.faces + jit.grab + exportimage

Nov 24 2008 | 4:03 am


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:

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".


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"


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?


Mar 14 2012 | 9:39 pm

It might be easier to just use the combine object for this stuff.

Viewing 8 posts - 1 through 8 (of 8 total)

Forums > Jitter