[PD] opencv motion tracker external HELP!
nosehair911 at bellsouth.net
nosehair911 at bellsouth.net
Tue May 29 21:25:51 CEST 2007
I just realized I should be posting in the pd-dev list so from now on any questions I have relating to
this project will be posted there.
Martin,
I am getting a weird error when I try sym = gensym(symstr); I get
no match for 'operator=' in 'sym = gensym(((char*)(& symstr)))'
I dont know what thats all about. I have seen this used before with no problems.
Alain
>
> 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