Given an image, this function adds contrast to the image automatically.
Mat contrast(Mat image){
Mat1b gray= imread(image, IMREAD_GRAYSCALE);
Mat1b result;
adaptiveThreshold(gray, result, 255, ADAPTIVE_THRESH_MEAN_C, THRESH_BINARY, 15, 40);
}
Given an image, this function adds contrast to the image automatically.
Mat contrast(Mat image){
Mat1b gray= imread(image, IMREAD_GRAYSCALE);
Mat1b result;
adaptiveThreshold(gray, result, 255, ADAPTIVE_THRESH_MEAN_C, THRESH_BINARY, 15, 40);
}