Hey guyz;
Quick question: Is it possible to give each face recognized by OpenCV a unique ID?
Like most of the people, im trying to put speech balloons over people. But i want to make it in a discussion-like way.
For example i put a question phrase on visitor#1, when the second visitor enters the Tracking area, i put an answer phrase upon him.
The problem is that the rectangles (PNG images in my case) switch places between the two visitors all the time. So the guy who has a question becomes the one with the answer randomly (well maybe not random, i guess its due to flickering in tracking.)
My question is: how can i give unique tracking id's on visitors so the balloons stick to them and dont switch between visitors?
Heres a part of the code where i get the number of people and put a balloon accordingly.
Code:for( int i=0; i<faces.length; i++ ) {
image(img[0], faces[0].x-150, faces[0].y-150);
if ( faces.length > 1 )
{
image(img[1], faces[1].x-150, faces[1].y-150);
}
if (faces.length > 2)
{
image(img[2], faces[2].x-150, faces[2].y-150);
}
}
println(faces.length);
Thx in advance.