KITTI数据集裁剪标记的点云



我正在尝试训练我的模型来识别汽车、行人和骑自行车的人,它需要骑自行车的人、汽车和行人点云作为训练数据。我从KITTI(http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d(下载了数据集,包括标签和速度点(http://www.cvlibs.net/download.php?file=data_object_label_2.zip((http://www.cvlibs.net/download.php?file=data_object_velodyne.zip(。但是,对象标签似乎不是来自这组数据。我尝试裁剪点云以提取对象点云,但我只能获得空白的 3D 空间。这是我在 MATLAB 中的裁剪函数。我的代码中是否有任何错误?其他地方是否有行人、骑自行车者和汽车点云的训练和测试数据集?

function pc = crop_pc3d (pt_cloud, x, y, z, height, width, length)
%keep points only between (x,y,z) and (x+length, y+width,z+height)
%Initialization
y_min = y; y_max = y + width; 
x_min = x; x_max = x + length; 
z_min = z; z_max = z + height;
%Get ROI
x_ind = find( pt_cloud.Location(:,1) < x_max & pt_cloud.Location(:,1) > x_min );
y_ind = find( pt_cloud.Location(:,2) < y_max & pt_cloud.Location(:,2) > y_min );  
z_ind = find( pt_cloud.Location(:,3) < z_max & pt_cloud.Location(:,3) > z_min );
crop_ind_xy = intersect(x_ind, y_ind); 
crop_ind = intersect(crop_ind_xy, z_ind); 
%Update point cloud 
pt_cloud = pt_cloud.Location(crop_ind, :); 
pc = pointCloud(pt_cloud); 
end

标签位于图像坐标平面中。因此,为了将它们用于点云,需要将它们转换为速度坐标平面。 对于此转换,请使用相机校准矩阵提供的校准数据。

校准数据在KITTI上提供。 http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d

最新更新