First time here? Check out the FAQ!
answered 2014-03-18 12:47:26 -0600
Use IMREAD_GRAYSCALE and IMREAD_COLOR flags for imread calls:
IMREAD_GRAYSCALE
IMREAD_COLOR
imread
Mat image = imread("1.jpg", IMREAD_COLOR); Mat mask = imread("mask.jpg", IMREAD_GRAYSCALE);