mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
samples: fix digits_video.py
This commit is contained in:
parent
d9b8a9d90e
commit
f30eafc9ac
@ -86,7 +86,7 @@ def main():
|
||||
frame[y:,x+w:][:SZ, :SZ] = bin_norm[...,np.newaxis]
|
||||
|
||||
sample = preprocess_hog([bin_norm])
|
||||
digit = model.predict(sample)[0]
|
||||
digit = model.predict(sample)[1].ravel()
|
||||
cv.putText(frame, '%d'%digit, (x, y), cv.FONT_HERSHEY_PLAIN, 1.0, (200, 0, 0), thickness = 1)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user