Method #1
IplImage* srcImg = cvCreateImageHeader(cvSize(640, 480), IPL_DEPTH_8U, 1);
cvSetImageData(srcImg, (BYTE)pBuf, WIDTHBYTES(640*IPL_DEPTH_8U*1));
cvSetImageData(srcImg, (BYTE)pBuf, WIDTHBYTES(640*IPL_DEPTH_8U*1));
Method #2
IplImage* srcImg = cvCreateImage( cvSize(640, 480), IPL_DEPTH_8U, 1);
memcpy(srcImg->imageData, pBuf, 640*480*sizeof(BYTE));
memcpy(srcImg->imageData, pBuf, 640*480*sizeof(BYTE));
댓글
댓글 쓰기