Skip to content

Commit d8d580e

Browse files
authored
Merge pull request gzr2017#16 from kokosabu/q17_fix
Q.17の修正
2 parents dee6d36 + ab04393 commit d8d580e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Question_11_20/answer_17.jpg

-8.91 KB
Loading

Question_11_20/answer_17.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727

2828
for y in range(H):
2929
for x in range(W):
30-
out[pad+y, pad+x] = np.mean(K * (tmp[y:y+K_size, x:x+K_size]))
30+
out[pad+y, pad+x] = np.sum(K * (tmp[y:y+K_size, x:x+K_size]))
31+
32+
out[out < 0] = 0
33+
out[out > 255] = 255
3134

3235
out = out[pad:pad+H, pad:pad+W].astype(np.uint8)
3336

0 commit comments

Comments
 (0)