cv.jit.faces + jit.grab + exportimage

Nov 24, 2008 at 4:03am

cv.jit.faces + jit.grab + exportimage

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

#41021
Nov 24, 2008 at 4:47am

Check out the sprintf object. I’m guessing your problem is that you have a space between your variable and “photo”.

Zachary

#145659
Nov 24, 2008 at 7:05pm

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.

#145660
Nov 24, 2008 at 7:58pm

check out “onebang”

David

#145661
Nov 24, 2008 at 8:26pm

try [onebang], [speedlim] and else …

#145662
Nov 24, 2008 at 11:58pm

thanks that worked beautifully with a [counter]

#145663
Mar 13, 2012 at 10:37pm

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

#145664
Mar 14, 2012 at 9:39pm

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

#145665

You must be logged in to reply to this topic.