Add empty lines where it makes sense

This commit is contained in:
Philippe Vaucher
2014-03-24 10:45:14 +01:00
parent 4934cf59d2
commit d24ed44f83
7 changed files with 20 additions and 0 deletions

View File

@@ -26,10 +26,12 @@ Alpr::Alpr(const std::string country, const std::string runtimeDir)
{
impl = new AlprImpl(country, runtimeDir);
}
Alpr::~Alpr()
{
delete impl;
}
std::vector<AlprResult> Alpr::recognize(std::string filepath)
{
cv::Mat img = cv::imread(filepath, CV_LOAD_IMAGE_COLOR);
@@ -53,10 +55,12 @@ void Alpr::setDetectRegion(bool detectRegion)
{
impl->setDetectRegion(detectRegion);
}
void Alpr::setTopN(int topN)
{
impl->setTopN(topN);
}
void Alpr::setDefaultRegion(std::string region)
{
impl->setDefaultRegion(region);
@@ -72,6 +76,7 @@ bool Alpr::isLoaded()
AlprResult::AlprResult()
{
}
AlprResult::~AlprResult()
{
}

View File

@@ -58,6 +58,7 @@ AlprImpl::AlprImpl(const std::string country, const std::string runtimeDir)
}
}
}
AlprImpl::~AlprImpl()
{
delete config;
@@ -245,10 +246,12 @@ void AlprImpl::setDetectRegion(bool detectRegion)
{
this->detectRegion = detectRegion;
}
void AlprImpl::setTopN(int topn)
{
this->topN = topn;
}
void AlprImpl::setDefaultRegion(string region)
{
this->defaultRegion = region;

View File

@@ -697,6 +697,7 @@ void CharacterSegmenter::cleanMostlyFullBoxes(vector<Mat> thresholds, const vect
}
}
}
vector<Rect> CharacterSegmenter::filterMostlyEmptyBoxes(vector<Mat> thresholds, const vector<Rect> charRegions)
{
// Of the n thresholded images, if box 3 (for example) is empty in half (for example) of the thresholded images,

View File

@@ -61,6 +61,7 @@ Config::Config(const std::string country, const std::string runtimeBaseDir)
loadValues(country);
}
Config::~Config()
{
delete ini;
@@ -148,14 +149,17 @@ string Config::getCascadeRuntimeDir()
{
return this->runtimeBaseDir + CASCADE_DIR;
}
string Config::getKeypointsRuntimeDir()
{
return this->runtimeBaseDir + KEYPOINTS_DIR;
}
string Config::getPostProcessRuntimeDir()
{
return this->runtimeBaseDir + POSTPROCESS_DIR;
}
string Config::getTessdataPrefix()
{
return "TESSDATA_PREFIX=" + this->runtimeBaseDir + "/ocr/";
@@ -173,6 +177,7 @@ float Config::getFloat(string section, string key, float defaultValue)
float val = atof(pszValue);
return val;
}
int Config::getInt(string section, string key, int defaultValue)
{
const char * pszValue = ini->GetValue(section.c_str(), key.c_str(), NULL /*default*/);
@@ -185,6 +190,7 @@ int Config::getInt(string section, string key, int defaultValue)
int val = atoi(pszValue);
return val;
}
bool Config::getBoolean(string section, string key, bool defaultValue)
{
const char * pszValue = ini->GetValue(section.c_str(), key.c_str(), NULL /*default*/);
@@ -197,6 +203,7 @@ bool Config::getBoolean(string section, string key, bool defaultValue)
int val = atoi(pszValue);
return val != 0;
}
string Config::getString(string section, string key, string defaultValue)
{
const char * pszValue = ini->GetValue(section.c_str(), key.c_str(), NULL /*default*/);

View File

@@ -142,6 +142,7 @@ void PostProcess::clear()
bestChars = "";
matchesTemplate = false;
}
void PostProcess::analyze(string templateregion, int topn)
{
timespec startTime;

View File

@@ -72,6 +72,7 @@ void getTime(timespec* time)
{
clock_gettime(0, time);
}
double diffclock(timespec time1,timespec time2)
{
timespec delta = diff(time1,time2);
@@ -112,6 +113,7 @@ void getTime(timespec* time)
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, time);
#endif
}
double diffclock(timespec time1,timespec time2)
{
timespec delta = diff(time1,time2);

View File

@@ -262,6 +262,7 @@ LineSegment::LineSegment(Point p1, Point p2)
{
init(p1.x, p1.y, p2.x, p2.y);
}
LineSegment::LineSegment(int x1, int y1, int x2, int y2)
{
init(x1, y1, x2, y2);