Skip to content

Commit 1fc676b

Browse files
authored
Merge pull request gzr2017#14 from kokosabu/q15_fix
Q.15の修正
2 parents b436e39 + 3c57a62 commit 1fc676b

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

Question_11_20/answer_15.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@
2929

3030
for y in range(H):
3131
for x in range(W):
32-
out[pad+y, pad+x] = np.mean(K * (tmp[y:y+K_size, x:x+K_size]))
32+
out[pad+y, pad+x] = np.sum(K * (tmp[y:y+K_size, x:x+K_size]))
33+
34+
out[out < 0] = 0
35+
out[out > 255] = 255
3336

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

Question_11_20/answer_15_h.jpg

-6.01 KB
Loading

Question_11_20/answer_15_v.jpg

-6.7 KB
Loading

0 commit comments

Comments
 (0)