前几天贪便宜,淘了一个二手的d435相机用来搞6d姿态估计,在使用objectdatasettools工具的recode2.py工具生成linemod数据集的rgb与depth图片,进行到 compute_gt_poses.py时报了一个错
Full registration ...
registration::PoseGraph with 0 nodes and 0 edges.
0%| | 0/301 [00:00<?, ?it/s][Open3D WARNING] [KDTreeFlann::SetRawData] Failed due to no data.
[Open3D WARNING] [KDTreeFlann::SetRawData] Failed due to no data.
0%| | 0/301 [00:00<?, ?it/s]
Traceback (most recent call last):
File "compute_gt_poses.py", line 353, in <module>
pose_graph = full_registration(path, max_correspondence_distance_coarse,
File "compute_gt_poses.py", line 182, in full_registration
transformation_icp, information_icp = icp(
File "C:\Users\szz\Desktop\ObjectDatasetTools-master\registration.py", line 50, in icp
icp_coarse = registration.registration_icp(source, target,
RuntimeError: [Open3D ERROR] TransformationEstimationPointToPlane and TransformationEstimationColoredICP require pre-computed normal vectors.
这是因为数据集对齐失败,导致计算时深度图缺失而引起的,我通过输出对齐后的深度图数据,显示全是0的数组,由此推测,应该是对齐的变换矩阵为零导致的,输出的深度图如下图所示。
而对齐变换矩阵与相机的参数有关,不出所料输出参数如下所示
Rotation: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
Translation: [0.0, 0.0, 0.0]
Extrinsics from depth to color are all zeros.
这是我们可以通过intel官方提供的dynamic calibrator相机标定工具来标定相机参数。
标定工具安装路径如下