[] Multisensor fusion preferably up Xuecheng multisensor fusion study notes (ii) - lidar point cloud is mapped to a plan view of a two-dimensional image

The lidar point cloud is mapped into a plan view of a two-dimensional image

Brief introduction

This section explains how the laser point cloud radar plan view (considering only the horizontal coordinates) mapped into two-dimensional image, wherein the simple map data related to the ground portion was filtered off, and the different coordinate ranges of the LIDAR point clouds. This paper focuses on providing method reference code for reference, can be modified according to actual usage scenarios.

Employed herein lidar data from KITTI data set, using Velodyne HDL-64E laser radar acquisition obtained, the laser radar operating frequency 10Hz, can be collected per cycle about 10 million points. Additional information is available in the data set KITTI sensor mounting part of the document: http://www.cvlibs.net/datasets/kitti/setup.php

In KITTI dataset, the lidar point cloud data has a front view and a camera for synchronizing data acquisition lidar used herein, a scene similar to the scene shown in the image below.
Here Insert Picture Description

Implementation

  1. Loading point cloud data by the laser radar data file from Kitti dataset .
  2. Initialization specific pixel size image (1000 * 2000).
  3. The laser point clouds range radar and image pixel range to be displayed, the horizontal and vertical coordinates of the point cloud lidar mapped to a particular pixel in the image, wherein the laser radar which follow the right-handed world coordinate system, x-axis corresponds to the forward direction, y-axis corresponds to the left lateral; and for the image coordinate system, x, y correspond to the row index and column index of its image, and the corner of the image as the origin.
    With reference to specific processing following code:
//参考定义:CvSize cvSize( int width, int height );
cv::Size worldSize(10.0,20.0);		//待显示的激光雷达点云在世界坐标系下的范围
cv::Size imageSize(1000.0,2000.0);	//待显示的图片的像素范围(与世界坐标系等比例)

...
float xw=(*it).x;//世界坐标系下的激光雷达点云纵坐标
float yw=(*it).y;//世界坐标系下的激光雷达点云横坐标(车身左侧为正)

// x,y表示图片坐标系下的坐标点,分别对应图像的行索引和列索引。
//(如相关坐标系对应关系不同,可进行相应调整)
int x = (-yw * imageSize.height / worldSize.height) + imageSize.width / 2;
int y = (-xw * imageSize.height / worldSize.height) + imageSize.height;

Display converted as shown below:
Here Insert Picture Description
4. The laser radar relative to the ground mounting height position, set the appropriate threshold value of the variable doulble minZ=-1.40, only above the threshold value of the laser point cloud before the above-mentioned mapping operation, to filter out the laser point cloud the ground reflection target. The final display image mapped as follows:
Here Insert Picture Description

Reference Code

Implemented appears in an image lidar point cloud plan relevant reference code figure as shown, this reference code is preferably provided Xuecheng up, I have not been actually tested I, for reference:
Here Insert Picture Description

Published 48 original articles · won praise 65 · views 70000 +

Guess you like

Origin blog.csdn.net/xiaolong361/article/details/104787013