How to copy a buffer to in memory FileStorage?

asked 2013-01-18 12:45:13 -0500

tmanthey gravatar image

I am still trying to load a classifier from memory.

I got until here.

    unsigned char cascadeBuffer[102400]; /* contains the complete cascade xml 
    <?xml version="1.0"?>
    <opencv_storage>
    <cascade>
    ...
    </cascade>
    </opencv_storage> */

int cascadeBufferLength; // the size of the cascade in the buffer

FileStorage fs("cascade.xml", FileStorage::READ|FileStorage::WRITE|FileStorage::MEMORY | FileStorage::FORMAT_XML);

But now what? I tried FileStorage::writeRaw but that did not do it. Thanks for your ideas?

edit retag flag offensive close merge delete