This posting is final.
We will face detect and recognize.
OpenCV Download
Extract file and move folder OpenCV-2.3.1/data/harrcascades to
usr/share/opencv/haarcascades
new camcv file download
Editing cmakelists.txt
-
remove camcv.c and add camcv_vid1.cpp
Editing camcv_vid1.cpp
sudo nano camcv_vid1.cpp
Line 59
----------------------------------------------------------------------------------------------
#include "/home/pi/pierre/libfacerec-0.04/include/facerec.hpp"
=>#include "/home/pi/camcv/libfacerec/include/facerec.hpp"로 수정
----------------------------------------------------------------------------------------------
face recognition API
Line 681
---------------------------------------------------------------------------------------------------
fn_haar = "/usr/share/opencv/haarcascades/lbpcascade_frontalface.xml";
=>fn_haar = "/usr/share/opencv/lbpcascades/lbpcascade_frontalface.xml";
---------------------------------------------------------------------------------------------------
face detect lib
Line 764
---------------------------------------------------------------------------------------------------
else if (!raspipreview_create(&state.preview_parameters))
=>else if ( (status = raspipreview_create(&state.preview_parameters)) != MMAL_SUCCESS)
---------------------------------------------------------------------------------------------------
Downloading for test sample image
Copy to /home/pi/camcv/others/
You can see 400's image file and 1 txt file.
open csv.txt
left ';' is image file name, right is id number.
opencv compare this image file and getting id number.
open camcv_vid1.cpp Line 65
define ID number.
go to Line 661
You can see display name.
build
sudo cmake .
sudo make
If you see below error
copy contrib.hpp file.
copy to /usr/include/opencv2/contrib/contrib.hpp
RUN
|
|
/camcv others/csv.txt l 5500
| cs |
Many image file is need long time.
If not display id name, reduce parameter
|
|
/camcv others/csv.txt l 3000
| cs |
but, lower the recognition rate.