其他分享
首页 > 其他分享> > 【OpenCV】cv2.putText()函数用法

【OpenCV】cv2.putText()函数用法

作者:互联网

文章目录

cv2.putText()函数用法

cv2.putText(image, text, org, font, fontScale, color[, thickness[, lineType[, bottomLeftOrigin]]])

参数

字体选择

  Python: cv.FONT_HERSHEY_SIMPLEX

  normal size sans-serif font

 

  Python: cv.FONT_HERSHEY_PLAIN

  small size sans-serif font

 

  Python: cv.FONT_HERSHEY_DUPLEX

  normal size sans-serif font (more complex than FONT_HERSHEY_SIMPLEX)

 

  Python: cv.FONT_HERSHEY_COMPLEX

  normal size serif font

 

  Python: cv.FONT_HERSHEY_TRIPLEX

  normal size serif font (more complex than FONT_HERSHEY_COMPLEX)

 

  Python: cv.FONT_HERSHEY_COMPLEX_SMALL

  smaller version of FONT_HERSHEY_COMPLEX

 

  Python: cv.FONT_HERSHEY_SCRIPT_SIMPLEX

  hand-writing style font

 

  Python: cv.FONT_HERSHEY_SCRIPT_COMPLEX

  more complex variant of FONT_HERSHEY_SCRIPT_SIMPLEX

 

  Python: cv.FONT_ITALIC

  flag for italic font

例如

cv2.putText(img, str(i), (123,456)), font, 2, (0,255,0), 3)

标签:putText,FONT,Python,cv2,HERSHEY,OpenCV,COMPLEX,font,cv
来源: https://blog.csdn.net/qq_44824148/article/details/121253422