MCPcopy Create free account
hub / github.com/Vegetebird/GraphMLP / get_dir

Function get_dir

demo/lib/hrnet/lib/utils/transforms.py:104–111  ·  view source on GitHub ↗
(src_point, rot_rad)

Source from the content-addressed store, hash-verified

102
103
104def get_dir(src_point, rot_rad):
105 sn, cs = np.sin(rot_rad), np.cos(rot_rad)
106
107 src_result = [0, 0]
108 src_result[0] = src_point[0] * cs - src_point[1] * sn
109 src_result[1] = src_point[0] * sn + src_point[1] * cs
110
111 return src_result
112
113
114def crop(img, center, scale, output_size, rot=0):

Callers 1

get_affine_transformFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected