[osg-users] Convertion to osg::Image from IplImage (OpenCV) for use as texture
thomas.petit33 at gmail.com
Mon Sep 17 02:18:08 PDT 2007
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);
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users