0

I am trying to train my model to recognize car, pedestrian and cyclist, it requires the cyclist, car and pedestrian point cloud as the training data. I downloaded the dataset from KITTI (http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d), both the label and the velodyne point(http://www.cvlibs.net/download.php?file=data_object_label_2.zip)(http://www.cvlibs.net/download.php?file=data_object_velodyne.zip). However, the object label doesn't seem to be from this set of data. I attempted to crop the point cloud to extract the object point cloud, but I can only obtain blank 3d space. This is my cropping function in MATLAB. Is there any mistake in my code? Is there any training and testing data set for pedestrian, cyclist and car point cloud available elsewhere?

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
Hon Lin
  • 1
  • 3

1 Answers1

0

The labels are in the image coordinate plane. So, in order to use them for the point cloud, they need to be transformed into velodyne coordinate plane. For this transformation, use calibration data provided by camera calibration matrices.

Calibration data is provide on the KITTI. http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d

ewaolx
  • 98
  • 1
  • 8