8000 GitHub - xieliang257/SfM
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

xieliang257/SfM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Structure from Motion (SfM)

System Overview

This project is an SfM (Structure from Motion) system that utilizes computer vision and image processing technologies to reconstruct three-dimensional structures from multiple photographs. Aiming to provide developers with a complete, basic SfM solution.

Development Environment

  • Operating System: Windows 10 or higher, Linux
  • Development Environment: Visual Studio 2017 or higher (Windows), GCC/G++ (Linux)
  • Main Dependencies:
    • Ceres Solver: Used for Bundle Adjustment (BA) optimization
    • OpenCV 4.4.0 or higher: Used for image processing and computer vision operations, especially as newer versions include the SIFT algorithm in the main module, eliminating the need for the extra contrib module.
    • Eigen: Provides efficient matrix and vector calculations.

Installation Guide

Windows Installation

It is recommended to use vcpkg to manage and install project dependencies to simplify the configuration process.

  • Install vcpkg (if not already installed):

    git clone https://github.com/Microsoft/vcpkg.git
    cd vcpkg
    ./bootstrap-vcpkg.bat
    ./vcpkg integrate install
  • Install Ceres Solver via vcpkg:

    vcpkg install ceres:x64-windows
  • OpenCV: We recommend downloading the precompiled binaries of OpenCV directly from (https://opencv.org/releases/). This approach simplifies the installation process, especially for users who may not be familiar with building from source.

Linux Installation

  • Install Denpendencies:

    sudo apt-get update
    sudo apt-get install -y git cmake build-essential libopencv-dev libeigen3-dev
  • Install Ceres Solver::

    sudo apt-get install -y libgoogle-glog-dev libgflags-dev libatlas-base-dev libsuitesparse-dev
    git clone https://ceres-solver.googlesource.com/ceres-solver
    mkdir ceres-bin
    cd ceres-bin
    cmake ../ceres-solver
    make -j4
    sudo make install
  • Install OpenCV 4.4.0 or higher:

    sudo apt-get install -y libopencv-dev
    sudo apt-get remove -y libopencv-dev
    sudo apt-get install -y build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
    sudo apt-get install -y python3.8-dev python3-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev
    
    git clone https://github.com/opencv/opencv.git
    cd opencv
    git checkout 4.4.0
    mkdir build
    cd build
    cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
    make -j4
    sudo make install

Building the Project

Windows:

The project is built using CMake. For ease of configuration, it's recommended to use CMake GUI. You can download CMake GUI from (https://cmake.org/download/).

Linux:

mkdir build
cd build
cmake ..
make

Note:

If the camera is uncalibrated, please set the focal length to -1 in the configuration parameters. The initial focal length will be automatically calculate. If optimization of internal parameters is specified, the focal length and distortion coefficients will also be optimized during the bundle adjustment (BA) process.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0