任何人都不知道如何从Nvidia dataset synthesizer制作投影矩阵。
样本数据如下。
{
"camera_settings": [
{
"name": "Viewpoint",
"horizontal_fov": 90,
"intrinsic_settings":
{
"resX": 512,
"resY": 512,
"fx": 256,
"fy": 256,
"cx": 256,
"cy": 256,
"s": 0
},
"captured_image_size":
{
"width": 512,
"height": 512
}
}
]
}
{
"camera_data":
{
"location_worldframe": [ 166.55540466308594, 64.836196899414062, 198.98699951171875 ],
"quaternion_xyzw_worldframe": [ 0.40029999613761902, 0.075199998915195465, -0.89759999513626099, 0.16850000619888306 ]
},
"objects": [
{
"class": "",
"instance_id": 15578836,
"visibility": 1,
"location": [ -3.6275999546051025, 19.79640007019043, 303.45550537109375 ],
"quaternion_xyzw": [ 0.075199998915195465, 0.89759999513626099, 0.40029999613761902, 0.16850000619888306 ],
"pose_transform": [
[ 0.3628000020980835, 0.69330000877380371, -0.62269997596740723, 0 ],
[ -0.9319000244140625, 0.26989999413490295, -0.24240000545978546, 0 ],
[ 0, -0.66820001602172852, -0.74400001764297485, 0 ],
[ -3.6275999546051025, 19.79640007019043, 303.45550537109375, 1 ]
],
"cuboid_centroid": [ -3.901900053024292, -13.782299995422363, 267.12539672851562 ],
"projected_cuboid_centroid": [ 252.26069641113281, 242.79170227050781 ],
"bounding_box":
{
"top_left": [ 190.71949768066406, 217.435302734375 ],
"bottom_right": [ 294.18600463867188, 287.78350830078125 ]
},
"cuboid": [
[ -19.205999374389648, -21.958599090576172, 207.91119384765625 ],
[ 30.013900756835938, -36.213001251220703, 220.71449279785156 ],
[ 30.013900756835938, 29.963399887084961, 294.39120483398438 ],
[ -19.205999374389648, 44.217800140380859, 281.587890625 ],
[ -37.817699432373047, -57.527999877929688, 239.85969543457031 ],
[ 11.402199745178223, -71.782402038574219, 252.66299438476562 ],
[ 11.402199745178223, -5.6059999465942383, 326.339599609375 ],
[ -37.817699432373047, 8.6484003067016602, 313.53628540039062 ]
],
"projected_cuboid": [
[ 232.351806640625, 228.96240234375 ],
[ 290.81228637695312, 213.99760437011719 ],
[ 282.09991455078125, 282.055908203125 ],
[ 238.539306640625, 296.19979858398438 ],
[ 215.63760375976562, 194.60090637207031 ],
[ 267.55288696289062, 183.26950073242188 ],
[ 264.94461059570312, 251.60240173339844 ],
[ 225.1221923828125, 263.0614013671875 ]
]
}
]
}
我试图计算从3d到2d的投影矩阵,但无济于事。
到目前为止,我想到了这个
2D = K [R | T] 3D
其中K是[[256,0,256],[0,256,256],[0,0,1]]
R是四元数(xyzw)([0.40029999613761902,0.075199998915195465,-0.89759999513626099,0.16850000619888306])转置的旋转矩阵
T是-R乘以转置矩阵([166.55540466308594,64.836196899414062,198.98699951171875])
但是,这不能产生正确的答案。 如何制作投影矩阵?