MCPcopy Create free account
hub / github.com/JimmyHHua/opencv_tutorials / gaussian_noise

Function gaussian_noise

python/code_025/opencv_025.py:19–26  ·  view source on GitHub ↗
(image)

Source from the content-addressed store, hash-verified

17
18
19def gaussian_noise(image):
20 noise = np.zeros(image.shape, image.dtype)
21 m = (15, 15, 15)
22 s = (30, 30, 30)
23 cv.randn(noise, m, s)
24 dst = cv.add(image, noise)
25 cv.imshow("gaussian noise", dst)
26 return dst
27
28
29src = cv.imread("./test.png")

Callers 1

opencv_025.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected