[PD] opencv motion tracker external HELP!

nosehair911 at bellsouth.net nosehair911 at bellsouth.net
Tue May 29 18:07:41 CEST 2007

Thanks for your insight. I will look into that.  It seems like sprintf/atoi is what I need to be looking at.
> From: <martin.peach at sympatico.ca>
> Date: 2007/05/29 Tue AM 11:51:36 EDT
> To: <pd-list at iem.at>
> CC: Tim Boykett <tim at timesup.org>, IOhannes m zmoelnig <zmoelnig at iem.at>, 
<nosehair911 at bellsouth.net>
> Subject: Re: Re: [PD] opencv motion tracker external HELP!
> > I dont think I quite understood.  I tried:
> > 
> > #define FRAMEOUT frame
> > 
> > IplImage *frame = 0;
> > 
> > x->x_outlet = outlet_new(&x->x_obj, &s_anything);
> > outlet_anything(x->x_outlet, FRAMEOUT);
> > 
> > with the same results.  Maybe someone can dumb it down for me?
> You can only work with atoms in pd's message system, and each atom usually contains a bang, a 
float or a symbol. You could convert the pointer to a float but it probably won't work because the 
pointer is a large integer that won't be accurately represented as a float. You could convert the pointer 
to a symbol using something like: 
> char symstr[10];
> t_symbol sym;
> sprintf(symstr, "%p", frame);
> sym = gensym(symstr);
> ...then send sym through the outlet and convert it back to a pointer at the receiving end by extracting 
the string from the s_name field of the symbol and passing it to atol().
> Martin

More information about the Pd-list mailing list