[SOLVED] putText - result is always black text [closed]
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!
If you have an image of just one channel (C1), you just need
cv::Scalar(255)
Thank you for your kind reply. cv::Scalar(255) and cv::Scalar(0) still both produce only black text.
0xff is white for a 8bit image, 0xffff is white for 16bit
Thank you. using 0xffff instead of cv::scalar(255) solved the problem.