OpenCV:将 Rodrigues() 中的旋转矩阵应用于点

Mar*_*coM 6 python opencv rotation

我已经从 Rodrigues() 获得了一个旋转矩阵,我想将它应用于一个点[1,0,0],以便在相机系统中找到它的坐标(暂时忽略平移向量)

我怎样才能在 Python 中做到这一点?

提前致谢。

Mar*_*coM 9

我找到了一个似乎有效的解决方案。这是转换点(1,0,0) 的示例代码:

# Computing rotation matrix
rotation_matrix = np.zeros(shape=(3,3))
cv2.Rodrigues(rvecs, rotation_matrix)
#Apply rotation matrix to point
original_point = np.matrix([[1],[0],[0]])
rotated_point = rotation_matrix*original_point
Run Code Online (Sandbox Code Playgroud)