0

我正在尝试训练我的模型来识别汽车、行人和骑自行车的人,它需要骑自行车的人、汽车和行人的点云作为训练数据。我从 KITTI ( http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d ) 下载了标签和 velodyne 点 ( 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
4

1 回答 1

0

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

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

于 2018-10-28T05:03:23.773 回答