MCPcopy Index your code
hub / github.com/makelove/OpenCV-Python-Tutorial / load_digits

Function load_digits

官方samples/digits.py:56–61  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

54 return cells
55
56def load_digits(fn):
57 print('loading "%s" ...' % fn)
58 digits_img = cv2.imread(fn, 0)
59 digits = split2d(digits_img, (SZ, SZ))
60 labels = np.repeat(np.arange(CLASS_N), len(digits)/CLASS_N)
61 return digits, labels
62
63def deskew(img):
64 m = cv2.moments(img)

Callers 2

preprocessMethod · 0.85
digits.pyFile · 0.85

Calls 1

split2dFunction · 0.85

Tested by

no test coverage detected