mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 06:46:53 +08:00
Added OpenALPR version in constants. Incremented to 1.1.0
This commit is contained in:
@@ -52,10 +52,11 @@ int main( int argc, const char** argv )
|
||||
std::string country;
|
||||
int topn;
|
||||
|
||||
TCLAP::CmdLine cmd("OpenAlpr Command Line Utility", ' ', OPENALPR_VERSION);
|
||||
TCLAP::CmdLine cmd("OpenAlpr Command Line Utility", ' ', Alpr::getVersion());
|
||||
|
||||
TCLAP::UnlabeledValueArg<std::string> fileArg( "image_file", "Image containing license plates", false, "", "image_file_path" );
|
||||
|
||||
|
||||
TCLAP::ValueArg<std::string> countryCodeArg("c","country","Country code to identify (either us for USA or eu for Europe). Default=us",false, "us" ,"country_code");
|
||||
TCLAP::ValueArg<int> seekToMsArg("","seek","Seek to the specied millisecond in a video file. Default=0",false, 0 ,"integer_ms");
|
||||
TCLAP::ValueArg<std::string> runtimeDirArg("r","runtime_dir","Path to the OpenAlpr runtime data directory",false, "" ,"runtime_dir");
|
||||
@@ -94,6 +95,7 @@ int main( int argc, const char** argv )
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
cv::Mat frame;
|
||||
|
||||
Alpr alpr(country, runtimePath);
|
||||
|
@@ -71,6 +71,11 @@ bool Alpr::isLoaded()
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string Alpr::getVersion()
|
||||
{
|
||||
return AlprImpl::getVersion();
|
||||
}
|
||||
|
||||
// Results code
|
||||
|
||||
AlprResult::AlprResult()
|
||||
|
@@ -23,7 +23,6 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
#define OPENALPR_VERSION "1.0"
|
||||
|
||||
struct AlprPlate
|
||||
{
|
||||
@@ -78,6 +77,8 @@ class Alpr
|
||||
|
||||
bool isLoaded();
|
||||
|
||||
static std::string getVersion();
|
||||
|
||||
private:
|
||||
AlprImpl* impl;
|
||||
};
|
||||
|
@@ -352,3 +352,11 @@ void AlprImpl::setDefaultRegion(string region)
|
||||
this->defaultRegion = region;
|
||||
}
|
||||
|
||||
std::string AlprImpl::getVersion()
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
ss << OPENALPR_MAJOR_VERSION << "." << OPENALPR_MINOR_VERSION << "." << OPENALPR_PATCH_VERSION;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#define ALPRIMPL_H
|
||||
|
||||
#include <list>
|
||||
#include <sstream>
|
||||
|
||||
#include "alpr.h"
|
||||
#include "config.h"
|
||||
@@ -32,6 +33,8 @@
|
||||
#include "charactersegmenter.h"
|
||||
#include "ocr.h"
|
||||
|
||||
#include "constants.h"
|
||||
|
||||
#include "cjson.h"
|
||||
|
||||
#include <opencv2/core/core.hpp>
|
||||
@@ -59,6 +62,7 @@ class AlprImpl
|
||||
void setDefaultRegion(string region);
|
||||
|
||||
std::string toJson(const vector<AlprResult> results);
|
||||
static std::string getVersion();
|
||||
|
||||
Config* config;
|
||||
|
||||
|
@@ -16,6 +16,9 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#define OPENALPR_MAJOR_VERSION 1
|
||||
#define OPENALPR_MINOR_VERSION 1
|
||||
#define OPENALPR_PATCH_VERSION 0
|
||||
|
||||
#define CONFIG_FILE "/openalpr.conf"
|
||||
#define KEYPOINTS_DIR "/keypoints"
|
||||
|
Reference in New Issue
Block a user