Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

i guess, you wanted this:

cv::String file_name = "C:\\Users\\param.xml";
cv::Ptr<cv::ml::ANN_MLP> nnetwork = ml::StatModel::load<ANN_MLP>(file_name);
cerr << nnetwork->isTrained() << endl;

it's important, to have a cv::Ptr there, not a raw one, else it self-destroys it after coming out of load()