opencv c++ 保存为位深度为1的png

vector<int> compression_params;
    compression_params.push_back(IMWRITE_PNG_COMPRESSION);
    compression_params.push_back(3);
    compression_params.push_back(IMWRITE_PNG_BILEVEL);
    compression_params.push_back(1);

    imwrite("text2.png", image1, compression_params);

 

posted on 2023-04-17 18:10  空明流光  阅读(152)  评论(0编辑  收藏  举报

导航