negative value of cv::Mat
I observe that when the Mat data,which were loaded from a picture, transform negative value to zero after subtracting by a number.But I don't need this transform,what should i do ?pleace. The codes are as follows.
#include<iostream>
#include<opencv2/core/core.hpp>
#include<opencv2/highgui/highgui.hpp>
#include<opencv2/imgproc/imgproc.hpp>
using namespace std;
using namespace cv;
int main()
{
Mat M;
Point2i p;
M = imread("D:\\Documents\\Desktop\\Face data\\AR1\\001\\AR001-1.tif", 1);
cvtColor(M, M, CV_BGR2GRAY);
M = M - 300;
cout << M << endl;
waitKey(0);
system("pause");
}