mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 14:16:49 +08:00
Skipping OCR processing when num of possible characters is too small
This commit is contained in:
@@ -53,6 +53,10 @@ void OCR::performOCR(vector<Mat> thresholds, vector<Rect> charRegions)
|
|||||||
|
|
||||||
postProcessor->clear();
|
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++)
|
for (int i = 0; i < thresholds.size(); i++)
|
||||||
{
|
{
|
||||||
// Make it black text on white background
|
// Make it black text on white background
|
||||||
|
Reference in New Issue
Block a user