I have downloaded and built open cv according to these open cv docs.
I am trying to compile this Eigenfaces demo, and I am getting the following error.
fatal error: 'opencv2/contrib/contrib.hpp' file not found
The line of concern is
#include "opencv2/contrib/contrib.hpp"
The contrib directory is not in my usr/local/include/opencv/
directory. I have referenced the following SO Question, but it seems to only handle the case of building from scratch.
Also, the repository that it references opencv_contrib does not even contain the file contrib.hpp
How can I simply add the necessary source files to my current build without having to completely rebuild everything?
Since you're obviously using opencv3.0:
the contrib parts have been outsourced to a separate github repo
You'll have to get that, append it to your main opencv (re-)build, and then:
#include <opencv2/face.hpp>
using namespace cv;
Ptr<face::FaceRecognizer> model = face::createLBPHFaceRecognizer(...)
(an additional namespace was added here)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With