1 | initial version |
You can do this :
Ptr<ANN_MLP> modeleANN;
modeleANN = ANN_MLP::load("opencv_ml_ann_mlp.yml");
your model is ready to predict
2 | No.2 Revision |
You can do this :
Ptr<ANN_MLP> modeleANN;
modeleANN = ANN_MLP::load("opencv_ml_ann_mlp.yml");
Ptr<ANN_MLP> modeleANN;
modeleANN = Algorithm::load<ANN_MLP>("opencv_ml_ann_mlp.yml");
your model is ready to predict
3 | No.3 Revision |
You can do this :
Ptr<ANN_MLP> modeleANN;
modeleANN = ANN_MLP::load("opencv_ml_ann_mlp.yml");
Ptr<ANN_MLP> modeleANN;
modeleANN = Algorithm::load<ANN_MLP>("opencv_ml_ann_mlp.yml");
your model is ready to predictpredict :
modeleANN->predict(feature, result);
Point pos;
minMaxLoc(result, &minX, &maxX, NULL, &pos);
cout << modeleANN->getDefaultName() << " \tclass = " << pos.x << "\t network output "<<result<<"\n";