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);
Detector* plateDetector = createDetector(&config);
StateDetector stateDetector(country, config.runtimeBaseDir);
StateDetector stateDetector(country, config.config_file_path, config.runtimeBaseDir);
OCR ocr(&config);
vector<double> endToEndTimes;

View File

@@ -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)
{

View File

@@ -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);

View File

@@ -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);
}

View File

@@ -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();