CascadeClassifier faceDetector("lbpcascade_frontalface.xml");
Ptr<Facemark> facemark = FacemarkLBF::create();
facemark->loadModel("lbfmodel.yaml");
加載的lbfmodel.yaml檔案在工程目錄下
報錯資訊如下:
loading data from : lbfmodel.yaml
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: OpenCV(4.1.0) /tmp/opencv-20190416-79810-1mfllqh/opencv-4.1.0/opencv_contrib/modules/face/src/facemarkLBF.cpp:454: error: (-5:Bad argument) No valid input file was given, please check the given filename. in function 'loadModel'
uj5u.com熱心網友回復:
CascadeClassifier faceDetector("lbpcascade_frontalface.xml");
Ptr<Facemark> facemark = FacemarkLBF::create();
facemark->loadModel("lbfmodel.yaml");
VideoCapture cam(0);
uj5u.com熱心網友回復:
他讓我檢查檔案名,我檔案名確定是正確的,但是老是這個錯誤,還請各位不吝賜教uj5u.com熱心網友回復:
后來找到原因了嗎轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/34646.html
標籤:其它技術問題
下一篇:創建 WinForm 應用程式
