Python Forum
Object Detection that records the number of secs the face is not detected - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Object Detection that records the number of secs the face is not detected (/thread-4076.html)



Object Detection that records the number of secs the face is not detected - trabis03 - Jul-21-2017

Hello can someone help me in coding,

I don't know how I can create a program that will record the number of seconds that the object is not detected.


RE: Object Detection that records the number of secs the face is not detected - nilamo - Jul-21-2017

import time
import recognition # ...I guess?

start = time.time()
face = recognition.Facial()

while not face.detected():
   time.sleep(0.01)

print("It took {0} seconds.".format(time.time() - start))