reduced thresholds from 4 to 3

This commit is contained in:
Matt Hill
2014-07-02 17:38:11 -04:00
parent dfa2cbf02a
commit 70424df9be

View File

@@ -109,7 +109,7 @@ void displayImage(Config* config, string windowName, cv::Mat frame)
vector<Mat> produceThresholds(const Mat img_gray, Config* config) vector<Mat> produceThresholds(const Mat img_gray, Config* config)
{ {
const int THRESHOLD_COUNT = 4; const int THRESHOLD_COUNT = 3;
//Mat img_equalized = equalizeBrightness(img_gray); //Mat img_equalized = equalizeBrightness(img_gray);
timespec startTime; timespec startTime;
@@ -145,9 +145,9 @@ vector<Mat> produceThresholds(const Mat img_gray, Config* config)
k = 1; k = 1;
NiblackSauvolaWolfJolion (img_gray, thresholds[i++], SAUVOLA, 12, 12, 0.18 * k); NiblackSauvolaWolfJolion (img_gray, thresholds[i++], SAUVOLA, 12, 12, 0.18 * k);
bitwise_not(thresholds[i-1], thresholds[i-1]); bitwise_not(thresholds[i-1], thresholds[i-1]);
k=2; //k=2;
NiblackSauvolaWolfJolion (img_gray, thresholds[i++], SAUVOLA, 12, 12, 0.18 * k); //NiblackSauvolaWolfJolion (img_gray, thresholds[i++], SAUVOLA, 12, 12, 0.18 * k);
bitwise_not(thresholds[i-1], thresholds[i-1]); //bitwise_not(thresholds[i-1], thresholds[i-1]);
if (config->debugTiming) if (config->debugTiming)
{ {