MCPcopy Index your code
hub / github.com/HiLab-git/WORD / random_rotation

Function random_rotation

scribbles_generator.py:48–52  ·  view source on GitHub ↗
(image, max_angle=15)

Source from the content-addressed store, hash-verified

46
47
48def random_rotation(image, max_angle=15):
49 angle = np.random.uniform(-max_angle, max_angle)
50 img = Image.fromarray(image)
51 img_rotate = img.rotate(angle)
52 return img_rotate
53
54
55def translate_img(img, x_shift, y_shift):

Callers 1

__call__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected