OpenCV putText() new line character - Stack Overflow

PHOTO EMBED

Fri Jun 25 2021 22:39:06 GMT+0000 (Coordinated Universal Time)

Saved by @joannpav #python

text = "This is \n some text"
y0, dy = 50, 4
for i, line in enumerate(text.split('\n')):
    y = y0 + i*dy
    cv2.putText(img, line, (50, y ), cv2.FONT_HERSHEY_SIMPLEX, 1, 2)
content_copyCOPY

https://stackoverflow.com/questions/27647424/opencv-puttext-new-line-character