char* to FileNode / Hide our XML configurations
We use CascadeClassifier
in a demo program, but we don't won't pass the xml file of the classifier directly to others.
One way we were trying is to pre-compile
the xml's content into the program and use it to instanlized a CascadeClassifier when it runs.
So we found that, through code like the below, the content in a xml can be compiled into the .exe
(executable) file, and presented as a const char *
. However, the constractors of CascadeClassifier
takes either a filename or a FileNode object as a parameter for instanlization, cannot be a char*
.
Is there a way to transform a const char *
to a FileNode
object?
const char *VX =
#include "./models/haarcascade_smile_R.xml"
;
Besides, are there anyother ways to 'hide' the configuration? Make it not so easy to be 'human-readable' as an xml.