Deploy Cv environment for ubuntu, colmap, openmvs, e.g.

1 minute read


  • Ubuntu 18.04.5 LTS
  • x86_64
  • gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)



sudo apt-get install \
    git \
    cmake \
    build-essential \
    libboost-program-options-dev \
    libboost-filesystem-dev \
    libboost-graph-dev \
    libboost-system-dev \
    libboost-test-dev \
    libeigen3-dev \
    libsuitesparse-dev \
    libfreeimage-dev \
    libgoogle-glog-dev \
    libgflags-dev \
    libglew-dev \
    qtbase5-dev \
    libqt5opengl5-dev \

Install Qt5

  • Attation
    • If you have install conda or anconda
    • Remeber conda deactivate untile you dont in any conda environment
    • And remeber rename anaconda3 to anaconda3temp for temporary, and rename it back after install.
sudo apt-get install libcgal-qt5-dev

Install ceres-solver

sudo apt-get install libatlas-base-dev libsuitesparse-dev
git clone
cd ceres-solver
git checkout $(git describe --tags) # Checkout the latest release
mkdir build
cd build
make -j
sudo make install

Install COLMAP

git clone
cd colmap
git checkout dev
mkdir build
cd build
cmake ..
make -j
sudo make install


colmap -h
colmap gui



  • Prepare
sudo apt update -qq && sudo apt install -qq
sudo apt -y install git cmake libpng-dev libjpeg-dev libtiff-dev libglu1-mesa-dev
  • Install Eigen (Required)
git clone --branch 3.2
cd eigen && mkdir eigen_build && cd eigen_build
cmake . ..
make && sudo make install
  • Install Boost (Required)
sudo apt -y install libboost-iostreams-dev libboost-program-options-dev libboost-system-dev libboost-serialization-dev
  • Install OpenCV (Required)
    • Attation, It will lead to a undefined reference to symbol when make for openmvs
    • Look at this issue
    • And for another conflict, make your opencv version is correct, for me, it is 3.2, check it with dpkg -s libopencv-dev
sudo apt -y install libopencv-dev
  • Install CGAL (Required)
    • Attation, please ensure you are not under anaconda environment, and rename the anaconda dir name temporary
    • conda will install qt into itself directory, may lead to can not find qt or find a wrong qt problem
sudo apt -y install libcgal-dev libcgal-qt5-dev
git clone vcglib
  • Install Ceres (optional)
sudo apt -y install libatlas-base-dev libsuitesparse-dev
git clone ceres-solver
cd ceres-solver && mkdir ceres_build && cd ceres_build
make -j8 && sudo make install
cd ..
  • Install GLFW3 (Optional)
sudo apt -y install freeglut3-dev libglew-dev libglfw3-dev
git clone openMVS
cd openMVS && mkdir openMVS_build && cd openMVS_build
make -j8 && sudo make install