int nChannels=(g_dstImage.type()>>3)-CV_8U+1;
int iSize=g_dstImage.cols*g_dstImage.rows*nChannels;
HBITMAP hpic2=CreateBitmap( g_dstImage.cols,g_dstImage.rows,
1,nChannels*8,g_dstImage.data);
...全文
9315打赏收藏
opencv 如何把MAT 或IplImage* 转换bitmap
使用OPENCV处理一幅图片,请问怎么把处理好的图片在转换为bitmap或hbitmap呢 下面代码吧MAT转为 HBITMAP 但是图片不能显示 不知道是什么原因 int nChannels=(g_dstImage.type()>>3)-CV_8U+1; int iSize=g_dstImage.cols*g_dstImage.rows*nChannels; HBITMAP hpic2=CreateBitmap( g_dstImage.cols,g_dstImage.rows, 1,nChan