NormalBayesClassifier (Bug #4429)
Description
In: modules/ml/src/nbayes.cpp (Line 316)
Wrong plausibility check leads to a CV_Error.
Should be:
if( samples.rows > 1 && ! _results.needed() )
History
Updated by be rak over 9 years ago
given a Ptr<NormalBayesClassifier> bayes;
if bayes->predict(test) is called with more than one row in test, an exception should be thrown (because no results Mat was supplied for the return value).
due to the error above, this does not happen and the results and probabilities Mat's are not allocated correctly.
for more background see:
http://answers.opencv.org/question/64575/normalbayesclassifier-predict-errors/
Updated by be rak over 9 years ago
https://github.com/Itseez/opencv/pull/4167 got merged, i think, we can close this issue.
Updated by Maksim Shabunin over 9 years ago
Thank you!
- Target version set to 3.1
- Status changed from New to Done