fix digits.py to not ignore model parameters

otherwise model is only ever trained with default
parameters, and digits_adjust does nothing (for example)
pull/5102/head
John Stowers 9 years ago
parent 429d280501
commit c4c3f1b25e
  1. 2
      samples/python2/digits.py

@ -77,7 +77,6 @@ class KNearest(StatModel):
self.model = cv2.ml.KNearest_create()
def train(self, samples, responses):
self.model = cv2.ml.KNearest_create()
self.model.train(samples, cv2.ml.ROW_SAMPLE, responses)
def predict(self, samples):
@ -93,7 +92,6 @@ class SVM(StatModel):
self.model.setType(cv2.ml.SVM_C_SVC)
def train(self, samples, responses):
self.model = cv2.ml.SVM_create()
self.model.train(samples, cv2.ml.ROW_SAMPLE, responses)
def predict(self, samples):

Loading…
Cancel
Save