an exception occurs when calling getFeatureType

asked 2017-09-25 04:17:57 -0500

I want to get the CascadeClassifier type by calling the member function getFeatureType. But the code throws an access exception. The exception clue are Chinese characters, and the exception describes that 0x60B9CA49 (opencv_objdetect2410d.dll) (in TestFaceDetection.exe) has an unhandled exception: 0xC0000005: An access violation occurred while reading location 0x00000000. How to fix this problem, the code fragment lists following

CascadeClassifier cas;
cas.load("xxx.xml");//xxx.xml is a cascadeclassifier xml file
int feature_type = cas.getFeatureType();
edit retag flag offensive close merge delete


please check, if you accidentally use opencv release libs with debug exe (or the other way round)

this is usually a linker problem, not your code.

(2.4.10 is also quite outdated)

berak gravatar imageberak ( 2017-09-25 04:25:24 -0500 )edit