Ask Your Question

Revision history [back]

YML read() not working for DescriptorExtractor / Android

I'm trying to set parameters for the ORB descriptor extractor. It worked fine with 2.4 but throws an XML parsing exception with 3.0. Even the test code in ORBDescriptorExtractorTest.java seems to fail:

     String filename = OpenCVTestRunner.getTempFileName("yml");
    writeFile(filename, "%YAML:1.0\nscaleFactor: 1.1\nnLevels: 3\nfirstLevel: 0\nedgeThreshold: 31\npatchSize: 31\n");
    extractor.read(filename);

It always fails with CV_PARSE_ERROR( "Valid XML should start with \'\'" ); in persistence.cpp

I also tried feeding it XML, which throws the same error.

Any help would be welcome!