From 46c67ef6cd463758467cf4937b9b44ba42883ee6 Mon Sep 17 00:00:00 2001 From: Shervin Emami Date: Sat, 8 Dec 2012 23:35:31 -0800 Subject: [PATCH] Added instructions for 2nd eye detector to the README.txt --- Chapter8_FaceRecognition/README.txt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Chapter8_FaceRecognition/README.txt b/Chapter8_FaceRecognition/README.txt index af2a3b0..77fd8bd 100755 --- a/Chapter8_FaceRecognition/README.txt +++ b/Chapter8_FaceRecognition/README.txt @@ -11,26 +11,28 @@ Note: You need OpenCV v2.4.1 or later (from June 2012), otherwise the FaceRecognizer will not compile or run. - +And you need atleast 3 Face & Eye detection XML files from OpenCV, as shown below. ---------------------------------------------------------- Building the project using CMake from the command-line: ---------------------------------------------------------- Linux: export OpenCV_DIR="~/OpenCV/build" - cp $OpenCV_DIR/../data/lbpcascades/lbpcascade_frontalface.xml . - cp $OpenCV_DIR/../data/haarcascades/haarcascade_eye.xml . mkdir build cd build + cp $OpenCV_DIR/../data/lbpcascades/lbpcascade_frontalface.xml . + cp $OpenCV_DIR/../data/haarcascades/haarcascade_eye.xml . + cp $OpenCV_DIR/../data/haarcascades/haarcascade_eye_tree_eyeglasses.xml . cmake -D OpenCV_DIR=$OpenCV_DIR .. make MacOSX (Xcode): export OpenCV_DIR="~/OpenCV/build" - cp $OpenCV_DIR/../data/lbpcascades/lbpcascade_frontalface.xml . - cp $OpenCV_DIR/../data/haarcascades/haarcascade_eye.xml . mkdir build cd build + cp $OpenCV_DIR/../data/lbpcascades/lbpcascade_frontalface.xml . + cp $OpenCV_DIR/../data/haarcascades/haarcascade_eye.xml . + cp $OpenCV_DIR/../data/haarcascades/haarcascade_eye_tree_eyeglasses.xml . cmake -G Xcode -D OpenCV_DIR=$OpenCV_DIR .. open WebcamFaceRec.xcodeproj @@ -44,6 +46,8 @@ Windows (MS Visual Studio): copy %OpenCV_DIR%\..\data\lbpcascades\lbpcascade_frontalface.xml .\Release\ copy %OpenCV_DIR%\..\data\haarcascades\haarcascade_eye.xml .\Debug\ copy %OpenCV_DIR%\..\data\haarcascades\haarcascade_eye.xml .\Release\ + copy %OpenCV_DIR%\..\data\haarcascades\haarcascade_eye_tree_eyeglasses.xml .\Debug\ + copy %OpenCV_DIR%\..\data\haarcascades\haarcascade_eye_tree_eyeglasses.xml .\Release\ cmake -G "Visual Studio 9 2008" -D OpenCV_DIR=%OpenCV_DIR% .. start WebcamFaceRec.sln @@ -52,5 +56,8 @@ Windows (MS Visual Studio): Running the project: ---------------------------------------------------------- Just execute "WebcamFaceRec". + If it says it can't find a Haar or LBP cascade XML file, copy those XML files from the OpenCV "data" folder to your current folder. + Warning for Visual Studio users: If you run the program directly in Visual Studio (eg: by clicking on "Debug->Start Without Debugging"), then Visual Studio will default to setting the "current folder" as the parent folder instead of the folder with "WebcamFaceRec.exe". So you might need to move or copy the XML file from the Debug / Release folder to the parent folder for it to run directly in Visual Studio. Or adjust your project properties so that it executes the program in the project output folder instead of the solution folder. +