Skip to content

Commit

Permalink
feat: add register capability
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldanuega committed Jul 9, 2020
1 parent e983579 commit 22b7912
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Binary file added database/daniel/Jul-09-2020--15:01:39.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified database/representations.pkl
Binary file not shown.
8 changes: 4 additions & 4 deletions register.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def register(database='./database', name='temp'):
r = 0
if os.path.exists(file_path) == False:
os.makedirs(file_path)
cv2.imwrite(os.path.join(file_path, this_time), frame)
cv2.imwrite(os.path.join(file_path, this_time)+'.jpg', frame)
isRegister = True
else:
r = 0
Expand All @@ -51,9 +51,9 @@ def register(database='./database', name='temp'):
break
else:
cv2.imshow("Register Face", frame)

if cv2.waitKey(1) & 0xFF == ord('q'):
break

video.release()
cv2.destroyAllWindows()

if __name__ == '__main__':
register(name='daniel')

0 comments on commit 22b7912

Please sign in to comment.