Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

putText: multiple lines?

Can I use newline characters in cv::putText to write multiple lines on an image? My \n characters are not recognized.

Sample code: std::string outputText = "Left \n Right \n"; cv::putText(imageOutput, outputText, cvPoint(30, 20), cv::FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(0,0,0));

My final image ends up with the following text on one line: Left ? Right ?

I'm using Mac OS X Mavericks, OpenCV 2.4.5, xCode

Thanks!

putText: multiple lines?

Can I use newline characters in cv::putText to write multiple lines on an image? My \n characters are not recognized.

Sample code: std::string outputText = "Left \n Right \n"; cv::putText(imageOutput, outputText, cvPoint(30, 20), cv::FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(0,0,0));

My final image ends up with the following text on one line: Left ? Right ?

I'm using Mac OS X Mavericks, OpenCV 2.4.5, xCode

Thanks!

putText: multiple lines?

Can I use newline characters in cv::putText to write multiple lines on an image? My \n characters are not recognized.

Sample code: code:

std::string outputText = "Left \n Right \n"; cv::putText(imageOutput, outputText, cvPoint(30, 20), cv::FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(0,0,0));

My final image ends up with the following text on one line: line:

Left ? Right ?

I'm using Mac OS X Mavericks, OpenCV 2.4.5, xCode

Thanks!

putText: multiple lines?

Can I use newline characters in cv::putText to write multiple lines on an image? My \n characters are not recognized.

Sample code:

code: std::string outputText = "Left \n Right \n"; cv::putText(imageOutput, outputText, cvPoint(30, 20), cv::FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(0,0,0));

My final image ends up with the following text on one line:

line: Left ? Right ?

I'm using Mac OS X Mavericks, OpenCV 2.4.5, xCode

Thanks!

putText: multiple lines?

Can I use newline characters in cv::putText to write multiple lines on an image? My \n characters are not recognized.

Sample code: std::string outputText = "Left \n Right \n"; cv::putText(imageOutput, outputText, cvPoint(30, 20), cv::FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(0,0,0));

My final image ends up with the following text on one line: Left ? Right ?

I'm using Mac OS X Mavericks, OpenCV 2.4.5, xCode

Thanks!

putText: multiple lines?

Can I use newline characters in cv::putText to write multiple lines on an image? My \n characters are not recognized.

Sample Code: std::string outputText = "Left \n Right \n"; cv::putText(imageOutput, outputText, cvPoint(30, 20), cv::FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(0,0,0));

My final image ends up with the following text on one line: Left ? Right ?

I'm using Mac OS X Mavericks, OpenCV 2.4.5, xCode

Thanks!