I want to ask about cascadeclassfier load doesn't work in release. I using Microsoft Visual Studio 2010 and OpenCV 2.4.7.
my code:
CascadeClassifier cascade;
if(!cascade.load("D:/data/training.xml"))
{
printf("Error load XML!\n");
return -1;
}
Things i've tried so far:
- Tried to specify the path manually using ""
- Tried to use / or \ in the path
- Tried to give user permission
- Tried to call the xml without using absolute path
- Tried to use many kind of codes i've found when searching this error
- Tried to seperate the xml by creating a new folder for them
Additional Information:
- Running in debug mode work 100% perfectly
- Running in release while using visual studio trigger a break
- Running using the exe created while building only show "Error load XML!"
i really confused right now, so i decided to ask.. Thanks before.
I've had similar problems when switch from Debug to Release Mode. I had copy config from Debug to Release and mistake at Linker > Input > Additional Dependencies. And I had fix this problem by using opencv_world320d.lib for Debug mode and opencv_world320.lib for Release mode.