opencv+python 在图像上写文字

...
    cnt = 0
    font = cv2.FONT_HERSHEY_SIMPLEX
    for n in temp3_value:
        print(n)
        x = int(n['x'])
        y = int(n['y'])
        point = (x,y)
        cv2.circle(img, point, 1, (0,0,255), 4)
        cv2.putText(img, str(cnt), point, font, 0.5, (255, 255, 255), 1)
        cnt = cnt + 1
...
cv2.putText(img, str(cnt), point, font, 0.5, (255, 255, 255), 1)
参数分别为:原图,文字,文字坐标,字体,字体大小,字体颜色,字体粗细
原文地址:https://www.cnblogs.com/niulang/p/14119012.html