From d2bf82a15241f892f376b13e51989c1bf2e775f4 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Fri, 5 Sep 2014 21:07:39 -0400 Subject: [PATCH] Checking OCR existence by country from config, rather than defined country name --- src/openalpr/config.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openalpr/config.cpp b/src/openalpr/config.cpp index 58e5433..513c4d5 100644 --- a/src/openalpr/config.cpp +++ b/src/openalpr/config.cpp @@ -103,7 +103,7 @@ Config::Config(const std::string country, const std::string config_file, const s std::cerr << "--(!) to point to the correct location of your runtime_dir" << endl; return; } - else if (fileExists((this->runtimeBaseDir + "/ocr/tessdata/l" + country + ".traineddata").c_str()) == false) + else if (fileExists((this->runtimeBaseDir + "/ocr/tessdata/" + this->ocrLanguage + ".traineddata").c_str()) == false) { std::cerr << "--(!) Runtime directory '" << this->runtimeBaseDir << "' is invalid. Missing OCR data for the country: '" << country<< "'!" << endl; return;