Updated state detection API

This commit is contained in:
Matt Hill
2015-10-17 08:53:39 -04:00
parent 322176cc69
commit c4a896d969
5 changed files with 5 additions and 9 deletions

View File

@@ -167,7 +167,7 @@ int main( int argc, const char** argv )
alpr.setDetectRegion(true); alpr.setDetectRegion(true);
Detector* plateDetector = createDetector(&config); Detector* plateDetector = createDetector(&config);
StateDetector stateDetector(country, config.runtimeBaseDir); StateDetector stateDetector(country, config.config_file_path, config.runtimeBaseDir);
OCR ocr(&config); OCR ocr(&config);
vector<double> endToEndTimes; vector<double> endToEndTimes;

View File

@@ -59,7 +59,7 @@ int main( int argc, const char** argv )
} }
Config config("us"); 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) if (DirectoryExists(outDir.c_str()) == false)
{ {

View File

@@ -53,14 +53,10 @@ namespace alpr
recognizer.plateDetector = createDetector(config); recognizer.plateDetector = createDetector(config);
recognizer.ocr = new OCR(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; recognizers[config->country] = recognizer;
} }
setNumThreads(0); setNumThreads(0);

View File

@@ -24,7 +24,7 @@ using namespace std;
namespace alpr { 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); impl = new StateDetectorImpl(country, runtimeDir);
} }

View File

@@ -35,7 +35,7 @@ namespace alpr {
class StateDetector { class StateDetector {
public: 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(); virtual ~StateDetector();
bool isLoaded(); bool isLoaded();