文件名称:Opencv2将图像显示在控件中
文件大小:3KB
文件格式:RAR
更新时间:2021-07-06 15:04:42
CvvImage
vs工程中直接添加该类文件;读取图片后,调用下述片段函数: IplImage *pFrame = NULL, *srcImage = NULL; CWnd *pWnd; pWnd = theAPP->GetDlgItem(IDC_STATIC_PIC); //获取pictrue控件句柄 CDC *pDC = theAPP->GetDlgItem(IDC_STATIC_VEDIO)->GetDC();//IDC_STATIC_VEDIO为图片控件的ID HDC hDC = pDC->GetSafeHdc(); pWnd->GetClientRect(▭); CvvImage cimg; cimg.CopyOf(srcImage); cimg.DrawToHDC(hDC, ▭); theAPP->ReleaseDC(pDC);
【文件预览】:
CvvImage.h
readme.txt
CvvImage.cpp