我正在学习 OpenCV 2.4.2 中的 FaceRecognizer 功能并编写了一些代码进行测试。但是,我在此代码上遇到错误:
int num_components = 10;
double threshold = 10.0;
Ptr<FaceRecognizer> model = createEigenFaceRecognizer(num_components, threshold);
带有此错误消息:
First-chance exception at 0x75719617 in Cs.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x001af2e4..
我尝试了几种方法,但无法真正弄清楚导致分配错误的问题是什么。大家对这个错误有什么想法吗?