python opencv3 向圖像里寫字


git:https://github.com/linyi0604/Computer-Vision

 1 # coding:utf-8
 2 
 3 import cv2  4 
 5 img = cv2.imread("../data/mm1.jpg", cv2.IMREAD_GRAYSCALE)  6 
 7 img = cv2.putText(img, "hello world!", (50, 50), cv2.FONT_HERSHEY_SIMPLEX, 1.2, (0, 255, 0), 2)  8 """
 9 cv2.putText(圖像, 文字, (x, y), 字體, 大小, (b, g, r), 寬度) 10 """
11 
12 cv2.imshow("", img) 13 cv2.waitKey() 14 cv2.destroyAllWindows()

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM