Skip to content

Commit 9c4f727

Browse files
committed
fixed
1 parent fd65761 commit 9c4f727

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

Lines changed: 2 additions & 1 deletion
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)