Hi Osman,

On 29/05/10 23:38 , Osman Hancer wrote:
> 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 line-offset (skew) could indicate that the image is stored as 4-bytes 
per-pixel (not
three, as indicated by RGB) in the OpenCV image.

You're specifying r=3, is this correct?  Do you have three layers?

/ulrich
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to