Commit a2cd00a3 authored by Cédric Traizet's avatar Cédric Traizet
Browse files

BUG: read the number of neighbor when using OpenCV >= 3 in...

BUG: read the number of neighbor when using OpenCV >= 3 in KNearestNeighborsMachineLearningModel instead of using the default constructed value
parent 0499b4f9
Pipeline #7367 passed with stages
in 79 minutes and 12 seconds
......@@ -170,6 +170,7 @@ void KNearestNeighborsMachineLearningModel<TInputValue, TTargetValue>::Load(cons
cv::FileStorage fs(filename, cv::FileStorage::READ);
m_KNearestModel->read(fs.getFirstTopLevelNode());
m_DecisionRule = (int)(fs.getFirstTopLevelNode()["DecisionRule"]);
m_K = m_KNearestModel->getDefaultK();
return;
}
ifs.open(filename);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment