Skip to content

This repository implements a method to project points in 3D-space(collected from a Velodyne LiDAR) on to an image captured from a RGB Camera.

Notifications You must be signed in to change notification settings

dfqytcom/3D-Points-on-Image

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3D-Points-on-Image

This repository implements a method to project points in 3D-space(collected from a Velodyne LiDAR) on to an image captured from a RGB Camera. The implementation takes in an image and LiDAR point cloud data, and projects the 3D lidar points over the image. Both the image and lidar pointcloud have been used from the KITTI dataset.

Method

  • Both intrinsic and extrinsic (LiDAR to Camera transformation matrices [R|T]) are available in KITTI dataset.
  • In the implementation, P_rect_00, and R_rect_00 form the intrinsic camera parameters where P_rect_00 is the camera matrix and R_rect_00 is the rectifiaction matrix to make the image co-planar.
  • RT matrix that can be best represented as [R|T] transformation matrix provides the extrinsic relation between the camera and LiDAR co-ordinate frames.
  • The final projection of each point in 3D space on to the image plane can be given by:

Y(image point) = P_rect_00 x R_rect_00 x RT x X(3D LiDAR point)

  • The LiDAR points are scanned in a 360 degrees space and hence even the points scanned behind the vehicle or camera are projected on the image. To avoid this, we eliminate all the points behind the vehicle and outside the camera frame.

Results

The resulting overlay image is shown below.

Original Image

Original

Overlay Image

Projection_Overlay

Implementation

The code skeleton for this project is as follows

The src directory in this repository contains all the files listed below:

.
├── lidar_camera.cpp
├── utils.cpp
├── utils.hpp
└── dataStructures.h

Dependencies

Build

  1. Clone this repo.
  2. Make a build directory: mkdir build && cd build
  3. Compile: cmake .. && make
  4. Run it: ./lidar_camera ./0000000000.png ./dat/C51_LidarPts_0000.dat

About

This repository implements a method to project points in 3D-space(collected from a Velodyne LiDAR) on to an image captured from a RGB Camera.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 92.9%
  • CMake 7.1%