Opencv Face Detection Assign id for each face
Hello,
I'm using Opencv for face detection from video stream but my problem is how to assign an id for each detected face? for example if in the current frame i have detected 3 faces so i have 3 unique id for each faces, now in the next frame if i have 4 detected faces then i need an other id to assign it to the new face!!!
how i can assign a unique id for each faces?
also how i can preserve the same id for each face and assign a new id for the new detected face?
Thank you
Lafi
You will need a combination of a prediction algorithm and an assignment algorithm. A kalman filter+Hungarian algorithm for example.
please can you provide an example in python?? it will be very helpfullll!! thank you
Here's a C++ implementation to give you an idea so you can port it to python.