【Opencv学习笔记9】从内存中读取图像

	QFile aFile("C:\\Users\\chaojunche\\Desktop\\1.jpeg");
	aFile.open(QIODevice::ReadOnly | QIODevice::Truncate);
	QByteArray file = aFile.readAll();

	vector vdata(file.data(), file.data() + file.size());
	Mat img_decode = imdecode(cv::Mat(vdata), IMREAD_UNCHANGED);
	imshow("test", img_decode);

你可能感兴趣的:(OpenCV,opencv,学习,计算机视觉)