mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 11:07:00 +08:00
Added prewarp reset by passing in empty prewarp config
This commit is contained in:
@@ -661,7 +661,10 @@ namespace alpr
|
|||||||
|
|
||||||
void AlprImpl::setPrewarp(std::string prewarp_config)
|
void AlprImpl::setPrewarp(std::string prewarp_config)
|
||||||
{
|
{
|
||||||
prewarp->initialize(prewarp_config);
|
if (prewarp_config.length() == 0)
|
||||||
|
prewarp ->clear();
|
||||||
|
else
|
||||||
|
prewarp->initialize(prewarp_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -103,6 +103,9 @@ namespace alpr
|
|||||||
if (config->debugTiming)
|
if (config->debugTiming)
|
||||||
cout << "Prewarp Initialization Time: " << diffclock(startTime, endTime) << "ms." << endl;
|
cout << "Prewarp Initialization Time: " << diffclock(startTime, endTime) << "ms." << endl;
|
||||||
}
|
}
|
||||||
|
void PreWarp::clear() {
|
||||||
|
this->valid = false;
|
||||||
|
}
|
||||||
|
|
||||||
PreWarp::~PreWarp() {
|
PreWarp::~PreWarp() {
|
||||||
}
|
}
|
||||||
|
@@ -35,6 +35,7 @@ namespace alpr
|
|||||||
virtual ~PreWarp();
|
virtual ~PreWarp();
|
||||||
|
|
||||||
void initialize(std::string prewarp_config);
|
void initialize(std::string prewarp_config);
|
||||||
|
void clear();
|
||||||
|
|
||||||
cv::Mat warpImage(cv::Mat image);
|
cv::Mat warpImage(cv::Mat image);
|
||||||
std::vector<cv::Point2f> projectPoints(std::vector<cv::Point2f> points, bool inverse);
|
std::vector<cv::Point2f> projectPoints(std::vector<cv::Point2f> points, bool inverse);
|
||||||
|
Reference in New Issue
Block a user