1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-23 09:38:56 +08:00

Merge pull request #3636 from kaingwade:ml_to_contrib

Move ml to opencv_contrib #3636

Main PR: opencv/opencv#25017
This commit is contained in:
WU Jia
2024-02-27 20:54:59 +08:00
committed by GitHub
parent c5d22ddf14
commit cf63a7f71f
101 changed files with 23882 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python
import cv2 as cv
from tests_common import NewOpenCVTests
class knearest_test(NewOpenCVTests):
def test_load(self):
k_nearest = cv.ml.KNearest_load(self.find_file("ml/opencv_ml_knn.xml"))
self.assertFalse(k_nearest.empty())
self.assertTrue(k_nearest.isTrained())
if __name__ == '__main__':
NewOpenCVTests.bootstrap()