无法加载lbpcascade_profile.xml

Bar*_*Das 4 c++ opencv

我正在尝试加载lbpcascade_profileface.xml.

CascadeClassifier cad;
cad.load("C:/opencv/data/lbpcascades/lbpcascade_profileface.xml");
Run Code Online (Sandbox Code Playgroud)

出现以下错误:

OpenCV Error: Parsing error (C:/opencv/data/lbpcascades/lbpcascade_profileface.x
ml(1): Comments are not allowed here) in unknown function, file ..\..\..\src\ope
ncv\modules\core\src\persistence.cpp, line 1818
Run Code Online (Sandbox Code Playgroud)

该怎么办 ?

Bar*_*Das 5

好的,找到了解决方案.我不得不删除xml文件顶部的注释.现在它有效.但不知道为什么他们添加了无法解析的评论.