def draw_text(self, image, text, size, color, position):
'''
Zeichnet einen Text auf das Bild.
Parameter
---------
text : String
Anzuzeigender Text
size : Integer
Groesse des Textes
color : Tupel
Farbe des Textes >> (255,0,0)
position : Tupel
Position des Textes >> (x,y)
'''
if imutils.is_cv2():
cv2.putText(image, text, position, cv2.FONT_HERSHEY_COMPLEX, size, color, 2, cv2.CV_AA)
elif imutils.is_cv3():
cv2.putText(image, text, position, cv2.FONT_HERSHEY_COMPLEX, size, color, 2, cv2.LINE_AA)
评论列表
文章目录