1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge pull request #19884 from danielenricocahall:fix-prediction-features-bug

Fix bug with predictions in RTrees/Boost

* address bug where predict functions with invalid feature count in rtrees/boost models

* compact matrix rep in tests

* check 1..n-1 and n+1 in feature size validation test
This commit is contained in:
Danny
2021-04-09 12:56:14 -04:00
committed by GitHub
parent 76860933f0
commit a9a6801c6d
3 changed files with 21 additions and 0 deletions
+1
View File
@@ -479,6 +479,7 @@ public:
float predict( InputArray samples, OutputArray results, int flags ) const CV_OVERRIDE
{
CV_TRACE_FUNCTION();
CV_Assert( samples.cols() == getVarCount() && samples.type() == CV_32F );
return impl.predict(samples, results, flags);
}