YML read() not working for DescriptorExtractor / Android

asked 2015-08-03 21:08:43 -0600

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!

edit retag flag offensive close merge delete

Comments

could you take a look here ?

maybe: first save the default params, then edit the xml, then load again ?

berak gravatar imageberak ( 2015-08-04 00:52:41 -0600 )edit