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

Function gaussian_noise

python/code_024/opencv_024.py:18–25  ·  view source on GitHub ↗
(image)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected