imread, imwrite , image color

asked 2014-09-20 05:21:04 -0500

wazhup gravatar image

updated 2015-12-31 09:51:26 -0500

Hello everyone.

I'm trying to understand why the following thing happen...

I do

cv::Mat img = cv::imread(sourceImgPath, CV_LOAD_IMAGE_UNCHANGED);

and after that

cv::imwrite(sPath, img);

where the sPath contains the same file extension. The problem here is that the color from image change, is darker. Any explanation? Any solution to avoid this change?

Thank you.

edit retag flag offensive close merge delete


What if you only load it as cv::Mat img = cv::imread(sourceImgPath);

FLY gravatar imageFLY ( 2014-09-20 11:08:34 -0500 )edit

It's the same FLY

wazhup gravatar imagewazhup ( 2014-09-24 14:45:59 -0500 )edit