Face-Spoofing-Detection-or-Face-Liveness-Detection
Face-Spoofing-Detection-or-Face-Liveness-Detection copied to clipboard
Build error with VS 2017
Hi, I'm trying to build with Visual Studio 2017. I cloned the repo, downloaded OpenCV 3.0, created a new project adding your files and set the include and lib directory to the opencv include and lib but I got some errors:
1>------ Build started: Project: FaceLivenessDetection, Configuration: Debug Win32 ------
1>trainSVM.cpp
1>c:\progetti\samples\face-spoofing-detection-or-face-liveness-detection-master\facelivenessdetection\facelivenessdetection\trainsvm.cpp(41): error C2039: 'Param': is not a member of 'cv::ml::SVM'
1>c:\progetti\includelibrary\opencv2\ml.hpp(479): note: see declaration of 'cv::ml::SVM'
1>c:\progetti\samples\face-spoofing-detection-or-face-liveness-detection-master\facelivenessdetection\facelivenessdetection\trainsvm.cpp(42): error C2039: 'svmType': is not a member of 'cv::Param'
1>c:\progetti\includelibrary\opencv2\core.hpp(3007): note: see declaration of 'cv::Param'
1>c:\progetti\samples\face-spoofing-detection-or-face-liveness-detection-master\facelivenessdetection\facelivenessdetection\trainsvm.cpp(43): error C2039: 'kernelType': is not a member of 'cv::Param'
1>c:\progetti\includelibrary\opencv2\core.hpp(3007): note: see declaration of 'cv::Param'
1>c:\progetti\samples\face-spoofing-detection-or-face-liveness-detection-master\facelivenessdetection\facelivenessdetection\trainsvm.cpp(44): error C2039: 'C': is not a member of 'cv::Param'
1>c:\progetti\includelibrary\opencv2\core.hpp(3007): note: see declaration of 'cv::Param'
1>c:\progetti\samples\face-spoofing-detection-or-face-liveness-detection-master\facelivenessdetection\facelivenessdetection\trainsvm.cpp(45): error C2039: 'termCrit': is not a member of 'cv::Param'
1>c:\progetti\includelibrary\opencv2\core.hpp(3007): note: see declaration of 'cv::Param'
1>c:\progetti\samples\face-spoofing-detection-or-face-liveness-detection-master\facelivenessdetection\facelivenessdetection\trainsvm.cpp(49): error C2672: 'cv::ml::StatModel::train': no matching overloaded function found
1>c:\progetti\samples\face-spoofing-detection-or-face-liveness-detection-master\facelivenessdetection\facelivenessdetection\trainsvm.cpp(49): error C2780: 'cv::Ptr<T> cv::ml::StatModel::train(const cv::Ptr<cv::ml::TrainData> &,int)': expects 2 arguments - 4 provided
1>c:\progetti\includelibrary\opencv2\ml.hpp(355): note: see declaration of 'cv::ml::StatModel::train'
How can I build the project?
Hi, I'm trying to build with Visual Studio 2017. I cloned the repo, downloaded OpenCV 3.0, created a new project adding your files and set the include and lib directory to the opencv include and lib but I got some errors:
1>------ Build started: Project: FaceLivenessDetection, Configuration: Debug Win32 ------ 1>trainSVM.cpp 1>c:\progetti\samples\face-spoofing-detection-or-face-liveness-detection-master\facelivenessdetection\facelivenessdetection\trainsvm.cpp(41): error C2039: 'Param': is not a member of 'cv::ml::SVM' 1>c:\progetti\includelibrary\opencv2\ml.hpp(479): note: see declaration of 'cv::ml::SVM' 1>c:\progetti\samples\face-spoofing-detection-or-face-liveness-detection-master\facelivenessdetection\facelivenessdetection\trainsvm.cpp(42): error C2039: 'svmType': is not a member of 'cv::Param' 1>c:\progetti\includelibrary\opencv2\core.hpp(3007): note: see declaration of 'cv::Param' 1>c:\progetti\samples\face-spoofing-detection-or-face-liveness-detection-master\facelivenessdetection\facelivenessdetection\trainsvm.cpp(43): error C2039: 'kernelType': is not a member of 'cv::Param' 1>c:\progetti\includelibrary\opencv2\core.hpp(3007): note: see declaration of 'cv::Param' 1>c:\progetti\samples\face-spoofing-detection-or-face-liveness-detection-master\facelivenessdetection\facelivenessdetection\trainsvm.cpp(44): error C2039: 'C': is not a member of 'cv::Param' 1>c:\progetti\includelibrary\opencv2\core.hpp(3007): note: see declaration of 'cv::Param' 1>c:\progetti\samples\face-spoofing-detection-or-face-liveness-detection-master\facelivenessdetection\facelivenessdetection\trainsvm.cpp(45): error C2039: 'termCrit': is not a member of 'cv::Param' 1>c:\progetti\includelibrary\opencv2\core.hpp(3007): note: see declaration of 'cv::Param' 1>c:\progetti\samples\face-spoofing-detection-or-face-liveness-detection-master\facelivenessdetection\facelivenessdetection\trainsvm.cpp(49): error C2672: 'cv::ml::StatModel::train': no matching overloaded function found 1>c:\progetti\samples\face-spoofing-detection-or-face-liveness-detection-master\facelivenessdetection\facelivenessdetection\trainsvm.cpp(49): error C2780: 'cv::Ptr<T> cv::ml::StatModel::train(const cv::Ptr<cv::ml::TrainData> &,int)': expects 2 arguments - 4 provided 1>c:\progetti\includelibrary\opencv2\ml.hpp(355): note: see declaration of 'cv::ml::StatModel::train'
How can I build the project?
Do you have the image database? Please share.