Re: [osg-users] Convertion to osg::Image from IplImage (OpenCV) for use as texture
HI John, Um... there really isn't much to go on to know why your app might be crashing, a good place to start is to provide a stack trace. Robert. On 9/17/07, John Steinbis [EMAIL PROTECTED] wrote: Hi, I'm trying to convert an IplImage (OpenCV) type to osg::Image type for use as a texture within OSG. My conversion routine attempts to utilize setImage(...) of image class. It crashes and I havent been able to track down the problem. Does anyone have experience with a conversion like this or advise about building osg images from other types? Thank you! -- John ___ 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
Re: [osg-users] Convertion to osg::Image from IplImage (OpenCV) for use as texture
Hi, Just in case, Have you check the format of yours iplImage ? Because there is two main difference between an osg::image and an iplImage : the origin of a iplImage is the top left corner of the screen (down left corner for osg) and the colors are BGR (RGB for osg). And I also remember a similar crash when I used setImage(). Perhaps its the same thing : the third dimension of the image must be 1 and not 0, like this : osg::Image* image= new osg::Image(); image-allocateImage(width, height, 1, GL_RGB, GL_UNSIGNED_CHAR); ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Convertion to osg::Image from IplImage (OpenCV) for use as texture
Hi, I'm trying to convert an IplImage (OpenCV) type to osg::Image type for use as a texture within OSG. My conversion routine attempts to utilize setImage(...) of image class. It crashes and I havent been able to track down the problem. Does anyone have experience with a conversion like this or advise about building osg images from other types? Thank you! -- John ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org