alpha
Login
or
Join now
dunkirk.sh
/
inky
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
chore: use colmap path
author
Kieran Klukas
date
1 year ago
(Apr 21, 2025, 5:57 PM -0400)
commit
22888a70
22888a701165241b44201972369597594179ab8d
parent
51e6bef8
51e6bef889c7344b6c272c06e369768acc3ffecf
+11
-8
1 changed file
Expand all
Collapse all
Unified
Split
colmap.bat
+11
-8
colmap.bat
Reviewed
···
5
5
REM --- Modified to use CUDA for GPU acceleration ---
6
6
7
7
REM Prerequisites:
8
8
-
REM 1. ffmpeg.exe and colmap.exe must be in the system PATH or the same directory as this script.
8
8
+
REM 1. ffmpeg.exe must be in the system PATH or the same directory as this script.
9
9
REM 2. The COLMAP build MUST support CUDA.
10
10
REM 3. Appropriate NVIDIA drivers and CUDA toolkit (compatible with your COLMAP build) must be installed.
11
11
+
12
12
+
REM Set COLMAP path (modify this path to match your COLMAP location)
13
13
+
set COLMAP_PATH=C:\Users\kiera\Downloads\colmap-x64-windows-cuda\colmap.bat
11
14
12
15
REM Define paths (using backslashes for Windows compatibility)
13
16
set INPUT_VIDEO=data\input.mov
···
42
45
43
46
REM Step 2: Run COLMAP feature extraction (Using CUDA GPU)
44
47
echo Running COLMAP feature extraction (CUDA)...
45
45
-
colmap feature_extractor ^
48
48
+
"%COLMAP_PATH%" feature_extractor ^
46
49
--database_path "%COLMAP_DB%" ^
47
50
--image_path "%FRAMES_DIR%" ^
48
51
--ImageReader.camera_model SIMPLE_RADIAL ^
···
54
57
55
58
REM Step 3: Run COLMAP feature matching (Using CUDA GPU)
56
59
echo Running COLMAP feature matching (CUDA)...
57
57
-
colmap exhaustive_matcher ^
60
60
+
"%COLMAP_PATH%" exhaustive_matcher ^
58
61
--database_path "%COLMAP_DB%" ^
59
62
--SiftMatching.use_gpu 1
60
63
if errorlevel 1 (
···
65
68
REM Step 4: Run COLMAP sparse reconstruction
66
69
REM Note: The 'mapper' step primarily uses CPU.
67
70
echo Running COLMAP sparse reconstruction...
68
68
-
colmap mapper ^
71
71
+
"%COLMAP_PATH%" mapper ^
69
72
--database_path "%COLMAP_DB%" ^
70
73
--image_path "%FRAMES_DIR%" ^
71
74
--output_path "%SPARSE_DIR%"
···
86
89
87
90
REM Step 5: Run COLMAP dense reconstruction
88
91
echo Running COLMAP image undistorter...
89
89
-
colmap image_undistorter ^
92
92
+
"%COLMAP_PATH%" image_undistorter ^
90
93
--image_path "%FRAMES_DIR%" ^
91
94
--input_path "%SPARSE_DIR%\0" ^
92
95
--output_path "%DENSE_DIR%"
···
97
100
98
101
echo Running COLMAP patch matching (Using CUDA GPU)...
99
102
REM Use --PatchMatchStereo.gpu_index 0 to select the first CUDA device. Change if needed.
100
100
-
colmap patch_match_stereo ^
103
103
+
"%COLMAP_PATH%" patch_match_stereo ^
101
104
--workspace_path "%DENSE_DIR%" ^
102
105
--PatchMatchStereo.gpu_index 0
103
106
if errorlevel 1 (
···
107
110
108
111
echo Running COLMAP stereo fusion...
109
112
REM Note: Stereo fusion is primarily CPU-bound.
110
110
-
colmap stereo_fusion ^
113
113
+
"%COLMAP_PATH%" stereo_fusion ^
111
114
--workspace_path "%DENSE_DIR%" ^
112
115
--output_path "%DENSE_DIR%\fused.ply"
113
116
if errorlevel 1 (
···
117
120
118
121
REM Output camera pose information
119
122
echo Extracting camera pose information...
120
120
-
colmap model_converter ^
123
123
+
"%COLMAP_PATH%" model_converter ^
121
124
--input_path "%SPARSE_DIR%\0" ^
122
125
--output_path "%SPARSE_DIR%\txt" ^
123
126
--output_type TXT