mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 06:16:56 +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)
|
||||
{
|
||||
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)
|
||||
cout << "Prewarp Initialization Time: " << diffclock(startTime, endTime) << "ms." << endl;
|
||||
}
|
||||
void PreWarp::clear() {
|
||||
this->valid = false;
|
||||
}
|
||||
|
||||
PreWarp::~PreWarp() {
|
||||
}
|
||||
|
@@ -35,6 +35,7 @@ namespace alpr
|
||||
virtual ~PreWarp();
|
||||
|
||||
void initialize(std::string prewarp_config);
|
||||
void clear();
|
||||
|
||||
cv::Mat warpImage(cv::Mat image);
|
||||
std::vector<cv::Point2f> projectPoints(std::vector<cv::Point2f> points, bool inverse);
|
||||
|
Reference in New Issue
Block a user