This repository contains a Bash script for automating a photogrammetry workflow on Linux using GLOMAP and COLMAP. It takes video files as input, extracts frames via FFmpeg, and generates a 3D sparse point cloud for each video.
This script is a Linux adaptation of celestial's Mac adaptation of Polyfjord’s workflow here, with minimul adaptations to run smoothly on Linux systems.
- One-Command Automation: Processes all videos in the input folder in a single run.
- Error Handling: Skips already processed videos and ensures the workflow executes step by step without breaking.
- Organized Output: Keeps results clean with a structured project folder.
- COLMAP + GLOMAP Integration: Extracts features, performs sequential matching, and runs sparse reconstruction automatically.
- TXT Export: Converts COLMAP models to TXT format for easier inspection or import.
- COLMAP – Structure-from-motion and multi-view stereo pipeline.
- GLOMAP – COLMAP extension for automated mapping.
- FFmpeg – For frame extraction.
Project_Folder/
├── VIDEOS/ # Place input video files (.mp4, .mov) here.
├── SCENES/ # The script saves all outputs here.
└── SCRIPTS/ # The run_glomap.sh script lives here.
-
Set Up Folders: Create the structure shown above.
-
Add Videos: Copy your
.mp4
or.mov
files into theVIDEOS/
folder. -
Save the Script: Place the script (
run_glomap.sh
) in theSCRIPTS/
folder. -
Update Paths: Edit the script and update these variables to match your system installation (only necessary if they aren't already on $PATH):
FFMPEG="$(which ffmpeg)" COLMAP="$(which colmap)" GLOMAP="$(which glomap)"
-
Make it Executable:
chmod +x run_glomap.sh
-
Run the Script: From inside the
SCRIPTS/
folder:./run_glomap.sh
-
COLMAP/GLOMAP/FFmpeg not found: Ensure the paths in the script match your system installation.
-
No frames extracted: Check that your video files are valid and playable by FFmpeg.
-
Slow processing: Reduce
--SiftExtraction.max_image_size
(e.g., from 4096 → 2048) or process shorter clips.
This script fully automates Polyfjord’s photogrammetry workflow on macOS using GLOMAP and COLMAP, making it easy to generate 3D sparse point clouds from videos.