MCPcopy Create free account
hub / github.com/HiLab-git/WORD / translate_img

Function translate_img

scribbles_generator.py:55–60  ·  view source on GitHub ↗
(img, x_shift, y_shift)

Source from the content-addressed store, hash-verified

53
54
55def translate_img(img, x_shift, y_shift):
56
57 (height, width) = img.shape[:2]
58 matrix = np.float32([[1, 0, x_shift], [0, 1, y_shift]])
59 trans_img = cv2.warpAffine(img, matrix, (width, height))
60 return trans_img
61
62
63def get_largest_two_component_2D(img, print_info=False, threshold=None):

Callers 1

__call__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected