質問編集履歴
1
誤字
title
CHANGED
File without changes
|
body
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
|
27
27
|
img = cv2.GaussianBlur(img, (3, 3), 0)
|
28
28
|
img = cv2.resize(img, (300, 400))
|
29
|
-
|
29
|
+
res, img = cv2.threshold(img, 130, 255, cv2.THRESH_BINARY_INV)
|
30
30
|
img = img.astype(np.float32) / 255
|
31
31
|
img = np.array(img).reshape(1, 120000)
|
32
32
|
return img
|