MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / SolarizeAdd

Function SolarizeAdd

PATH/core/data/transforms/pedattr_transforms.py:154–160  ·  view source on GitHub ↗
(img, addition=0, threshold=128)

Source from the content-addressed store, hash-verified

152
153
154def SolarizeAdd(img, addition=0, threshold=128):
155 img_np = np.array(img).astype(np.int)
156 img_np = img_np + addition
157 img_np = np.clip(img_np, 0, 255)
158 img_np = img_np.astype(np.uint8)
159 img = Image.fromarray(img_np)
160 return PIL.ImageOps.solarize(img, threshold)
161
162
163def Posterize(img, v): # [4, 8]

Callers

nothing calls this directly

Calls 1

clipMethod · 0.80

Tested by

no test coverage detected