lidar

What is the fastest way to map group names of numpy array to indices?

人盡茶涼 提交于 2020-01-23 05:18:25
问题 I'm working with 3D pointcloud of Lidar. The points are given by numpy array that looks like this: points = np.array([[61651921, 416326074, 39805], [61605255, 416360555, 41124], [61664810, 416313743, 39900], [61664837, 416313749, 39910], [61674456, 416316663, 39503], [61651933, 416326074, 39802], [61679969, 416318049, 39500], [61674494, 416316677, 39508], [61651908, 416326079, 39800], [61651908, 416326087, 39802], [61664845, 416313738, 39913], [61674480, 416316668, 39503], [61679996,

How project Velodyne point clouds on image? (KITTI Dataset)

痴心易碎 提交于 2020-01-13 19:42:51
问题 Here is my code to project Velodyne points into the images: cam = 2; frame = 20; % compute projection matrix velodyne->image plane R_cam_to_rect = eye(4); [P, Tr_velo_to_cam, R] = readCalibration('D:/Shared/training/calib/',frame,cam) R_cam_to_rect(1:3,1:3) = R; P_velo_to_img = P*R_cam_to_rect*Tr_velo_to_cam; % load and display image img = imread(sprintf('D:/Shared/training/image_2/%06d.png',frame)); fig = figure('Position',[20 100 size(img,2) size(img,1)]); axes('Position',[0 0 1 1]); imshow

Speed up python's struct.unpack

风流意气都作罢 提交于 2020-01-01 09:39:13
问题 I am trying to speed up my script. It basically reads a pcap file with Velodyne's Lidar HDL-32 information and allows me to get X, Y, Z, and Intensity values. I have profiled my script using python -m cProfile ./spTestPcapToLas.py and it is spending the most amount of time in my readDataPacket() function calls. In a small test (80 MB file) the unpacking portion takes around 56% of the execution time. I call the readDataPacket function like this ( chunk refers to the pcap file): packets = []

How to filter numpy array by list of indices?

你说的曾经没有我的故事 提交于 2019-12-18 07:59:48
问题 I am relatively new to python and have been trying to learn how to use numpy and scipy. I have a numpy array comprised of LAS data [x, y, z, intensity, classification]. I have created a cKDTree of points and have found nearest neighbors using query_ball_point. I would like to find standard deviation of the z values for the neighbors returned by query_ball_point, which returns a list of indices for the point and its neighbors. Is there a way to filter filtered__rows to create an array of only

How to filter numpy array by list of indices?

微笑、不失礼 提交于 2019-12-18 07:58:49
问题 I am relatively new to python and have been trying to learn how to use numpy and scipy. I have a numpy array comprised of LAS data [x, y, z, intensity, classification]. I have created a cKDTree of points and have found nearest neighbors using query_ball_point. I would like to find standard deviation of the z values for the neighbors returned by query_ball_point, which returns a list of indices for the point and its neighbors. Is there a way to filter filtered__rows to create an array of only

Extracting descriptive information from a LiDAR cloud (.las files)

て烟熏妆下的殇ゞ 提交于 2019-12-13 16:43:30
问题 I have .las (lidar data) file, now I wanted to know the size of it, for example how long it's width and height in kilometers. How is it possible to retrieve these kind of info? 回答1: tl;dr: install libLAS and run lasinfo myfile.las . Lasfile headers, in general, shouldn't be trusted since they may not agree with the true data bounds. A more robust approach is to calculate the spatial extents of the data by reading the points themselves. Here's a few free and open-source ways to calculate the

Converting coordinates vector to numpy 2D matrix

こ雲淡風輕ζ 提交于 2019-12-12 13:24:18
问题 I have a set of 3D coordinates points: [lat,long,elevation] ([X,Y,Z]), derived from LIDAR data. The points are not sorted and the steps size between the points is more or less random. My goal is to build a function that converts this set of points to a 2D numpy matrix of a constant number of pixels where each (X,Y) cell hold the Z value, then plot it as elevations heatmap. scales must remain realistic, X and Y should have same step size. the matrix doesn't have to catch the exact elevations

Inpainting of sparse 2D LIDAR image to dense depth image

二次信任 提交于 2019-12-11 06:16:03
问题 I am working on a classification problem (object classification for autonomous vehicle). I use a dataset from KITTI which provide Lidar and camera Data and want to use both of this data to perform the task. 3D LIDAR data is projected onto the coordinatesystem of the RGB image resulting in a sparse LIDAR image : Each pixel is encoding using depth (distance to the point : sqrt(X² + Y²), scaling between 0 and 255). In order to obtain better results for my CNN, I need a dense lidar image, anyone

Representing a LiDAR surface using the 3D Delaunay Triangulation as basis?

安稳与你 提交于 2019-12-08 03:14:58
问题 I would like to represent a surface, with 3D Delaunay Triangulation. The vertices must be my original input data, a LiDAR point cloud from an urban area. So, the surface must adjust/adapt the input information. Actually, what I need to do is the following: I have a 3D point cloud (x, y, z) from an urban area; I need to represent the surface of this area; I would like to do a 3D delaunay triangulation (I did with CGAL and I got the tetrahedrons) and identify only the triangles that represent

How project Velodyne point clouds on image? (KITTI Dataset)

只愿长相守 提交于 2019-12-06 08:16:11
Here is my code to project Velodyne points into the images: cam = 2; frame = 20; % compute projection matrix velodyne->image plane R_cam_to_rect = eye(4); [P, Tr_velo_to_cam, R] = readCalibration('D:/Shared/training/calib/',frame,cam) R_cam_to_rect(1:3,1:3) = R; P_velo_to_img = P*R_cam_to_rect*Tr_velo_to_cam; % load and display image img = imread(sprintf('D:/Shared/training/image_2/%06d.png',frame)); fig = figure('Position',[20 100 size(img,2) size(img,1)]); axes('Position',[0 0 1 1]); imshow(img); hold on; % load velodyne points fid = fopen(sprintf('D:/Shared/training/velodyne/%06d.bin',frame