Created
February 24, 2017 15:39
-
-
Save rfmerrill/f4aa204f7ad1e6f5099d7a1910e2c5c9 to your computer and use it in GitHub Desktop.
Revisions
-
rfmerrill created this gist
Feb 24, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ #!/usr/bin/env python import numpy as np import os import cv2 kernel = np.ones((6,6), np.float32)/36.0 while True: #img = noisy(sys.argv[1], seed) img = np.random.normal(192, 5, (400,400,1)) cv2.imshow("Noise", np.uint8(img)) img_filtered = cv2.filter2D(img, -1, kernel) cv2.imshow("Filtered noise", np.uint8(img_filtered)) cv2.waitKey(1)