Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

putText - result is always black text

Hello,

I have a Matrix of type CV_16UC1 which holds 16bit grayscale pixel data from an external camera.

I want to use putText to draw WHITE text over the image.

But regardless which of the following two lines I try, the text is displayed, but it is always black.

What am I doing wrong?

cv::putText(target_mat, strStatus, Point2f(50,100), FONT_HERSHEY_PLAIN, 3, cv::Scalar(255,255,255),2); cv::putText(target_mat, strStatus, Point2f(50,100), FONT_HERSHEY_PLAIN, 3, cv::Scalar(0,0,0),2);

Thanks!

[SOLVED] putText - result is always black text

Hello,

I have a Matrix of type CV_16UC1 which holds 16bit grayscale pixel data from an external camera.

I want to use putText to draw WHITE text over the image.

But regardless which of the following two lines I try, the text is displayed, but it is always black.

What am I doing wrong?

cv::putText(target_mat, strStatus, Point2f(50,100), FONT_HERSHEY_PLAIN, 3, cv::Scalar(255,255,255),2); cv::putText(target_mat, strStatus, Point2f(50,100), FONT_HERSHEY_PLAIN, 3, cv::Scalar(0,0,0),2);

Thanks!