mirror of https://github.com/opencv/opencv.git
Open Source Computer Vision Library
https://opencv.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
373 B
13 lines
373 B
#!/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()
|
|
|