Hi, I want to convert an OpenCV IplImage to an OSG image. For this, I first fliped image from top-left to bottom-left by
cvConvertImage(cvImg , cvImg, CV_CVTIMG_FLIP); then converted BGR to RGB color format by cvCvtColor( cvImg, cvImg, CV_BGR2RGB ); then I used setImage to do the actual conversion. osgImg->setImage(cvImg->width,cvImg->height, 3, GL_RGB, GL_RGB, GL_UNSIGNED_BYTE,(BYTE*)(cvImg->imageData),osg::Image::AllocationMode::NO_DELETE ,1); The result is not what I expected. First of all, the result is in Greyscale and image seems to shifted a little bit. You can see the results form the attached picture. Do you have any idea about the problem? Thank you! Cheers, osman ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28335#28335 Attachments: http://forum.openscenegraph.org//files/aaaa_700.jpg _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org