python - OpenCV:将 Rodrigues() 的旋转矩阵应用于一个点

标签 python opencv rotation

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

我如何在 Python 中做到这一点?

提前致谢。

最佳答案

我找到了一个似乎有效的解决方案。 下面是转换点 (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

关于python - OpenCV:将 Rodrigues() 的旋转矩阵应用于一个点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48011093/

相关文章:

Python 控制台 UI 建议

python - 重新调整现有的 json 文件

python - 按日期排序目录Python

Java OpenCV - 检测 ROI、创建 submat 并复制到原始 mat

c++ - 使用 OpenCV UMat 作为输入时参数的 OpenCL 参数化

ios - 将 NSString 数组显示为带有 CGContext 的圆(有效),但没有角度?

python - 从字符串中提取子字符串,python

c++ - MFC - 如何绘制彩色位图到对话框DC

html - 文本右旋转和右对齐

ios - UI 相当于 setFrameCenterRotation?