Itseez/opencv — pull request #313 by BloodAxe (2013-01-21 08:00:47+00:00)
Title: Added ostream-like cv::putText helper function

This commit brings an ostream-like text rendering on the cv::Mat.
Unlike existing function, a new putText funtion allows to use operator << to print
text on cv::Mat and supports newline characters. You can see the
demonstration of the new cv::putText in drawing.cpp sample.

The proposed request allows to print text on the images in the following way:
putText(image2, cv::Point(100,100), CV_FONT_HERSHEY_COMPLEX, 1, Scalar(i, i, 255))
<< "cv::putText() Demo!" << std::endl
<< "cv::putText(...) << \"Hello\\nWorld\";" << std::endl
<< "You can use std::endl" << std::endl
<< "or even\\n symbol\nto format text" << std::endl
<< "And we support formatters:\n"
<< "std::setprecision(5)" << std::setprecision(5) << CV_PI << std::endl
<< "std::scientific " << std::scientific << CV_PI << std::endl
<< "So you can use cv::putText like regular std::cout!";