string faceStr;
faceStr = base64_decode(faceImage); //faceImage是base64格式的jpg图片,
std::vector<unsigned char> faceVec(faceStr.begin(), faceStr.end());
cv::Mat faceBgr = cv::imdecode(faceVec, CV_LOAD_IMAGE_COLOR);
cv::imwrite("./receive.jpg", faceBgr);
原文地址:https://www.cnblogs.com/cumtchw/p/11686890.html
时间: 2024-10-15 23:41:14