thearn / webcam-pulse-detector

A python application that detects and highlights the heart-rate of an individual (using only their own webcam) in real-time.
Other
3.15k stars 595 forks source link

TypeError: integer argument expected, got float #37

Open YUVRAJ1912 opened 7 years ago

YUVRAJ1912 commented 7 years ago

Hello sir, I got this error when i lock the forehead region please help me......

face detection lock = True Traceback (most recent call last): File "C:/Users/thearn-webcam-pulse-detector-3060060/thearn-webcam-pulse-detector-3060060/get_pulse.py", line 212, in App.main_loop() File "C:/Users/thearn-webcam-pulse-detector-3060060/thearn-webcam-pulse-detector-3060060/get_pulse.py", line 180, in main_loop self.processor.run(self.selected_cam) File "C:\Users\thearn-webcam-pulse-detector-3060060\thearn-webcam-pulse-detector-3060060\lib\processors_noopenmdao.py", line 238, in run cv2.putText(self.frame_out, text,(x - w / 2, y), cv2.FONT_HERSHEY_PLAIN, tsize, col) TypeError: integer argument expected, got float

YUVRAJ1912 commented 7 years ago

i changed this line with this and it works...... cv2.putText(self.frame_out, text,(int(x - w / 2), y), cv2.FONT_HERSHEY_PLAIN, tsize, col)