Skip to content

Commit dd04031

Browse files
authored
Merge pull request gzr2017#12 from kokosabu/q10_fix
fixed
2 parents fd65761 + 9c4f727 commit dd04031

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Question_01_10/answer_10.jpg

571 Bytes
Loading

Question_01_10/answer_10.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
out = np.zeros((H + pad*2, W + pad*2, C), dtype=np.float)
1515
out[pad:pad+H, pad:pad+W] = img.copy().astype(np.float)
1616

17+
tmp = out.copy()
1718

1819
for y in range(H):
1920
for x in range(W):
2021
for c in range(C):
21-
out[pad+y, pad+x, c] = np.median(out[y:y+K_size, x:x+K_size, c])
22+
out[pad+y, pad+x, c] = np.median(tmp[y:y+K_size, x:x+K_size, c])
2223

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

0 commit comments

Comments
 (0)