Added fixes for #29 and #30

This commit is contained in:
boltgolt 2018-05-03 15:47:44 +02:00
parent 09da631ff6
commit ad2bfd50c5
2 changed files with 10 additions and 11 deletions

6
debian/changelog vendored
View file

@ -1,3 +1,9 @@
howdy (2.2.1) xenial; urgency=medium
* Add notes
-- boltgolt <boltgolt@gmail.com> Thu, 03 May 2018 13:23:09 +0200
howdy (2.1.0) xenial; urgency=medium
* First complete PPA release

View file

@ -37,8 +37,6 @@ user = sys.argv[1]
models = []
# Encoded face models
encodings = []
# Amount of frames already matched
tries = 0
# Amount of ingnored dark frames
dark_tries = 0
@ -82,6 +80,10 @@ while True:
# Increment the frame count every loop
frames += 1
# Stop if we've exceded the time limit
if time.time() - timings[3] > int(config.get("video", "timout")):
stop(11)
# Grab a single frame of video
# Don't remove ret, it doesn't work without it
ret, frame = video_capture.read()
@ -109,9 +111,6 @@ while True:
# Save the new size for diagnostics
scale_height, scale_width = frame.shape[:2]
# Convert from BGR to RGB
frame = frame[:, :, ::-1]
# Get all faces from that frame as encodings
face_encodings = face_recognition.face_encodings(frame)
@ -158,9 +157,3 @@ while True:
# End peacegully
stop(0)
# Stop if we've exceded the maximum retry count
if time.time() - timings[3] > int(config.get("video", "timout")):
stop(11)
tries += 1