mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 07:13:02 +04:00
ml: add checks of empty train data
This commit is contained in:
@@ -112,6 +112,7 @@ public:
|
||||
|
||||
bool train(const Ptr<TrainData>& data, int) CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(!data.empty());
|
||||
Mat samples = data->getTrainSamples(), labels;
|
||||
return trainEM(samples, labels, noArray(), noArray());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user