1 | initial version |
Is there a "haarcascade_frontalface_alt.xml" or "haarcascade_eye_tree_eyeglasses.xml" where your exe is, or in your project folder?
Just try to change the two lines with the right path:
String face_cascade_name = "/path/to/the/haarcascade_frontalface_alt.xml";
String eyes_cascade_name = "/path/to/the/haarcascade_eye_tree_eyeglasses.xml";
or (if you are on Windows)
String face_cascade_name = "path\\to\\the\\haarcascade_frontalface_alt.xml";
String eyes_cascade_name = "path\\to\\the\\haarcascade_eye_tree_eyeglasses.xml";
If you do not know what "/path/to/the/"
means, it is something like "/home/ninja/opencv/data/haarcascades/"
, or "C:\\opencv\\data\\haarcascades\\"
for Windows
2 | No.2 Revision |
Is there a "haarcascade_frontalface_alt.xml" "haarcascade_frontalface_alt.xml"
or "haarcascade_eye_tree_eyeglasses.xml" "haarcascade_eye_tree_eyeglasses.xml"
where your exe .exe
is, or in your project folder?
Just try to change the two lines with the right path:
String face_cascade_name = "/path/to/the/haarcascade_frontalface_alt.xml";
String eyes_cascade_name = "/path/to/the/haarcascade_eye_tree_eyeglasses.xml";
or (if you are on Windows)
String face_cascade_name = "path\\to\\the\\haarcascade_frontalface_alt.xml";
String eyes_cascade_name = "path\\to\\the\\haarcascade_eye_tree_eyeglasses.xml";
If you do not know what "/path/to/the/"
means, it is something like "/home/ninja/opencv/data/haarcascades/"
, or "C:\\opencv\\data\\haarcascades\\"
for Windows
Another thing what you can do is to post the error code you are getting, or the result of the comportment of the application. I supposed that you have not put the right path, because in your code is not posted.