MCPcopy Create free account
hub / github.com/SHAILAB-IPEC/OpenFly-Platform / calculate_camera_position

Function calculate_camera_position

train/common.py:35–43  ·  view source on GitHub ↗

Calculate the camera position in the world coordinate system.

(QW, QX, QY, QZ, TX, TY, TZ)

Source from the content-addressed store, hash-verified

33 return R
34
35def calculate_camera_position(QW, QX, QY, QZ, TX, TY, TZ):
36 """
37 Calculate the camera position in the world coordinate system.
38 """
39 R = quaternion_to_rotation_matrix(QW, QX, QY, QZ)
40 R_t = R.T
41 T = np.array([TX, TY, TZ])
42 camera_position_world = -R_t.dot(T)
43 return camera_position_world
44
45def rotation_matrix_to_euler_angles(R):
46 """

Callers 1

cam2worldFunction · 0.70

Calls 1

Tested by

no test coverage detected