我正在尝试将一组形成一个盒子的点对准一个带有英特尔实感D435 3D相机的opencv 9 * 6校准棋盘 . 我正在尝试修改Python SDK的一个例子,它已经在里面有一个Kabsch算法转换函数 . 示例是向对象添加边界框的示例 .

我的问题是,每当我尝试使用此函数对齐我的点(使用棋盘的现有角作为起点计算并添加框的长度,宽度和高度)时,总是存在差异 . 应该 .

我的代码转换我的点的坐标基本上是

point_b = transformation_devices[device].inverse().apply_transformation(np.asarray([[(x + width)],[y], [z]]))
#used to calculate the position of the point and directly transform it, the apply_transformation() function is the built-in transformation function of the example

b_x, b_y = rs.rs2_project_point_to_pixel(intrinsics, b)
#to return to 2D coordinates and display the box using opencv

您是否看到我在方法中遗漏的任何明显错误?有没有更好的方法来尝试将3D点对齐棋盘?

编辑:我想要实现的是将图像中的紫色框与棋盘对齐,有点像绿色棋盘

Image