Skip to content

Sajjan-Sam/Structure-From-Motion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Only Three Files Contain the SFM Mainly(sfm_only.py, vid.mp4, output_sfm_cloud.ply) and all other files are beliong to COLMAP(better version but based on SFM) image

image image

🧠 Structure from Motion (SfM) — Complete Implementation and COLMAP Comparison

This repository presents my exploration of Structure from Motion (SfM) — a technique in Computer Vision used to estimate the 3D structure of a scene from a set of 2D images or a video sequence.

The project is divided into two major parts:

  1. Custom SfM Implementation (from Scratch)sfm_only.py
    • Built using OpenCV, NumPy, and SciPy.
    • Produces a colored point cloud file output_sfm_colored.ply.
  2. COLMAP-based Reconstruction (for comparison)
    • Demonstrates how professional photogrammetry software performs the same pipeline automatically.
    • Produces dense point clouds and meshed 3D models.

📘 Overview

Structure from Motion (SfM) is a computer vision pipeline that takes multiple overlapping images (or frames from a video) and reconstructs:

  • The 3D geometry of the scene
  • The camera motion (position and orientation)

Essentially, SfM transforms a regular phone video into a 3D point cloud that can be visualized using software like MeshLab or CloudCompare.


🧩 Project Components

Component File Description
🧠 My Custom SfM sfm_only.py Python code implementing SfM from scratch (feature extraction, motion estimation, triangulation, bundle adjustment, and colored 3D reconstruction).
🌈 Output (My SfM) output_sfm_colored.ply Final colored 3D point cloud generated using my SfM pipeline.
🧱 COLMAP Reconstruction Other .py and .ply files Dense reconstruction and mesh generation using COLMAP commands.
📸 Artifacts Folder artifacts/ Contains reconstruction outputs (sparse cloud, dense model, mesh).

About

Structure-From-Motion

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages