### Start COLMAP GUI with Project Configuration Source: https://colmap.github.io/tutorial.html Starts the COLMAP GUI and loads settings from a specified project configuration file. ```bash colmap gui --project_path path/to/project.ini ``` -------------------------------- ### Find COLMAP Package in CMakeLists.txt Source: https://colmap.github.io/install.html Example CMakeLists.txt demonstrating how to find and use the COLMAP package after it has been installed. ```cmake cmake_minimum_required(VERSION 3.10) project(SampleProject) find_package(colmap REQUIRED) ``` -------------------------------- ### Install Qt 5 Dependencies for Debian/Ubuntu Source: https://colmap.github.io/_sources/install.rst.txt Alternative dependency installation for systems using Qt 5 instead of Qt 6. ```bash qtbase5-dev libqt5opengl5-dev ``` -------------------------------- ### Install Qt 5 Dependencies (Alternative) Source: https://colmap.github.io/install.html Installs Qt 5 development packages as an alternative to Qt 6 for COLMAP compilation. ```bash qtbase5-dev libqt5opengl5-dev ``` -------------------------------- ### Example Feature Import File Source: https://colmap.github.io/tutorial.html An example illustrating the text file format for importing features, showing four features with their associated data. ```text 4 128 1.2 2.3 0.1 0.3 1 2 3 4 ... 21 2.2 3.3 1.1 0.3 3 2 3 2 ... 32 0.2 1.3 1.1 0.3 3 2 3 2 ... 2 1.2 2.3 1.1 0.3 3 2 3 2 ... 3 ``` -------------------------------- ### Build a Simple C++ Application with COLMAP Source: https://colmap.github.io/_sources/install.rst.txt This C++ code demonstrates how to use COLMAP's OptionManager to parse command-line arguments and StringPrintf for formatted output. Compile and run this example to verify your COLMAP installation. ```cpp #include #include #include int main(int argc, char** argv) { colmap::InitializeGlog(argv); std::string message; colmap::OptionManager options; options.AddRequiredOption("message", &message); if (!options.Parse(argc, argv)) { return EXIT_FAILURE; } std::cout << colmap::StringPrintf("Hello %s!\n", message.c_str()); return EXIT_SUCCESS; } ``` -------------------------------- ### Install PyCOLMAP using pip Source: https://colmap.github.io/_sources/pycolmap/index.rst.txt Installs PyCOLMAP using pre-built wheels. This is the recommended method for Linux, macOS, and Windows. ```bash pip install pycolmap ``` -------------------------------- ### COLMAP Global Mapper Setup Source: https://colmap.github.io/_sources/cli.rst.txt Sets up the database for global SfM. This involves feature extraction and matching. ```bash $ colmap feature_extractor \ --database_path $DATASET_PATH/database.db \ --image_path $DATASET_PATH/images $ colmap exhaustive_matcher \ --database_path $DATASET_PATH/database.db ``` -------------------------------- ### COLMAP CLI Usage Example Source: https://colmap.github.io/_sources/cli.rst.txt Demonstrates example usage patterns for various COLMAP commands, including GUI, automatic reconstruction, feature extraction, matching, and mapping. ```bash colmap help [ -h, --help ] colmap gui colmap gui -h [ --help ] colmap automatic_reconstructor -h [ --help ] colmap automatic_reconstructor --image_path IMAGES --workspace_path WORKSPACE colmap feature_extractor --image_path IMAGES --database_path DATABASE colmap exhaustive_matcher --database_path DATABASE colmap mapper --image_path IMAGES --database_path DATABASE --output_path MODEL ``` -------------------------------- ### Install PyCOLMAP with CUDA 12 support (Linux) Source: https://colmap.github.io/_sources/pycolmap/index.rst.txt Installs PyCOLMAP with CUDA 12 acceleration support on Linux. Requires PyPI installation. ```bash pip install pycolmap-cuda12 ``` -------------------------------- ### Install COLMAP using VCPKG on Windows Source: https://colmap.github.io/_sources/install.rst.txt Installs COLMAP and its dependencies on Windows using VCPKG, including CUDA and tests. Assumes Visual Studio 2019 or newer is installed. ```powershell git clone https://github.com/microsoft/vcpkg cd vcpkg .\bootstrap-vcpkg.bat .\vcpkg install colmap[cuda,tests]:x64-windows ``` -------------------------------- ### Compile and Run the C++ Example Source: https://colmap.github.io/_sources/install.rst.txt These shell commands show how to build and execute the 'hello_world' C++ application using CMake and Ninja. Ensure the colmap_DIR environment variable is set correctly. ```bash mkdir build cd build export colmap_DIR=${CMAKE_INSTALL_PREFIX}/share/colmap cmake .. -GNinja ninja ./hello_world --message "world" ``` -------------------------------- ### Example of Imported Features Text File Source: https://colmap.github.io/_sources/tutorial.rst.txt An example illustrating the text file format for importing features, showing the header with feature count and descriptor size, followed by lines detailing individual features. ```text 4 128 1.2 2.3 0.1 0.3 1 2 3 4 ... 21 2.2 3.3 1.1 0.3 3 2 3 2 ... 32 0.2 1.3 1.1 0.3 3 2 3 2 ... 2 1.2 2.3 1.1 0.3 3 2 3 2 ... 3 ``` -------------------------------- ### Install COLMAP using VCPKG on Linux Source: https://colmap.github.io/_sources/install.rst.txt Installs COLMAP for the x64-linux triplet using VCPKG. This command fetches and builds COLMAP and its dependencies from scratch. ```bash git clone https://github.com/microsoft/vcpkg cd vcpkg ./bootstrap-vcpkg.sh ./vcpkg install colmap:x64-linux ``` -------------------------------- ### Start COLMAP GUI Source: https://colmap.github.io/tutorial.html Launches the COLMAP graphical user interface. This can be done using pre-built binaries or by executing the command from the build folder. ```bash COLMAP.bat ``` ```bash COLMAP.app ``` ```bash ./src/colmap/exe/colmap gui ``` -------------------------------- ### Install CUDA Toolkit for Debian/Ubuntu Source: https://colmap.github.io/_sources/install.rst.txt Install the NVIDIA CUDA toolkit for COLMAP compilation with GPU support on Debian/Ubuntu. ```bash sudo apt-get install -y \ nvidia-cuda-toolkit \ nvidia-cuda-toolkit-gcc ``` -------------------------------- ### Start COLMAP GUI Source: https://colmap.github.io/tutorial.html Launches the graphical user interface of COLMAP. You can optionally specify a project configuration file to load. ```bash colmap gui ``` -------------------------------- ### Rig Configuration JSON Example Source: https://colmap.github.io/_sources/rigs.rst.txt Example JSON structure for `rig_config.json`. Defines camera rigs, their relative sensor poses (rotation and translation), and image prefixes. ```json [ { "cameras": [ { "image_prefix": "rig1/camera1/", "ref_sensor": true }, { "image_prefix": "rig1/camera2/", "cam_from_rig_rotation": [ 0.7071067811865475, 0.0, 0.7071067811865476, 0.0 ], "cam_from_rig_translation": [ 0, 0, 0 ] } ] }, { "cameras": [ { "image_prefix": "rig2/camera1/", "ref_sensor": true }, ... ] }, ... ] ``` -------------------------------- ### Install CUDA Toolkit for Ubuntu Source: https://colmap.github.io/install.html Installs the NVIDIA CUDA toolkit and associated GCC compiler for COLMAP builds with GPU support on Ubuntu. ```bash sudo apt-get install -y \ nvidia-cuda-toolkit \ nvidia-cuda-toolkit-gcc ``` -------------------------------- ### Download and Extract ETH3D Rig Dataset Source: https://colmap.github.io/rigs.html Download the ETH3D rig dataset and extract its contents. This is the first step for the end-to-end example. ```bash wget https://www.eth3d.net/data/terrains_rig_undistorted.7z 7zz x terrains_rig_undistorted.7z ``` -------------------------------- ### Reconstruct Scene from Scratch with Rig Constraints Source: https://colmap.github.io/rigs.html Start a new reconstruction process with rig constraints enabled. This can lead to more accurate results by incorporating rig information from the beginning. ```bash colmap mapper --image_path $DATASET_PATH/images --database_path $DATASET_PATH/database.db --output_path $DATASET_PATH/sparse-model-with-rigs-and-frames ``` -------------------------------- ### Install Debian/Ubuntu Dependencies Source: https://colmap.github.io/install.html Installs essential development packages for COLMAP on Debian/Ubuntu systems. Includes libraries for Boost, Eigen, OpenImageIO, Ceres, and Qt. ```bash sudo apt-get install \ git \ cmake \ ninja-build \ build-essential \ libboost-program-options-dev \ libboost-graph-dev \ libboost-system-dev \ libeigen3-dev \ libopenimageio-dev \ openimageio-tools \ libmetis-dev \ libgoogle-glog-dev \ libgtest-dev \ libgmock-dev \ libsqlite3-dev \ libglew-dev \ qt6-base-dev \ libqt6opengl6-dev \ libqt6openglwidgets6 \ libcgal-dev \ libceres-dev \ libsuitesparse-dev \ libcurl4-openssl-dev \ libssl-dev \ libmkl-full-dev # Fix issue in Ubuntu's openimageio CMake config. # We don't depend on any of openimageio's OpenCV functionality, # but it still requires the OpenCV include directory to exist. sudo mkdir -p /usr/include/opencv4 ``` -------------------------------- ### Build COLMAP Documentation (HTML) Source: https://colmap.github.io/install.html Steps to build the HTML documentation for COLMAP. This involves navigating to the documentation directory, installing requirements, and running the make command. ```bash cd path/to/colmap/doc pip install -r requirements.txt make html open _build/html/index.html # preview results ``` -------------------------------- ### Example COLMAP Project Structure Source: https://colmap.github.io/tutorial.html Illustrates a typical folder structure for a COLMAP project, including the images directory, database file, and project configuration file. ```text /path/to/project/... +── images │   +── image1.jpg │   +── image2.jpg │   +── ... │   +── imageN.jpg +── database.db +── project.ini ``` -------------------------------- ### Install Debian/Ubuntu Dependencies Source: https://colmap.github.io/_sources/install.rst.txt Install necessary development packages for COLMAP on Debian/Ubuntu systems. Includes libraries for image processing, linear algebra, and GUI. ```bash sudo apt-get install \ git \ cmake \ ninja-build \ build-essential \ libboost-program-options-dev \ libboost-graph-dev \ libboost-system-dev \ libeigen3-dev \ libopenimageio-dev \ openimageio-tools \ libmetis-dev \ libgoogle-glog-dev \ libgtest-dev \ libgmock-dev \ libsqlite3-dev \ libglew-dev \ qt6-base-dev \ libqt6opengl6-dev \ libqt6openglwidgets6 \ libcgal-dev \ libceres-dev \ libsuitesparse-dev \ libcurl4-openssl-dev \ libssl-dev \ libmkl-full-dev # Fix issue in Ubuntu's openimageio CMake config. # We don't depend on any of openimageio's OpenCV functionality, # but it still requires the OpenCV include directory to exist. sudo mkdir -p /usr/include/opencv4 ``` -------------------------------- ### Install COLMAP with CUDA and Tests using VCPKG on Linux Source: https://colmap.github.io/_sources/install.rst.txt Installs COLMAP with CUDA support and all tests for the x64-linux triplet using VCPKG. This ensures comprehensive testing and CUDA functionality. ```bash ./vcpkg install colmap[cuda,tests]:x64-linux ``` -------------------------------- ### Build COLMAP HTML Documentation Source: https://colmap.github.io/_sources/install.rst.txt These commands outline the process for building the COLMAP HTML documentation. It involves installing Python dependencies and running the make command. ```bash cd path/to/colmap/doc pip install -r requirements.txt make html open _build/html/index.html # preview results ``` -------------------------------- ### ETH3D Rig Configuration JSON Source: https://colmap.github.io/_sources/rigs.rst.txt Example `rig_config.json` for an ETH3D dataset, defining cameras by their image prefixes and marking one as the reference sensor. ```json [ { "cameras": [ { "image_prefix": "images_rig_cam4_undistorted/", "ref_sensor": true }, { "image_prefix": "images_rig_cam5_undistorted/" }, { "image_prefix": "images_rig_cam6_undistorted/" }, { "image_prefix": "images_rig_cam7_undistorted/" } ] } ] ``` -------------------------------- ### Mapper with Rig Constraints Source: https://colmap.github.io/_sources/rigs.rst.txt Start the reconstruction process from scratch with rig constraints using the `mapper` command. This may lead to more accurate results. ```bash colmap mapper --image_path $DATASET_PATH/images --database_path $DATASET_PATH/database.db --output_path $DATASET_PATH/sparse-model-with-rigs-and-frames ``` -------------------------------- ### Configure and Compile COLMAP Source: https://colmap.github.io/install.html Configures the COLMAP build using CMake with Ninja and then compiles the project. Finally, it installs COLMAP to the system. ```bash git clone https://github.com/colmap/colmap.git cd colmap mkdir build cd build cmake .. -GNinja -DBLA_VENDOR=Intel10_64lp ninja sudo ninja install ``` -------------------------------- ### Example cameras.txt Format Source: https://colmap.github.io/_sources/format.rst.txt This snippet illustrates the format of the cameras.txt file, which lists intrinsic camera parameters. Each line specifies a camera's ID, distortion model, resolution, and model-specific parameters. ```text # Camera list with one line of data per camera: # CAMERA_ID, MODEL, WIDTH, HEIGHT, PARAMS[] # Number of cameras: 3 1 SIMPLE_PINHOLE 3072 2304 2559.81 1536 1152 2 PINHOLE 3072 2304 2560.56 2560.56 1536 1152 3 SIMPLE_RADIAL 3072 2304 2559.69 1536 1152 -0.0218531 ``` -------------------------------- ### Install Latest COLMAP Commit using VCPKG on Linux Source: https://colmap.github.io/_sources/install.rst.txt Installs the latest commit from the COLMAP development branch using VCPKG for the x64-linux triplet. Use the --head option to build from the dev branch. ```bash ./vcpkg install colmap:x64-linux --head ``` -------------------------------- ### Build COLMAP from Source on macOS Source: https://colmap.github.io/_sources/install.rst.txt Clones the COLMAP repository, creates a build directory, configures the build with CMake and Ninja, and then compiles and installs COLMAP. ```bash git clone https://github.com/colmap/colmap.git cd colmap mkdir build cd build cmake .. -GNinja ninja sudo ninja install ``` -------------------------------- ### Start New Reconstruction with Mapper Source: https://colmap.github.io/faq.html Initiates a new reconstruction process from scratch using the 'mapper'. Ensure to re-run dense reconstruction if the model's coordinate frame changes. ```bash colmap mapper \ --database_path $PROJECT_PATH/database.db \ --image_path $PROJECT_PATH/images \ --output_path /path/to/model-with-new-images ``` -------------------------------- ### Build COLMAP with Ninja after Anaconda/Mamba Setup Source: https://colmap.github.io/_sources/install.rst.txt Clones the COLMAP repository and builds it using CMake and Ninja within a pre-configured environment, typically after installing dependencies via Anaconda/Mamba. ```bash git clone https://github.com/colmap/colmap.git cd colmap mkdir build cd build cmake .. -GNinja ninja ``` -------------------------------- ### Example rigs.txt Format Source: https://colmap.github.io/_sources/format.rst.txt This snippet shows the structure of the rigs.txt file, detailing configured rigs and sensors. Each line describes a rig with its ID, number of sensors, reference sensor type and ID, and sensor details including pose information if available. ```text # Rig calib list with one line of data per calib: # RIG_ID, NUM_SENSORS, REF_SENSOR_TYPE, REF_SENSOR_ID, SENSORS[] as (SENSOR_TYPE, SENSOR_ID, HAS_POSE, [QW, QX, QY, QZ, TX, TY, TZ]) # Number of rigs: 1 1 2 CAMERA 1 CAMERA 2 1 -0.9999701516465348 -0.0011120266840749639 -0.0075347911527510894 0.0012985125893421306 -0.19316906391350164 0.00085222218993398979 0.0070758955539026785 2 1 CAMERA 3 ``` -------------------------------- ### Install COLMAP with Homebrew Source: https://colmap.github.io/_sources/install.rst.txt Use Homebrew to install COLMAP on macOS. This command installs pre-compiled binaries or builds from source. ```bash brew install colmap ``` -------------------------------- ### Build COLMAP Documentation (PDF) Source: https://colmap.github.io/install.html Alternative method to build the documentation in PDF format. After building, the PDF file can be opened for preview. ```bash make latexpdf open _build/pdf/COLMAP.pdf ``` -------------------------------- ### Install COLMAP Dependencies on Debian/Ubuntu Source: https://colmap.github.io/_sources/install.rst.txt Installs necessary compiler versions and sets environment variables for building COLMAP on Debian/Ubuntu systems. Ensure you have gcc-10 and g++-10 installed. ```bash sudo apt-get install gcc-10 g++-10 export CC=/usr/bin/gcc-10 export CXX=/usr/bin/g++-10 export CUDAHOSTCXX=/usr/bin/g++-10 ``` -------------------------------- ### Initialize FeatureMatcher with Options Source: https://colmap.github.io/pycolmap/pycolmap.html Create a FeatureMatcher instance with custom matching options and device selection. Defaults to automatic device selection. ```python matcher = pycolmap.FeatureMatcher.create(options=pycolmap.FeatureMatchingOptions(), device=pycolmap.Device.auto()) ``` -------------------------------- ### FeatureMatcher.create Source: https://colmap.github.io/pycolmap/pycolmap.html Creates a FeatureMatcher instance with specified options and device. This is the entry point for setting up feature matching. ```APIDOC ## FeatureMatcher.create ### Description Creates a FeatureMatcher instance with specified options and device. This is the entry point for setting up feature matching. ### Method static create ### Parameters #### Path Parameters - **_options** (pycolmap.FeatureMatchingOptions | None) - Optional: Feature matching options to configure the matcher. - **_device** (pycolmap.Device) - The device to use for feature matching (e.g., CPU or GPU). ### Response #### Success Response - **pycolmap.FeatureMatcher** - An instance of the FeatureMatcher. ``` -------------------------------- ### Install COLMAP Dependencies with Conda Source: https://colmap.github.io/install.html Installs various dependencies for COLMAP, including build tools, libraries, and CUDA components, using Conda. ```bash conda install \ cmake \ ninja \ boost \ ccache \ eigen \ openimageio \ curl \ metis \ glog \ gtest \ ceres-solver \ suitesparse \ qt \ glew \ sqlite \ cgal-cpp \ mesa-libgl-devel-cos7-x86_64 \ cuda-compiler==12.6.2 \ cuda-cudart-dev \ cuda-nvrtc-dev \ libcurand-dev ``` -------------------------------- ### Install COLMAP Dependencies on macOS with Homebrew Source: https://colmap.github.io/_sources/install.rst.txt Installs essential development tools and libraries for COLMAP using Homebrew on macOS. This includes CMake, Ninja, Boost, Eigen, and others. ```bash brew install \ cmake \ ninja \ boost \ eigen \ openimageio \ curl \ libomp \ metis \ glog \ googletest \ ceres-solver \ suitesparse \ qt \ glew \ cgal \ sqlite3 brew link --force libomp ``` -------------------------------- ### Perform Guided Feature Matching Source: https://colmap.github.io/pycolmap/pycolmap.html Perform guided matching using existing two-view geometry. This method updates the two_view_geometry in-place and requires camera parameters and the maximum error. ```python matcher.match_guided(max_error, keypoints1, descriptors1, camera1, keypoints2, descriptors2, camera2, two_view_geometry) ``` -------------------------------- ### Initialize MeshSimplificationOptions Source: https://colmap.github.io/pycolmap/pycolmap.html Instantiate MeshSimplificationOptions with default values or from a dictionary. ```python options = pycolmap.MeshSimplificationOptions() print(options.target_face_ratio) ``` ```python options = pycolmap.MeshSimplificationOptions(target_face_ratio=0.5) print(options.target_face_ratio) ``` ```python options = pycolmap.MeshSimplificationOptions({'target_face_ratio': 0.5}) print(options.target_face_ratio) ``` -------------------------------- ### List COLMAP Commands Source: https://colmap.github.io/cli.html Use the 'help' command to list all available COLMAP commands and their general usage. ```bash $ colmap help Usage: colmap [command] [options] Documentation: https://colmap.github.io/ Example usage: colmap help [ -h, --help ] colmap gui colmap gui -h [ --help ] colmap automatic_reconstructor -h [ --help ] colmap automatic_reconstructor --image_path IMAGES --workspace_path WORKSPACE colmap feature_extractor --image_path IMAGES --database_path DATABASE colmap exhaustive_matcher --database_path DATABASE colmap mapper --image_path IMAGES --database_path DATABASE --output_path MODEL ... Available commands: help gui automatic_reconstructor bundle_adjuster color_extractor database_cleaner database_creator database_merger delaunay_mesher exhaustive_matcher feature_extractor feature_importer geometric_verifier global_mapper guided_geometric_verifier hierarchical_mapper image_deleter image_filterer image_rectifier image_registrator image_undistorter image_undistorter_standalone mapper matches_importer mesh_simplifier mesh_texturer model_aligner model_analyzer model_clusterer model_comparer model_converter model_cropper model_merger model_orientation_aligner model_splitter model_transformer patch_match_stereo point_filtering point_triangulator pose_prior_mapper poisson_mesher project_generator rig_configurator rotation_averager sequential_matcher spatial_matcher stereo_fusion transitive_matcher view_graph_calibrator vocab_tree_builder vocab_tree_matcher vocab_tree_retriever ``` -------------------------------- ### Install COLMAP Dependencies with Anaconda/Mamba Source: https://colmap.github.io/_sources/install.rst.txt Creates a Conda environment named 'colmap' with Python 3.12 and installs various development libraries including CMake, Ninja, Boost, Eigen, and CUDA components. ```bash conda create -n colmap python=3.12 conda config --add channels conda-forge conda config --set channel_priority strict conda install \ cmake \ ninja \ boost \ ccache \ eigen \ openimageio \ curl \ metis \ glog \ gtest \ ceres-solver \ suitesparse \ qt \ glew \ sqlite \ cgal-cpp \ mesa-libgl-devel-cos7-x86_64 \ cuda-compiler==12.6.2 \ cuda-cudart-dev \ cuda-nvrtc-dev \ libcurand-dev ``` -------------------------------- ### Get Modified Points3D Source: https://colmap.github.io/pycolmap/pycolmap.html Retrieves the set of 3D points that have been modified since the last call to clear_modified_points3D. ```APIDOC ## get_modified_points3D ### Description Get changed 3D points, since the last call to clear_modified_points3D. ### Method (Implicitly called within IncrementalMapper context) ### Parameters * `_self` (pycolmap.IncrementalMapper_): The IncrementalMapper instance. ### Returns * `set[int]`: A set of modified 3D point IDs. ``` -------------------------------- ### Initialize DelaunayMeshingOptions Source: https://colmap.github.io/pycolmap/pycolmap.html Instantiate DelaunayMeshingOptions with default values or from a dictionary. ```python options = pycolmap.DelaunayMeshingOptions() print(options.max_proj_dist) ``` ```python options = pycolmap.DelaunayMeshingOptions(max_proj_dist=10.0) print(options.max_proj_dist) ``` ```python options = pycolmap.DelaunayMeshingOptions({'max_proj_dist': 10.0}) print(options.max_proj_dist) ``` -------------------------------- ### pycolmap.Timer Source: https://colmap.github.io/pycolmap/pycolmap.html A utility class for timing operations, allowing start, stop, restart, and retrieval of elapsed time in various units. ```APIDOC ## Class: pycolmap.Timer ### Description A utility class for timing operations, allowing start, stop, restart, and retrieval of elapsed time in various units. ### Methods - `start(_self : pycolmap.Timer_) -> None`: Starts or resumes the timer. - `restart(_self : pycolmap.Timer_) -> None`: Restarts the timer from zero. - `pause(_self : pycolmap.Timer_) -> None`: Pauses the timer. - `resume(_self : pycolmap.Timer_) -> None`: Resumes the timer after pausing. - `reset(_self : pycolmap.Timer_) -> None`: Resets the timer to zero without stopping it. - `elapsed_micro_seconds(_self : pycolmap.Timer_) -> float`: Returns the elapsed time in microseconds. - `elapsed_seconds(_self : pycolmap.Timer_) -> float`: Returns the elapsed time in seconds. - `elapsed_minutes(_self : pycolmap.Timer_) -> float`: Returns the elapsed time in minutes. - `elapsed_hours(_self : pycolmap.Timer_) -> float`: Returns the elapsed time in hours. - `print_seconds(_self : pycolmap.Timer_) -> None`: Prints the elapsed time in seconds. - `print_minutes(_self : pycolmap.Timer_) -> None`: Prints the elapsed time in minutes. - `print_hours(_self : pycolmap.Timer_) -> None`: Prints the elapsed time in hours. ``` -------------------------------- ### List Available COLMAP Commands Source: https://colmap.github.io/_sources/cli.rst.txt Use the 'help' command to list all available commands in the COLMAP CLI. This is useful for understanding the full range of functionalities. ```bash colmap help ``` -------------------------------- ### Build a Custom Executable with COLMAP Source: https://colmap.github.io/install.html Link your C++ application against the COLMAP library. Ensure COLMAP is installed or its build directory is correctly specified. ```cmake add_executable(hello_world hello_world.cc) target_link_libraries(hello_world colmap::colmap) ``` -------------------------------- ### PyCOLMAP Rig Configuration and Synthesis Source: https://colmap.github.io/pycolmap/pycolmap.html Utilities for configuring rigs and synthesizing datasets with noise and images. ```APIDOC ## Rig Configuration and Synthesis ### `RigConfigCamera` Configuration for a camera within a rig. ### `RigConfig` Represents the configuration of a rig. ### `read_rig_config(path)` Reads rig configuration from a file. ### `apply_rig_config(reconstruction, rig_config)` Applies rig configuration to a reconstruction. ### `SyntheticDatasetMatchConfig` Configuration for matching in synthetic datasets. ### `SyntheticDatasetOptions` Options for synthesizing a dataset. ### `synthesize_dataset(options)` Synthesizes a COLMAP dataset. ### `SyntheticNoiseOptions` Options for adding noise to synthetic data. ### `synthesize_noise(options)` Synthesizes noise for a dataset. ### `SyntheticImageOptions` Options for synthesizing images. ### `synthesize_images(options)` Synthesizes images for a dataset. ``` -------------------------------- ### Reconstruct Sparse Model from Known Camera Poses Source: https://colmap.github.io/_sources/faq.rst.txt Use this workflow when camera poses are known and you need to reconstruct a sparse model. It involves feature extraction, matching, and triangulation. ```bash colmap feature_extractor \ --database_path $PROJECT_PATH/database.db \ --image_path $PROJECT_PATH/images ``` ```bash colmap exhaustive_matcher \ --database_path $PROJECT_PATH/database.db ``` ```bash colmap point_triangulator \ --database_path $PROJECT_PATH/database.db \ --image_path $PROJECT_PATH/images --input_path path/to/manually/created/sparse/model \ --output_path path/to/triangulated/sparse/model ``` -------------------------------- ### Build PyCOLMAP from source (Windows) Source: https://colmap.github.io/_sources/pycolmap/index.rst.txt Builds PyCOLMAP from source on Windows after installing COLMAP via VCPKG. Requires PowerShell and specific CMake definitions. ```powershell python -m pip install . \ --cmake.define.CMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" \ --cmake.define.VCPKG_TARGET_TRIPLET="x64-windows" ``` -------------------------------- ### Build PyCOLMAP from source (Linux/macOS) Source: https://colmap.github.io/_sources/pycolmap/index.rst.txt Builds PyCOLMAP from source on Linux and macOS after installing COLMAP from source. Requires Python's pip module. ```bash python -m pip install . ``` -------------------------------- ### Example C++ Application using COLMAP Source: https://colmap.github.io/install.html A simple C++ program that uses COLMAP's OptionManager and StringPrintf utilities. It requires a 'message' argument to be passed. ```cpp #include #include #include #include int main(int argc, char** argv) { colmap::InitializeGlog(argv); std::string message; colmap::OptionManager options; options.AddRequiredOption("message", &message); if (!options.Parse(argc, argv)) { return EXIT_FAILURE; } std::cout << colmap::StringPrintf("Hello %s!\n", message.c_str()); return EXIT_SUCCESS; } ```