save img
作者:互联网
save img
void CameraProject2021::OnPhotoButtonClick() { if (!cameraMat.empty()) { QString picName = getImgName(); qDebug() << picName; bool isSavePic = cv::imwrite(picName.toStdString(), cameraMat); if (isSavePic) { cv::Mat picMat; cameraMat.copyTo(picMat); cv::resize(picMat, picMat, cv::Size(320, 240)); DisplayImg(picMat, ui.label_2); QMessageBox msgBox; msgBox.setText(u8"拍照成功!"); msgBox.exec(); } } }
标签:OnPhotoButtonClick,CameraProject2021,img,void,picName,save 来源: https://www.cnblogs.com/herd/p/14254180.html