I am using cv2.putText() to draw a text string on an image.
When I write:
cv2.putText(img, "This is \n some text", (50,50), cv2.FONT_HERSHEY_SIMPLEX, 1, 2)
The text drawn on the image is:
This is ? some text
I was expecting the text to be printed in the new line as \n
is an escape character for newline but it draws ?
on the image instead.
Why this is happening ? am I doing something wrong ?
所有评论(0)