Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to copy a buffer to in memory FileStorage?

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> */

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?