MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / rotate_2d

Function rotate_2d

util/preprocessing.py:343–349  ·  view source on GitHub ↗
(pt_2d, rot_rad)

Source from the content-addressed store, hash-verified

341
342
343def rotate_2d(pt_2d, rot_rad):
344 x = pt_2d[0]
345 y = pt_2d[1]
346 sn, cs = np.sin(rot_rad), np.cos(rot_rad)
347 xx = x * cs - y * sn
348 yy = x * sn + y * cs
349 return np.array([xx, yy], dtype=np.float32)
350
351
352def gen_trans_from_patch_cv(c_x,

Callers 1

gen_trans_from_patch_cvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected