source: QMUL/trunk/DistanceCheck/README.txt @ 21

Revision 21, 1.5 KB checked in by ginevra, 11 years ago (diff)
2Check distance
5This code is based on the face detection code provided by OpenCV
6and allows for the prediction of whether the user is staying still,
7approaching the camera or withdrawing.
9In the function detect_and_draw of the file face.cpp, the face is
10detected and the area of the face bounding box is returned for each frame.
11The values of the area are stored and used for the prediction of the type
12of movement (staying still, approaching the camera or withdrawing) using
13the functions of the class "DistanceCheck".
14The area of the face bounding box in the current frame is compared with
15the values of the area in a temporal window (currently set to size 4 frames)
16preceding it.
17If the area in the current frame does not change much from the area in the
18first frame of the window (a percentage of 0.1 has been defined in the code)
19then the user is regarded as staying still.
20If the area in the current frame is greater than the average area over the
21temporal window preceding it, then the user is predicted to be approaching
22the camera, otherwise to be withdrawing from it.
23You can experiment with the size of the window and with the percentage (see
24"percent" in the file distanceCheck.cpp) to see which values better suit
25your specific application.
27The code has been written and tested in Windows, but it should work under
28Linux as well.
30You will need to install OpenCV on your machine.
Note: See TracBrowser for help on using the repository browser.