0
如何将OpenCV图像转换为Microsoft基础类(MFC)CBitmap
对象?如何将cv :: Mat转换为MFC CBitmap
我尝试以下,其失败,
cv::Mat tmp;
(Load opencv image ...)
cv::Size size = tmp.size();
CBitmap bitmap;
// 3 colors (RGB), 24bits (8bits*3channels)
if (!bitmap.CreateBitmap(128, 128, 1, 24, (void *)tmp.data)) {
TRACE0("Failed to create bitmap for image display\n");
return;
}
这导致黑色图像..