diff --git a/src/misc_utilities/benchmarks/benchmark.cpp b/src/misc_utilities/benchmarks/benchmark.cpp index fa71ce2..e33ed5d 100644 --- a/src/misc_utilities/benchmarks/benchmark.cpp +++ b/src/misc_utilities/benchmarks/benchmark.cpp @@ -167,7 +167,7 @@ int main( int argc, const char** argv ) alpr.setDetectRegion(true); Detector* plateDetector = createDetector(&config); - StateDetector stateDetector(country, config.runtimeBaseDir); + StateDetector stateDetector(country, config.config_file_path, config.runtimeBaseDir); OCR ocr(&config); vector endToEndTimes; diff --git a/src/misc_utilities/sortstate.cpp b/src/misc_utilities/sortstate.cpp index d963176..19da685 100644 --- a/src/misc_utilities/sortstate.cpp +++ b/src/misc_utilities/sortstate.cpp @@ -59,7 +59,7 @@ int main( int argc, const char** argv ) } Config config("us"); - StateDetector identifier(config.country, config.runtimeBaseDir); + StateDetector identifier(config.country, config.config_file_path, config.runtimeBaseDir); if (DirectoryExists(outDir.c_str()) == false) { diff --git a/src/openalpr/alpr_impl.cpp b/src/openalpr/alpr_impl.cpp index 35d65f1..f9eaefb 100644 --- a/src/openalpr/alpr_impl.cpp +++ b/src/openalpr/alpr_impl.cpp @@ -53,14 +53,10 @@ namespace alpr recognizer.plateDetector = createDetector(config); recognizer.ocr = new OCR(config); - recognizer.stateDetector = new StateDetector(this->config->country, this->config->runtimeBaseDir); - - - + recognizer.stateDetector = new StateDetector(this->config->country, this->config->config_file_path, this->config->runtimeBaseDir); recognizers[config->country] = recognizer; - } setNumThreads(0); diff --git a/src/statedetection/state_detector.cpp b/src/statedetection/state_detector.cpp index 8c27045..1e18313 100644 --- a/src/statedetection/state_detector.cpp +++ b/src/statedetection/state_detector.cpp @@ -24,7 +24,7 @@ using namespace std; namespace alpr { - StateDetector::StateDetector(const std::string country, const std::string runtimeDir) { + StateDetector::StateDetector(const std::string country, const std::string configFile, const std::string runtimeDir) { impl = new StateDetectorImpl(country, runtimeDir); } diff --git a/src/statedetection/state_detector.h b/src/statedetection/state_detector.h index 4cd29b6..f2cb121 100644 --- a/src/statedetection/state_detector.h +++ b/src/statedetection/state_detector.h @@ -35,7 +35,7 @@ namespace alpr { class StateDetector { public: - StateDetector(const std::string country, const std::string runtimeDir); + StateDetector(const std::string country, const std::string configFile, const std::string runtimeDir); virtual ~StateDetector(); bool isLoaded();