import cv2
 
cap = cv2.VideoCapture('data/zuqiu.mp4')
while cap.isOpened():
    ret, frame = cap.read()
    # 显示文字:图片,文字,位置,字体类型,字体大小,字体颜色,字体粗细
    cv2.putText(frame, "foot ball", (10, 30), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 0, 255), 2)
    cv2.imshow('frame', frame)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break
 
cap.release()
cv2.destroyAllWindows()
 

Python+opencv显示文字

 

相关文章:

  • 2022-02-10
  • 2021-11-13
  • 2021-05-07
  • 2022-12-23
  • 2022-12-23
  • 2021-06-27
  • 2021-10-18
  • 2022-12-23
猜你喜欢
  • 2022-01-07
  • 2021-11-24
  • 2021-12-03
  • 2021-10-24
  • 2022-12-23
  • 2021-09-08
  • 2022-12-23
相关资源
相似解决方案