找了很多cv2.putText,总提示
TypeError:an integer is required
TypeError:integer argument expected, got float
只有这个好使
openCV 3.2
cv2.putText(img, txt, (int(x),int(y)), fontFace, fontSize, fontColor, fontThickness)
cv2.putText(img, ‘111’, (20,30), 1, 4, (0,255,0), 2)
本文介绍了一种在使用OpenCV 3.2版本时,解决cv2.putText函数出现TypeError的有效方法。通过确保所有参数为整数类型,避免了错误的发生。

185

被折叠的 条评论
为什么被折叠?



