mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 02:13:17 +08:00
Updated state detection API
This commit is contained in:
@@ -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;
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user