Added toString function to prewarp

This commit is contained in:
Matt Hill
2016-03-14 22:28:08 -04:00
parent 3f6064c672
commit c1018cb1ad
2 changed files with 14 additions and 0 deletions

View File

@@ -111,6 +111,18 @@ namespace alpr
PreWarp::~PreWarp() {
}
std::string PreWarp::toString() {
if (!this->valid)
return "";
stringstream sstream;
sstream << "planar," << w << "," << h << "," << rotationx << "," << rotationy << "," << rotationz << ","
<< panX << "," << panY << "," << stretchX << "," << dist;
return sstream.str();
}
void PreWarp::setTransform(float w, float h, float rotationx, float rotationy, float rotationz, float panX, float panY, float stretchX, float dist)
{
this->w = w;

View File

@@ -46,6 +46,8 @@ namespace alpr
bool valid;
std::string toString();
private:
Config* config;
cv::Mat transform;