Git Product home page Git Product logo

3d-points-on-image's Introduction

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

3d-points-on-image's People

Contributors

nalinraut avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.