Re: [osg-users] SetImage problem

2010-06-01 Thread Ulrich Hertlein
On 2/06/10 6:26 , Osman Hancer wrote: > My image is 3 BytesPerPixel (24 BitsPerPixel) I am sure of that. > > I chganged r to 1 or data type to IPL_DEPTH_16U and IPL_DEPTH_32U nothing > changed. > > Do you have any other ideas? As Stephan wrote the modified setImage call (with r=1, I believe

Re: [osg-users] SetImage problem

2010-06-01 Thread Stephan Huber
hi, Am 29.05.10 15:38, schrieb Osman Hancer: > osgImg->setImage(cvImg->width,cvImg->height, 3, > GL_RGB, GL_RGB, > GL_UNSIGNED_BYTE,(BYTE*)(cvImg->imageData),osg::Image::AllocationMode::NO_DELETE > ,1); I think there's something wrong with this line of code. Reading

Re: [osg-users] SetImage problem

2010-06-01 Thread Osman Hancer
Hi all, Thank you for your answers. My image is 3 BytesPerPixel (24 BitsPerPixel) I am sure of that. I chganged r to 1 or data type to IPL_DEPTH_16U and IPL_DEPTH_32U nothing changed. Do you have any other ideas? Thanks jp for the tip I will use it. Osman -- Read this topi

Re: [osg-users] SetImage problem

2010-05-31 Thread J.P. Delport
Hi, On 01/06/10 07:48, Ulrich Hertlein wrote: 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,

Re: [osg-users] SetImage problem

2010-05-31 Thread Ulrich Hertlein
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->imag

Re: [osg-users] SetImage problem

2010-05-31 Thread Ümit Uzun
Selam Osman, Did you try void osg::Image::setOrigin ( Origin *origin* ) [inline]function before convert TopLeft image to BottomLeft? May be you won't need any flipping operatio

[osg-users] SetImage problem

2010-05-31 Thread Osman Hancer
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 co