Added OpenALPR version in constants. Incremented to 1.1.0

This commit is contained in:
Matt Hill
2014-04-20 12:57:52 -05:00
parent 5e234fe039
commit 0858369b09
6 changed files with 25 additions and 2 deletions

View File

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

View File

@@ -71,6 +71,11 @@ bool Alpr::isLoaded()
return true;
}
std::string Alpr::getVersion()
{
return AlprImpl::getVersion();
}
// Results code
AlprResult::AlprResult()

View File

@@ -23,7 +23,6 @@
#include <iostream>
#include <vector>
#define OPENALPR_VERSION "1.0"
struct AlprPlate
{
@@ -77,6 +76,8 @@ class Alpr
std::string toJson(const std::vector<AlprResult> results);
bool isLoaded();
static std::string getVersion();
private:
AlprImpl* impl;

View File

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

View File

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

View File

@@ -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"