• Stars
    star
    135
  • Rank 269,297 (Top 6 %)
  • Language
    C++
  • Created about 7 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Perspective n Point and Line for camera pose estimation.

Introduction

Perspective-n-Point(PnP) is the problem of estimating the pose of a calibrated camera given a set of n 3D points in the world and their corresponding 2D projections in the image.(https://en.wikipedia.org/wiki/Perspective-n-Point)

We extend this methods to 3D-2D lines, which is called as Perspective-n-Line(PnL). Moreover, we can combine 3D-2D point pair and 3D-2D line pair together to solve the camera pose. These are implemented in pnpl.cpp(h) as a graph optimization and solved by g2o.

The pnp.cpp(h) contains close form solutions for camera position with known camera attitude(rotation). Note that we need at least 2 point pair in pnpTrans() while at least 3 line pair in pnlTrans().

Prerequisites

Prerequisites needed for compiling PnPL using c++:

Note that we oply use opencv data structures to store datas. You can change the variable type in codes if you really don't want to use opencv.

How to run

  • Linux
mkdir build
cd build
cmake ..
make
  • Windows You can use CMake-GUI to build your project.

We provide two demos to show how to use,

  1. demo_pnpl solves camera position and rotation (6DoF) with point pairs and line pairs, it needs g2o.
  2. demo_pnptrans solves only camera position(3DoF) with point pairs and line pairs in close form.

Licence

The source code is released under GPLv3 license.

Any problem, please contact [email protected]

More Repositories

1

minimum_snap_trajectory_generation

easy sample code for minimum snap trajectory planning in MATLAB
MATLAB
204
star
2

libicp

C++ Library for Iterative Closest Point fitting. http://www.cvlibs.net/software/libicp/ . Fix some mistake in point-to-plane icp implementation. Add a robust threshold to improve the precision.
C++
135
star
3

vio_evaluation

Compare state-of-the-art VO/VSLAM/VIO packages in EuRoC datasets. Algorithms include VINS, MSCKF, ORB-SLAM, SVO2 etc.
Python
124
star
4

InteractiveImageSegmentation

An interactive image segmentation tool for image segmentation labeling, which use GrabCut and implemented in OpenCV 3 and Python.
Python
123
star
5

viola

VIOLA(Vision-Imu-Odometry LibrAry) is a versatile C++ library for vision/robotics system. We try to build it as a common basic library for vision/robotics packages.
C++
74
star
6

PEAC

PEAC(Plane Extraction using Agglomerative Clustering) is a fast plane segmentation algorithm for organized point cloud. This is a fork of peac (http://www.merl.com/research/license)
C++
59
star
7

xviewer

XViewer is a easy tools for data visualization. You can use it to visualize a data file or a data dir such as EuROC, TUM VIO dataset.
13
star
8

svo2_noros

sample project to use SVO2.0 for mono/stereo visual odometry without ros
C++
10
star
9

openvins_mobile

C++
9
star
10

visionlib

This repository contains a lot of useful functions including data process, vision process, and so on.
C++
4
star
11

ros_sample_stereo_image_sync

Sample codes for synchronize left and right image message, and show how to use nodelet.
C++
4
star
12

face_recognition

Demo code for python face recognition package. A face attendance UI by pyqt5.
Python
1
star