1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

moving algorithm type to param

This commit is contained in:
Dmitriy Anisimov
2014-09-06 09:29:32 +04:00
parent 5f3ee657ce
commit dfaf75f502
3 changed files with 12 additions and 11 deletions
+1 -1
View File
@@ -330,7 +330,7 @@ void CV_KNearestTest::run( int /*start_from*/ )
}
// KNearest KDTree implementation
Ptr<KNearest> knearestKdt = KNearest::create(ml::KNearest::Params(), ml::KNearest::KDTREE);
Ptr<KNearest> knearestKdt = KNearest::create(ml::KNearest::Params(ml::KNearest::KDTREE));
knearestKdt->train(trainData, ml::ROW_SAMPLE, trainLabels);
knearestKdt->findNearest(testData, 4, bestLabels);
if( !calcErr( bestLabels, testLabels, sizes, err, true ) )