Skip to content

Commit 4bce4b5

Browse files
fix(manipulate_images.py): make the snippet work
1 parent 28b31d0 commit 4bce4b5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

third_party/manipulate_images.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"http://static.cricinfo.com/db/PICTURES/CMS/263600/263697.20.jpg"
88
)
99
gray_inv_img = 255 - np.dot(start_img[..., :3], [0.299, 0.587, 0.114])
10-
blur_img = scipy.ndimage.filters.gaussian_filter(inverted_img, sigma=5)
10+
blur_img = scipy.ndimage.filters.gaussian_filter(gray_inv_img, sigma=5)
1111

1212

1313
def dodge(front, back):
@@ -16,4 +16,5 @@ def dodge(front, back):
1616
return result.astype("uint8")
1717

1818

19-
final_img = dodge(blur_img, gray_img)
19+
final_img = dodge(blur_img, gray_inv_img)
20+
imageio.imwrite('final.jpg', final_img)

0 commit comments

Comments
 (0)