Skipping OCR processing when num of possible characters is too small

This commit is contained in:
Matt Hill
2014-04-08 13:21:15 -05:00
parent 71bcf6169b
commit 004f7a5bd8

View File

@@ -52,6 +52,10 @@ void OCR::performOCR(vector<Mat> thresholds, vector<Rect> charRegions)
getTime(&startTime);
postProcessor->clear();
// Don't waste time on OCR processing if it is impossible to get sufficient characters
if (charRegions.size() < config->postProcessMinCharacters)
return;
for (int i = 0; i < thresholds.size(); i++)
{