mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 05:00:54 +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);
|
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;
|
||||||
|
@@ -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)
|
||||||
{
|
{
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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();
|
||||||
|
Reference in New Issue
Block a user