MCPcopy Create free account
hub / github.com/cxapython/catvm / clamp

Function clamp

test.py:19–25  ·  view source on GitHub ↗
(pv)

Source from the content-addressed store, hash-verified

17cv.imwrite("img2.png", gray)
18
19def clamp(pv):
20 if pv > 255:
21 return 255
22 if pv < 0:
23 return 0
24 else:
25 return pv
26
27
28def gaussian_noise(image): # 加高斯噪声

Callers 1

gaussian_noiseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected