Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to stop recognition once a person has already been recognized once #14

Open
rsingh2083 opened this issue Feb 2, 2022 · 2 comments

Comments

@rsingh2083
Copy link

Hi Sir,

Whats happening now : A person is getting recognized continously when infront of the camera.
The problem its causing : While saving the time record to csv sheet, the time record of person is being saved multiple times.
What is required : Once a person has been recognized the program should stop recognizing him again and again.

Could you please help me with this problem ?

@Qengineering
Copy link
Owner

It is very hard to give the right solution to your issue, because this behavior isn't happening in the original code.
Check these points:

  1. At line 317 in the original main.cpp the found face get the index number of the face in the database best matches his.
  2. At line 321 the check is made if the face matches the face in the database. If so, the code continues at line 322.
  3. If not matches, the code jumps to 351 with NameIndex==-1
  4. Here, after some checks, the face is added to the database at line 372.

I think the last step is missing in your code, or isn't reached somehow.
Best to debug the code by placing the good old fashion cout << "I am here at line xx" << endl; at several places and follow the flow of the algorithm.

@rsingh2083
Copy link
Author

ok sir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants