OpenCV设置保存图像压缩率
OpenCV写入静态图片时,imwrite函数第三个参数可以设置压缩率,默认值为95.
cv::Mat inImage= cv::imread("lena.jpg"); vector<int> compression_params;
compression_params.push_back(CV_IMWRITE_JPEG_QUALITY); compression_params.push_back(100); cv::imwrite("outImage.jpg", frame, compression_params);
---------------------------------
业精于勤而荒于嬉 行成于思而毁于随
---------------------------------