Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

char* to FileNode

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 programe and use it to instanlized a CascadeClassifier when it runs.

So we find 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 or the classifier either a filename or a FileNode object for instanlization.

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.

char* to FileNode

We use CascadeClassifier 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 programe program and use it to instanlized a CascadeClassifier when it runs.

So we find 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 CascadeClassifieror the classifier takes either a filename or a FileNode object as a parameter for instanlization.

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. xml.

char* to FileNode

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 CascadeClassifieror the classifier takes either a filename or a FileNode object as a parameter for instanlization. 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.

char* to FileNode

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.

char* to FileNodeFileNode / 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.

click to hide/show revision 6
retagged

updated 2018-10-15 05:15:42 -0600

berak gravatar image

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.