怎么让我显示的值处于图像的中间
#在图像上显示EAR的值,Exceeding-number超过次数,WARNIG警告次数cv2.putText(img, "WARNIG!:{0}".format(WARNIG),(250, 30), cv2.FONT_HERSHEY_SIMPLEX, 0.7,(0,0,0), 2)
cv2.putText(img, "Exceeding-number:{0}".format(blink_counter),(250, 60), cv2.FONT_HERSHEY_SIMPLEX, 0.7,(0,0,0), 2)
cv2.putText(img, "EAR:{:.2f}".format(ear), (250, 90), cv2.FONT_HERSHEY_SIMPLEX, 0.7,(0,0,0), 2)
print('leftEAR = {0}'.format(leftEAR))#直接输出值
print('rightEAR = {0}'.format(rightEAR))
print('ear = {0}'.format(ear))
print('-'*20)
都用上 OpenCV 了,简单地坐标换算,应该会吧
页:
[1]