# CAPTRA部分代码解读

# pose_fit

pose = pose_fit(coord_pts, pts) 然后 对coord进行处理,使其和pts对齐

因此pose_fit计算的是第一个参数到第二个参数的位姿

绿色是NOCS:coord_pts,红色是观测:pts

另外,计算误差时,矩阵之间要使用np.matmul(R1,R2),而不是直接R1*R2 会有差异,例如检查矩阵是否正交时遇到的问题:

# 可视化

这是plot_all_sequences的输入参数,

img_path ../data/nocs_data/nocs_full/real_test 输入的原始图像路径

exp_list [../runs/1_bottle_rot, ../runs/2_xxx, …]

scene_list [scene_1, scene_2, scene_3, …, scene_7]

output_path ../nocs_viz

intrincics 内参

scale 1000.0

show_fig False

save_fig True

depth False

图像被单独存储到

output_path+scene_name+f'{frame_num}.png'
../nocs_viz/scene_1/0000.png

CAMERA数据集和Real数据集的内参

if opt.data == 'val':
	cam_fx, cam_fy, cam_cx, cam_cy = 577.5, 577.5, 319.5, 239.5
else:
	cam_fx, cam_fy, cam_cx, cam_cy = 591.0125, 590.16775, 322.525, 244.11084