Skip to content

Commit

Permalink
conversion script to account for video frames sequential order
Browse files Browse the repository at this point in the history
  • Loading branch information
bouchardi committed Mar 14, 2024
1 parent fdd140a commit 409c969
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions scripts/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ def main(
resize,
use_gpu
):
(source_path / "distorted" / "sparse").mkdir(exist_ok=True)

(source_path / "distorted" / "sparse").mkdir(parents=True, exist_ok=True)
_run_command(
step="Feature extraction",
command=f"colmap feature_extractor \
Expand All @@ -54,23 +53,19 @@ def main(

_run_command(
step=" Feature matching",
command=f"colmap exhaustive_matcher \
command=f"colmap sequential_matcher \
--database_path {source_path / 'distorted' / 'database.db'} \
--SiftMatching.use_gpu {use_gpu}"
)

# The default Mapper tolerance is unnecessarily large,
# decreasing it speeds up bundle adjustment steps.
_run_command(
step="Mapper",
command=f"colmap mapper \
--database_path {source_path / 'distorted' / 'database.db'} \
--image_path {source_path / 'input'} \
--output_path {source_path / 'distorted' / 'sparse'} \
--Mapper.ba_global_function_tolerance=0.000001"
--output_path {source_path / 'distorted' / 'sparse'}"
)

## We need to undistort our images into ideal pinhole intrinsics.
_run_command(
step="Image undistortion",
command=f"colmap image_undistorter \
Expand Down

0 comments on commit 409c969

Please sign in to comment.