byte * 转opencv IplImage

函数如下:
 IplImage* TheImage;
 TheImage=NULL;
 CvSize ImgSize;
 ImgSize.height = height;
 ImgSize.width = width;
 TheImage = cvCreateImage( ImgSize, IPL_DEPTH_8U, 3 );   //RGB

 memcpy((unsigned char)TheImage->imageData,(BYTE *)pRgbBuf,ImgSize.height*ImgSize.width*3)  //

 cvReleaseImage(TheImage);

 

你可能感兴趣的:(byte)