View Full Version : Striped image

May 15, 2008, 09:47:43
First, hello to all I'm new here!

I've got a problem when grabbing images to IplImage* to use it in OpenCV.
Nearly all works fine, the grabbed image is displayed right but the copied openCV image has "stripes".
I copy the image with
memcpy(inputRGB->imageData, pBuffer->getPtr(), iImageSize );
"inputRGB" is the IplImage* from openCV.
I'm using VS 2005 and created the "IC Dialog Application" project with the wizard.

Thanks for your help!
Manfred Lachmann

Stefan Geissler
May 15, 2008, 13:08:11

the default pixel format in the memory buffer is RGB 24. You should create your IplImage in the same way.

IplImage = cvCreateImage( cvSize(vbImgSrc->width, vbImgSrc->height), IPL_DEPTH_8U, 3);

May 16, 2008, 07:58:50
Hi Stefan,
thanks a lot! I've found the problem. I've mixed width with height...