0
我正在开发一个iOs应用程序,其中我实现了Dlib库以获取图像中的面部标志点。以下是我实施的代码。Dlib图像加载错误,无法加载图像
dlib::frontal_face_detector detector = dlib::get_frontal_face_detector();
dlib::shape_predictor shapePredictor;
NSBundle *mainBundle = [NSBundle mainBundle];
NSString *landmarkdat = [[NSString alloc] initWithFormat:@"%@/%s",
mainBundle.bundlePath,"shape_predictor_68_face_landmarks.dat"];
dlib::deserialize(landmarkdat.UTF8String) >> shapePredictor;
dlib::array2d<dlib::rgb_pixel> img;
dlib::load_image(img,"001.png");
但是当我运行在Xcode 8.3的代码我得到error.dlib::image_load_error: Unable to open file
确保您检查**复制项目,如果需要**当您导入文件 –
我已将该文件复制到项目文件夹 –