OpenCV imwrite gives washed-out result for jpeg images

后端 未结 3 749
你的背包
你的背包 2020-12-11 04:35

I am using OpenCV 3.0 and whenever I read an image and write it back the result is a washed-out image.

code:

cv::Mat img = cv::imrea         


        
3条回答
  •  抹茶落季
    2020-12-11 05:04

    As @Micha commented:

    cv::Mat img = cv::imread("dir/frogImage.jpg",-1);
    cv::imwrite("dir/result.bmp",img);
    

    I was always annoyed when mspaint.exe did the same to jpeg images. Especially for the screenshots...it ruined them everytime.

提交回复
热议问题