Re: [osg-users] Webcam image as texture using OpenCV
Hi Charlie, Hi, I am looking a way to use the image grabbed from a webcam using OpenCV and then use that image as a texture in a osg app. Taking the osgmovie example, I already tried to create a subclass of the ImageStream class but Im a little lost trying to do it this way so far I already know how to convert an IplImage to an osg::Image and I'm able to take ONE image from the webcam this way, but now I have no idea in how to do update the image every 1/30 second to create the live stream. You need to call the method dirty() whenever a new frame is grabbed to tell osg to update the texture associated with the osg::image object. Mourad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Webcam image as texture using OpenCV
Hi, I am looking a way to use the image grabbed from a webcam using OpenCV and then use that image as a texture in a osg app. Taking the osgmovie example, I already tried to create a subclass of the ImageStream class but Im a little lost trying to do it this way so far I already know how to convert an IplImage to an osg::Image and I'm able to take ONE image from the webcam this way, but now I have no idea in how to do update the image every 1/30 second to create the live stream. Sombody already solve this issue? Any code to perform this would be really apreciated. Thanks in advance. _ ¿Un navegador seguro buscando estás? ¡Protegete ya en www.ayudartepodria.com! www.ayudartepodria.com___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Webcam image as texture using OpenCV
Hi Charlie, Have a look at the osgdb_gif plugin. It has an internal GifImageStream class which is also derived from ImageStream but much more light-weight. Hope it helps. Cheers, Wang Rui 2010/6/16 Charlie Eppes charlie_ep...@hotmail.es: Hi, I am looking a way to use the image grabbed from a webcam using OpenCV and then use that image as a texture in a osg app. Taking the osgmovie example, I already tried to create a subclass of the ImageStream class but Im a little lost trying to do it this way so far I already know how to convert an IplImage to an osg::Image and I'm able to take ONE image from the webcam this way, but now I have no idea in how to do update the image every 1/30 second to create the live stream. Sombody already solve this issue? Any code to perform this would be really apreciated. Thanks in advance. ¿Un navegador seguro buscando estás? ¡Protegete ya en www.ayudartepodria.com! ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org