MCPcopy Create free account
hub / github.com/buaacxf/VIPTR / jitter

Function jitter

dataload/dataAug.py:92–105  ·  view source on GitHub ↗

jitter

(img)

Source from the content-addressed store, hash-verified

90
91
92def jitter(img):
93 """
94 jitter
95 """
96 w, h, _ = img.shape
97 if h > 10 and w > 10:
98 thres = min(w, h)
99 s = int(random.random() * thres * 0.01)
100 src_img = img.copy()
101 for i in range(s):
102 img[i:, i:, :] = src_img[:w - i, :h - i, :]
103 return img
104 else:
105 return img
106
107
108def add_gasuss_noise(image, mean=0, var=0.1):

Callers 1

warpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected