0

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.

  • Make sure that in Release builds, you link with the Release versions of the OpenCV libs and use the Release dll's. There are known problems if you mix Debug and Release [see here for one example](http://stackoverflow.com/q/8859770/2065121). – Roger Rowland Jan 10 '14 at 14:23
  • thank you for your answer, that's help me so much :) – Fifilia 萧慧 Jan 12 '14 at 04:32

1 Answers1

1

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.

cracktichi
  • 13
  • 3