Improvements in tests, bugfix in digits_video sample

This commit is contained in:
Vladislav Sovrasov
2016-02-05 17:46:52 +03:00
parent 4e3a6328ba
commit 87fc75c6d7
8 changed files with 62 additions and 50 deletions

View File

@@ -27,9 +27,12 @@ def main():
if not os.path.exists(classifier_fn):
print('"%s" not found, run digits.py first' % classifier_fn)
return
model = SVM()
model.load(classifier_fn)
if True:
model = cv2.ml.SVM_load(classifier_fn)
else:
model = cv2.ml.SVM_create()
model.load_(classifier_fn) #Known bug: https://github.com/Itseez/opencv/issues/4969
while True:
ret, frame = cap.read()