Added toString function to utility

This commit is contained in:
Matt Hill
2014-06-20 22:29:44 -04:00
parent c5b577b48e
commit 4291547d6f
2 changed files with 25 additions and 0 deletions

View File

@@ -375,3 +375,23 @@ LineSegment LineSegment::getParallelLine(float distance)
return result; return result;
} }
std::string toString(int value)
{
stringstream ss;
ss << value;
return ss.str();
}
std::string toString(float value)
{
stringstream ss;
ss << value;
return ss.str();
}
std::string toString(double value)
{
stringstream ss;
ss << value;
return ss.str();
}

View File

@@ -106,4 +106,9 @@ cv::Rect expandRect(cv::Rect original, int expandXPixels, int expandYPixels, int
cv::Mat addLabel(cv::Mat input, std::string label); cv::Mat addLabel(cv::Mat input, std::string label);
std::string toString(int value);
std::string toString(float value);
std::string toString(double value);
#endif // OPENALPR_UTILITY_H #endif // OPENALPR_UTILITY_H