MCPcopy
hub / github.com/xingyizhou/CenterNet / get_dir

Function get_dir

src/lib/utils/image.py:74–81  ·  view source on GitHub ↗
(src_point, rot_rad)

Source from the content-addressed store, hash-verified

72
73
74def get_dir(src_point, rot_rad):
75 sn, cs = np.sin(rot_rad), np.cos(rot_rad)
76
77 src_result = [0, 0]
78 src_result[0] = src_point[0] * cs - src_point[1] * sn
79 src_result[1] = src_point[0] * sn + src_point[1] * cs
80
81 return src_result
82
83
84def 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