forked from opencv/opencv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Ptr KNearest::load and python binding
- Loading branch information
1 parent
c9a76ed
commit 621e3ea
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters