【发布时间】:2020-09-16 05:29:28
【问题描述】:
我从 openCV 将 .yaml 模型加载到 FacemarkLBF 时出错。
cv_landmarks = cv::face::FacemarkLBF::create();
std::cout << "Loading OpenCV model for landmark detection." << std::endl;
cv_landmarks->loadModel("lbfmodel.yaml");
faceDetector.load("haarcascade_frontalface_alt2.xml");
我收到这个错误:
loading data from : lbfmodel.yaml
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: OpenCV(4.3.0) /tmp/opencv-20200408-5080-l00ytm/opencv-4.3.0/opencv_contrib/modules/face/src/facemarkLBF.cpp:487: error: (-5:Bad argument) No valid input file was given, please check the given filename. in function 'loadModel'
此模型在 Visual Studio 上运行良好,但我需要使用 Xcode 制作项目,以便稍后在 iOS 上使用它。
PS:我尝试了不同的模型,但总是出现相同的错误。
【问题讨论】:
标签: c++ ios xcode opencv opencv3.1