import cv2.cv2 as cv
import numpy as np
class Trans():
def __init__(self):
self.image_points_3D = np.array([
(137.66, 806.11, 0),
(73.15, 806.23, 0),
(134.78, 649.86, 0),
(75.94, 649.97, 0)
], dtype="double")
self.robot_points_2D = np.array([
(821.65, 1999.73),
(886.09, 1999.77),
(824.60, 1843.45),
(883.35, 1843.48)
], dtype="double")
self.distortion_coeffs = np.zeros((4, 1))
# 焦距设置为其他值也可以,这里只是借用求转换矩阵的功能,原理可进一步讨论
self.focal_length = 1
self.center = (256, 256)
self.matrix_camera = np.array(
[[self.focal_length, 0
Opencv 坐标系系转换
于 2023-09-28 23:15:04 首次发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)