Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

DescriptorMatcher::set() crashes in iOS, it's fine in OS X.

I have code that creates a detector, extractor and matcher based on parameters it gets passed. Unfortunately it crashes in iOS while executing the set() function to set the parameters, like in the following snippet:

  const string BRUTE_FORCE("BruteForce");
  const string NORM_TYPE("normType");
  ...
  cv::Ptr<DescriptorMatcher> _descriptorMatcher = DescriptorMatcher::create( matcherType );
    if (_descriptorMatcher.empty())
        cout << "No matcher: " << matcherType.c_str() << endl;
    if (!matcherType.compare(BRUTE_FORCE))
        _descriptorMatcher->set(NORM_TYPE,NORM_HAMMING);

For OSX it works fine however. Same for the FeatureDetector, after calling FeatureDetector::create() any call to the set() method crashes with the debugger showing EXC_BAD_ACCESS(code=1, address=0x0)

Does anyone know why this happens?