big trap in “cv::imread()“

big trap in “cv::Mat src=cv::imread(“xxx”, cv::IMREAD_GRAYSCALE)”
if the last stuff not here, then big error for gray image reading, src will have “rgb rgb” buffer, then it is completely not what you want!

你可能感兴趣的:(opencv)