Giter VIP home page Giter VIP logo

ba_exercise's Introduction

BA_exercise

A exercise of BA, using g2o, ceres and eigen.

感谢六哥、黄志明、付堉家的支持。

Reference

Ref: Bundle Adjustment原理及应用

Clone

git clone --recurse-submodules -j8 https://github.com/shanpenghui/BA_exercise

Third Parties

The version listed is currently used. Check current version by the command in brackets.

  • Cmake 3.16.3 ++ (cmake --version)
  • Eigen 3.3.7 ++ (pkg-config --modversion eigen3)
  • OpenCV 4.2.0 ++ (pkg-config --modversion opencv4)
  • g2o (Sat Feb 27 18:55:01 2021 ++)
  • ceres (Wed Feb 17 18:38:29 2021 ++)
  • glog (Mon Mar 1 12:59:21 2021 ++)

Install Third Parties

You should install these libraries in order.

1.Eigen

sudo apt update && sudo apt-get install libeigen3-dev
or
git clone https://gitlab.com/libeigen/eigen.git
cd eigen && mkdir build && cd build && git checkout 3.3.7 && cmake .. && make -j32 && sudo make install

2.OpenCV

Ref: https://docs.opencv.org/master/d0/d3d/tutorial_general_install.html

sudo apt update && sudo apt-get install libeigen3-dev
or
git clone https://github.com/opencv/opencv
git -C opencv checkout 4.2.0
git clone https://github.com/opencv/opencv_contrib
git -C opencv_contrib checkout 4.2.0
git clone https://github.com/opencv/opencv_extra
git -C opencv_extra checkout 4.2.0
cmake ..
make -j32
sudo make install

3.g2o

Ref: https://github.com/RainerKuemmerle/g2o

Remember to change the DCMAKE_INSTALL_PREFIX path!!!

sudo apt update && sudo apt install libeigen3-dev libsuitesparse-dev qtdeclarative5-dev qt5-qmake libqglviewer-dev-qt5
git clone https://github.com/RainerKuemmerle/g2o.git && cd g2o && mkdir install && mkdir build && cd build && git checkout master
cmake .. && make -j32 && sudo make install
or
cmake .. -DCMAKE_INSTALL_PREFIX="/home/shenz/Documents/vslam/vslam_exercise/ThirdParties/g2o/install" && make -j32 && make install

4.ceres

Ref: http://ceres-solver.org/installation.html

Remember to change the DCMAKE_INSTALL_PREFIX path!!!

# CMake google-glog gflags BLAS LAPACK Eigen3 SuiteSparse(optional) CXSparse(optional)
sudo apt update && sudo apt-get install cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev
git clone https://ceres-solver.googlesource.com/ceres-solver && cd ceres-solver && mkdir build && cd build && git checkout master
cmake .. && make -j32 && sudo make install
or
cmake .. -DCMAKE_INSTALL_PREFIX="/home/shenz/Documents/vslam/vslam_exercise/ThirdParties/ceres-solver" && make -j4 && make install 

5.googlelog

Ref: https://github.com/google/glog.git

git clone https://github.com/google/glog.git
cd glog && mkdir build && cd build && git checkout master && cmake .. && make -j32 && sudo make install

Usage

mkdir build && cd build && cmake .. && make -j32
cd ceres && ./BA_ceres
or others such as:
cd g2o && ./BA_g2o

输出

g2o

image

ceres

image

eigen

image

备注

当前版本是没有优化point pose的,即只优化位姿

ba_exercise's People

Contributors

shanpenghui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ba_exercise's Issues

BA_Eigen Nan!

Thank you very much for your work, it helped me a lot, but BA_eigen ran out of ‘nan’ with your data

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.