### Install Depth Anything 3 Source: https://github.com/fictionarry/ambisur/blob/main/README.md Installs the Depth Anything 3 library for multi-view depth priors. This step is optional if other priors are used. ```bash pip install git+https://github.com/ByteDance-Seed/depth-anything-3.git ``` -------------------------------- ### Install PyTorch Dependencies Source: https://github.com/fictionarry/ambisur/blob/main/README.md Installs PyTorch-related and customized CUDA components. Ensure PyTorch version 2.0 or higher is installed. ```bash pip install -r torch_depended_env.txt ``` -------------------------------- ### Evaluation Output Example Source: https://github.com/fictionarry/ambisur/blob/main/scripts/tnt_eval/README.md This is an example of the detailed output generated during the evaluation of a specific scene (Ignatius), showing progress and final metrics. ```text =========================== Evaluating Ignatius =========================== path/to/TanksAndTemples/evaluation/data/Ignatius/Ignatius_COLMAP.ply Reading PLY: [========================================] 100% Read PointCloud: 6929586 vertices. path/to/TanksAndTemples/evaluation/data/Ignatius/Ignatius.ply Reading PLY: [========================================] 100% : ICP Iteration #0: Fitness 0.9980, RMSE 0.0044 ICP Iteration #1: Fitness 0.9980, RMSE 0.0043 ICP Iteration #2: Fitness 0.9980, RMSE 0.0043 ICP Iteration #3: Fitness 0.9980, RMSE 0.0043 ICP Iteration #4: Fitness 0.9980, RMSE 0.0042 ICP Iteration #5: Fitness 0.9980, RMSE 0.0042 ICP Iteration #6: Fitness 0.9979, RMSE 0.0042 ICP Iteration #7: Fitness 0.9979, RMSE 0.0042 ICP Iteration #8: Fitness 0.9979, RMSE 0.0042 ICP Iteration #9: Fitness 0.9979, RMSE 0.0042 ICP Iteration #10: Fitness 0.9979, RMSE 0.0042 [EvaluateHisto] Cropping geometry: [========================================] 100% Pointcloud down sampled from 6929586 points to 1449840 points. Pointcloud down sampled from 1449840 points to 1365628 points. path/to/TanksAndTemples/evaluation/data/Ignatius/evaluation//Ignatius.precision.ply Cropping geometry: [========================================] 100% Pointcloud down sampled from 5016769 points to 4957123 points. Pointcloud down sampled from 4957123 points to 4181506 points. [compute_point_cloud_to_point_cloud_distance] [compute_point_cloud_to_point_cloud_distance] : [ViewDistances] Add color coding to visualize error [ViewDistances] Add color coding to visualize error : [get_f1_score_histo2] ============================== evaluation result : Ignatius ============================== distance tau : 0.003 precision : 0.7679 recall : 0.7937 f-score : 0.7806 ============================== ``` -------------------------------- ### Lighting Calculation Example Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/manual.md A basic example of a diffuse lighting calculation using GLM vector and matrix types. Assumes light direction, normal, and diffuse color are defined. ```c++ glm::vec3 lightDir = glm::normalize(glm::vec3(1.0f, 1.0f, 1.0f)); glm::vec3 normal = glm::vec3(0.0f, 1.0f, 0.0f); glm::vec3 diffuseColor = glm::vec3(1.0f, 1.0f, 1.0f); float diffuseFactor = glm::max(0.0f, glm::dot(normal, -lightDir)); glm::vec3 finalColor = diffuseColor * diffuseFactor; ``` -------------------------------- ### Installation Configuration Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/CMakeLists.txt Configures installation rules for GLM, including headers, CMake package configuration files, and version files. This block executes only when the source and current directories are the same, typically during a top-level build. ```cmake if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) include(CPack) install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} PATTERN "CMakeLists.txt" EXCLUDE) install(EXPORT glm FILE glmConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glm NAMESPACE glm::) include(CMakePackageConfigHelpers) write_basic_package_version_file("glmConfigVersion.cmake" COMPATIBILITY AnyNewerVersion) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glm) include(CTest) if(BUILD_TESTING) add_subdirectory(test) endif() endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) ``` -------------------------------- ### Install PyCOLMAP using pip Source: https://github.com/fictionarry/ambisur/blob/main/multi_view_priors/colmap/python/README.md Install pre-built wheels for PyCOLMAP using pip. For GPU acceleration on Linux, consider the `pycolmap-cuda12` package. ```bash pip install pycolmap ``` -------------------------------- ### Basic CMake Project Setup Source: https://github.com/fictionarry/ambisur/blob/main/multi_view_priors/colmap/python/CMakeLists.txt Sets the minimum CMake version, project name, and version. Configures options like stub generation. ```cmake cmake_minimum_required(VERSION 3.10) project(${SKBUILD_PROJECT_NAME} VERSION ${SKBUILD_PROJECT_VERSION}) option(GENERATE_STUBS "Whether to generate stubs" ON) ``` -------------------------------- ### Project and Library Setup Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/CMakeLists.txt Defines the GLM project with its extracted version and adds it as a subdirectory. Creates an alias target for convenient referencing. ```cmake project(glm VERSION ${GLM_VERSION} LANGUAGES CXX) message(STATUS "GLM: Version " ${GLM_VERSION}) add_subdirectory(glm) add_library(glm::glm ALIAS glm) ``` -------------------------------- ### Matrix Transformation Example Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/manual.md Applies a series of transformations (translation, rotation, scaling) to a matrix. Order of operations is important. ```c++ glm::mat4 transform = glm::mat4(1.0f); transform = glm::translate(transform, glm::vec3(0.0f, 0.0f, -5.0f)); transform = glm::rotate(transform, glm::radians(45.0f), glm::vec3(0.0f, 1.0f, 0.0f)); transform = glm::scale(transform, glm::vec3(2.0f, 2.0f, 2.0f)); ``` -------------------------------- ### GLSL Swizzle Example Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/manual.md Demonstrates GLSL swizzle syntax for accessing and assigning vector components using different component identifiers (xyzw, rgba, stpq). ```glsl vec4 A; vec2 B; B.yx = A.wy; B = A.xx; vec3 C = A.bgr; vec3 D = B.rsz; // Invalid, won't compile ``` -------------------------------- ### elasticEaseInOut Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00318.html Applies an elastic easing function that eases both in and out. This creates a spring-like motion with oscillations at both the start and end of the transition. ```APIDOC ## elasticEaseInOut ### Description Applies an elastic easing function that eases both in and out. This creates a spring-like motion with oscillations at both the beginning and the end of the transition. It is modelled after the piecewise exponentially-damped sine wave: y = (1/2)*sin(13pi/2*(2*x))*pow(2, 10 * ((2*x) - 1)) ; [0,0.5) y = (1/2)*(sin(-13pi/2*((2x-1)+1))*pow(2,-10(2*x-1)) + 2) ; [0.5, 1]. ### Template Parameters * `typename genType`: The scalar or vector type of the input and output values. ### Parameters * `a` (`genType const &`): The input value to be eased. ### Returns `genType`: The eased value. ``` -------------------------------- ### CMakeLists.txt for GLM Project Setup Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/test/cmake/CMakeLists.txt This snippet shows how to set up a CMake project to use the GLM library. It ensures the correct CMake version, finds the GLM package, and links an executable to it. ```cmake cmake_minimum_required(VERSION 3.2 FATAL_ERROR) project(test_find_glm) find_package(glm REQUIRED) add_executable(test_find_glm test_find_glm.cpp) target_link_libraries(test_find_glm glm::glm) ``` -------------------------------- ### Build PyCOLMAP from source (Linux/macOS) Source: https://github.com/fictionarry/ambisur/blob/main/multi_view_priors/colmap/python/README.md Build PyCOLMAP from source on Linux or macOS after installing COLMAP from source. This method allows for GPU acceleration and other advanced features. ```bash python -m pip install . ``` -------------------------------- ### Transform Matrix Calculation with Separated Headers Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/manual.md Example demonstrating the use of separated GLM core and extension headers to construct a transformation matrix. This approach helps reduce compilation times by including only necessary features. ```cpp // Include GLM core features #include // vec2 #include // vec3 #include // mat4 #include //radians // Include GLM extension #include // perspective, translate, rotate glm::mat4 transform(glm::vec2 const& Orientation, glm::vec3 const& Translate, glm::vec3 const& Up) { glm::mat4 Proj = glm::perspective(glm::radians(45.f), 1.33f, 0.1f, 10.f); glm::mat4 ViewTranslate = glm::translate(glm::mat4(1.f), Translate); glm::mat4 ViewRotateX = glm::rotate(ViewTranslate, Orientation.y, Up); glm::mat4 View = glm::rotate(ViewRotateX, Orientation.x, Up); glm::mat4 Model = glm::mat4(1.0f); return Proj * View * Model; } ``` -------------------------------- ### Transform Matrix Calculation with Extension Headers Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/manual.md Example showing how to use GLM extension headers for vector and matrix operations, including trigonometric functions and transformations. This method also aims to minimize build times. ```cpp // Include GLM vector extensions: #include // vec2 #include // vec3 #include // radians // Include GLM matrix extensions: #include // mat4 #include // perspective, translate, rotate glm::mat4 transform(glm::vec2 const& Orientation, glm::vec3 const& Translate, glm::vec3 const& Up) { glm::mat4 Proj = glm::perspective(glm::radians(45.f), 1.33f, 0.1f, 10.f); glm::mat4 ViewTranslate = glm::translate(glm::mat4(1.f), Translate); glm::mat4 ViewRotateX = glm::rotate(ViewTranslate, Orientation.y, Up); glm::mat4 View = glm::rotate(ViewRotateX, Orientation.x, Up); glm::mat4 Model = glm::mat4(1.0f); return Proj * View * Model; } ``` -------------------------------- ### elasticEaseInOut Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00023.html Applies an elastic easing function that eases both in and out, simulating a spring-like effect at both the start and end of the motion. ```APIDOC ## elasticEaseInOut ### Description Applies an elastic easing function that eases both in and out, simulating a spring-like effect at both the start and end of the motion. ### Signature ```cpp template GLM_FUNC_DECL genType elasticEaseInOut(genType const &a) ``` ### Parameters * **a** (genType const &) - The input value to ease. ``` -------------------------------- ### Uninstall Target Configuration Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/CMakeLists.txt Configures a custom 'uninstall' target if it doesn't already exist. This target uses a generated script to remove installed files. ```cmake if (NOT TARGET uninstall) configure_file(cmake/cmake_uninstall.cmake.in cmake_uninstall.cmake IMMEDIATE @ONLY) add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake") endif() ``` -------------------------------- ### Project Setup and Language Standards Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/CMakeLists.txt Configures the minimum CMake version, project name, and sets C++ and CUDA standards to C++17 and CUDA 17 respectively. It also disables C++ extensions. ```cmake cmake_minimum_required(VERSION 3.20) project(DiffRast LANGUAGES CUDA CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CUDA_STANDARD 17) ``` -------------------------------- ### quadraticEaseOut Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00023.html Applies a quadratic easing function, modelled after the parabola y = -x^2 + 2x. This creates a rapid start with decreasing speed. ```APIDOC ## quadraticEaseOut ### Description Applies a quadratic easing function, modelled after the parabola y = -x^2 + 2x. This creates a rapid start with decreasing speed. ### Signature template genType quadraticEaseOut(genType const &a) ``` -------------------------------- ### quadraticEaseInOut Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00023.html Applies a quadratic easing function with both ease-in and ease-out, modelled after a piecewise quadratic function. This creates a slow start, a fast middle, and a slow end. ```APIDOC ## quadraticEaseInOut ### Description Applies a quadratic easing function with both ease-in and ease-out, modelled after a piecewise quadratic function. This creates a slow start, a fast middle, and a slow end. ### Signature template genType quadraticEaseInOut(genType const &a) ``` -------------------------------- ### sineEaseInOut Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00023.html Applies a sine easing function with both ease-in and ease-out, modelled after a half sine wave. This creates a slow start, a smooth middle, and a slow end. ```APIDOC ## sineEaseInOut ### Description Applies a sine easing function with both ease-in and ease-out, modelled after a half sine wave. This creates a slow start, a smooth middle, and a slow end. ### Signature template genType sineEaseInOut(genType const &a) ``` -------------------------------- ### Build PyCOLMAP from source (Windows) Source: https://github.com/fictionarry/ambisur/blob/main/multi_view_priors/colmap/python/README.md Build PyCOLMAP from source on Windows after installing COLMAP via VCPKG. This command requires specifying the CMake toolchain file and VCPKG triplet. ```powershell python -m pip install . \ --cmake.define.CMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" \ --cmake.define.VCPKG_TARGET_TRIPLET="x64-windows" ``` -------------------------------- ### Run Training on Datasets Source: https://github.com/fictionarry/ambisur/blob/main/README.md Initiate the training process for the specified datasets. The output directories for each dataset are provided as arguments. ```bash python scripts/run_dtu.py output/dtu ``` ```bash python scripts/run_tnt.py output/tnt ``` ```bash python scripts/run_mip360.py output/mip360 ``` -------------------------------- ### exponentialEaseInOut Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00023.html Applies an exponential easing function with both ease-in and ease-out, modelled after a piecewise exponential function. This creates a slow start, a fast middle, and a slow end. ```APIDOC ## exponentialEaseInOut ### Description Applies an exponential easing function with both ease-in and ease-out, modelled after a piecewise exponential function. This creates a slow start, a fast middle, and a slow end. ### Signature template genType exponentialEaseInOut(genType const &a) ``` -------------------------------- ### quarticEaseInOut Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00023.html Applies a quartic easing function with both ease-in and ease-out, modelled after a piecewise quartic function. This creates a very slow start, a fast middle, and a very slow end. ```APIDOC ## quarticEaseInOut ### Description Applies a quartic easing function with both ease-in and ease-out, modelled after a piecewise quartic function. This creates a very slow start, a fast middle, and a very slow end. ### Signature template genType quarticEaseInOut(genType const &a) ``` -------------------------------- ### Render Test Views with Visualizations Source: https://github.com/fictionarry/ambisur/blob/main/README.md Use this script to render test views with visualizations if they exist. Ensure the model path is correctly set. ```bash python extract_general.py --model_path $OUTPUT_PATH --skip_train ``` -------------------------------- ### GLM Coding Style: Namespace and Class Definition Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/manual.md Provides an example of GLM's coding style for defining namespaces, classes, and constants. Uses tabs for indentation and specific casing conventions. ```cpp #define GLM_MY_DEFINE 76 class myClass {}; myClass const MyClass; namespace glm{ // glm namespace is for public code namespace detail // glm::detail namespace is for implementation detail { float myFunction(vec2 const& V) { return V.x + V.y; } float myFunction(vec2 const* const V) { return V->x + V->y; } }//namespace detail }//namespace glm ``` -------------------------------- ### Camera Matrix Transformation with GLM Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/readme.md Demonstrates creating a camera transformation matrix using GLM functions for perspective projection, translation, rotation, and scaling. Requires including various GLM headers for vectors, matrices, and transformations. ```cpp #include // glm::vec3 #include // glm::vec4 #include // glm::mat4 #include // glm::translate, glm::rotate, glm::scale #include // glm::perspective #include // glm::pi glmm::mat4 camera(float Translate, glm::vec2 const& Rotate) { glm::mat4 Projection = glm::perspective(glm::pi() * 0.25f, 4.0f / 3.0f, 0.1f, 100.f); glm::mat4 View = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, -Translate)); View = glm::rotate(View, Rotate.y, glm::vec3(-1.0f, 0.0f, 0.0f)); View = glm::rotate(View, Rotate.x, glm::vec3(0.0f, 1.0f, 0.0f)); glm::mat4 Model = glm::scale(glm::mat4(1.0f), glm::vec3(0.5f)); return Projection * View * Model; } ``` -------------------------------- ### bitfieldExtract Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00043.html Extracts a specified number of bits from a value starting at a given offset. ```APIDOC ## bitfieldExtract ### Description Extracts bits [offset, offset + bits - 1] from value, returning them in the least significant bits of the result. ### Signature ```cpp template vec bitfieldExtract(vec const &Value, int Offset, int Bits) ``` ### Parameters * **Value** (vec const &) - The input vector value from which to extract bits. * **Offset** (int) - The starting bit position for extraction (0-based). * **Bits** (int) - The number of bits to extract. ### Returns (vec) - A vector containing the extracted bits. ``` -------------------------------- ### bounceEaseInOut Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00023.html Applies a 'bounce' easing function that eases both in and out, simulating bouncing at both the start and end of the motion. ```APIDOC ## bounceEaseInOut ### Description Applies a 'bounce' easing function that eases both in and out, simulating bouncing at both the start and end of the motion. ### Signature ```cpp template GLM_FUNC_DECL genType bounceEaseInOut(genType const &a) ``` ### Parameters * **a** (genType const &) - The input value to ease. ``` -------------------------------- ### Camera Object Creation Source: https://github.com/fictionarry/ambisur/blob/main/multi_view_priors/colmap/python/README.md Demonstrates how to create a COLMAP Camera object, either programmatically or using a dictionary. ```APIDOC ## Camera Object Creation ### Description COLMAP estimators often require a `pycolmap.Camera` object. This section shows how to create one using its constructor or a dictionary representation. ### Usage **Using Constructor:** ```python camera = pycolmap.Camera( model=camera_model_name_or_id, # e.g., 'SIMPLE_PINHOLE' width=image_width, height=image_height, params=camera_parameters_list # e.g., [focal_length, cx, cy] for SIMPLE_PINHOLE ) ``` **Using Dictionary:** ```python camera_dict = { 'model': COLMAP_CAMERA_MODEL_NAME_OR_ID, 'width': IMAGE_WIDTH, 'height': IMAGE_HEIGHT, 'params': EXTRA_CAMERA_PARAMETERS_LIST } # This dictionary can then be passed to functions expecting a camera object. ``` ### Parameters - **model** (string) - The camera model name or ID. - **width** (int) - The image width in pixels. - **height** (int) - The image height in pixels. - **params** (list) - A list of camera intrinsic parameters specific to the model. ### Camera Models Refer to `colmap/src/colmap/sensor/models.h` for a list of supported camera models and their parameters. ``` -------------------------------- ### glm::quat_identity Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00126_source.html Creates an identity quaternion, which represents no rotation. This is often used as a starting point for rotations. ```APIDOC ## glm::quat_identity ### Description Create an identity quaternion. ### Method `quat_identity()` ### Returns An identity quaternion. ``` -------------------------------- ### glm::row (get) Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00293.html Retrieves a specific row from a given matrix. This function is part of the GLM_GTC_matrix_access extension. ```APIDOC ## glm::row (get) ### Description Get a specific row of a matrix. ### Method Not applicable (function signature) ### Parameters * **m** (genType const &) - The input matrix. * **index** (length_t) - The index of the row to retrieve. ``` -------------------------------- ### glm::column (get) Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00293.html Retrieves a specific column from a given matrix. This function is part of the GLM_GTC_matrix_access extension. ```APIDOC ## glm::column (get) ### Description Get a specific column of a matrix. ### Method Not applicable (function signature) ### Parameters * **m** (genType const &) - The input matrix. * **index** (length_t) - The index of the column to retrieve. ``` -------------------------------- ### quarticEaseIn Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00023.html Applies a quartic easing function, modelled after y = x^4. This creates a very slow start with rapidly increasing speed. ```APIDOC ## quarticEaseIn ### Description Applies a quartic easing function, modelled after y = x^4. This creates a very slow start with rapidly increasing speed. ### Signature template genType quarticEaseIn(genType const &a) ``` -------------------------------- ### quadraticEaseIn Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00023.html Applies a quadratic easing function, modelled after the parabola y = x^2. This creates a slow start with increasing speed. ```APIDOC ## quadraticEaseIn ### Description Applies a quadratic easing function, modelled after the parabola y = x^2. This creates a slow start with increasing speed. ### Signature template genType quadraticEaseIn(genType const &a) ``` -------------------------------- ### saturation (matrix) Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00013.html Build a saturation matrix. ```APIDOC ## saturation (matrix) ### Description Build a saturation matrix. ### Signature ```cpp template mat< 4, 4, T, defaultp > saturation(T const s) ``` ### Parameters * **s** (T const) - The saturation factor. ### Returns A saturation matrix. ``` -------------------------------- ### glm::angle Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00160_source.html Converts degrees to radians and returns the result. This function is used to get the rotation angle of a quaternion. ```APIDOC ## glm::angle ### Description Converts degrees to radians and returns the result. Also returns the quaternion rotation angle. ### Function Signature `T angle(qua< T, Q > const &x)` ``` -------------------------------- ### Include and Use Matrix Transformation Extension Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/manual.md Demonstrates how to include the GLM matrix transformation extension and use functions like translate to create transformation matrices. This is useful for common 3D graphics transformations. ```cpp #include #include int foo() { glm::vec4 Position = glm::vec4(glm:: vec3(0.0f), 1.0f); glm::mat4 Model = glm::translate(glm::mat4(1.0f), glm::vec3(1.0f)); glm::vec4 Transformed = Model * Position; ... return 0; } ``` -------------------------------- ### sineEaseIn Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00023.html Applies a sine easing function, modelled after a quarter-cycle of a sine wave. This creates a slow start with increasing speed. ```APIDOC ## sineEaseIn ### Description Applies a sine easing function, modelled after a quarter-cycle of a sine wave. This creates a slow start with increasing speed. ### Signature template genType sineEaseIn(genType const &a) ``` -------------------------------- ### Render Reconstructed Mesh with Open3D Source: https://github.com/fictionarry/ambisur/blob/main/README.md Render the reconstructed mesh at training views using Open3D. This command should be run after the mesh file has been extracted. ```bash python render_mesh.py $OUTPUT_PATH ``` -------------------------------- ### quinticEaseIn Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00023.html Applies a quintic easing function, modelled after y = x^5. This creates an extremely slow start with rapidly increasing speed. ```APIDOC ## quinticEaseIn ### Description Applies a quintic easing function, modelled after y = x^5. This creates an extremely slow start with rapidly increasing speed. ### Signature template genType quinticEaseIn(genType const &a) ``` -------------------------------- ### Load and Inspect a COLMAP Reconstruction Source: https://github.com/fictionarry/ambisur/blob/main/multi_view_priors/colmap/python/README.md Load an existing COLMAP reconstruction from a directory and access its components like images, 3D points, and cameras. The `summary()` method provides a quick overview. ```python import pycolmap reconstruction = pycolmap.Reconstruction("path/to/reconstruction/dir") print(reconstruction.summary()) for image_id, image in reconstruction.images.items(): print(image_id, image) for point3D_id, point3D in reconstruction.points3D.items(): print(point3D_id, point3D) for camera_id, camera in reconstruction.cameras.items(): print(camera_id, camera) ``` -------------------------------- ### Range Utilities Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00138_source.html Provides functions to get the number of components in a GLM vector or matrix, and iterators to access the underlying data. ```APIDOC ## `components` function ### Description Returns the number of components in a GLM vector or matrix. ### Signature ```cpp template length_t components(vec<1, T, Q> const& v) template length_t components(vec<2, T, Q> const& v) template length_t components(vec<3, T, Q> const& v) template length_t components(vec<4, T, Q> const& v) template length_t components(genType const& m) ``` ### Parameters - `v`: A GLM vector. - `m`: A GLM matrix. ### Return Value The total number of scalar components in the vector or matrix. --- ## `begin` and `end` functions ### Description These functions provide iterator-like access to the scalar components of GLM vectors and matrices, enabling range-based for loops. ### Signature ```cpp template typename genType::value_type const * begin(genType const& v) template typename genType::value_type const * end(genType const& v) template typename genType::value_type * begin(genType& v) template typename genType::value_type * end(genType& v) ``` ### Parameters - `v`: A GLM vector or matrix. ### Return Value - `begin`: A pointer to the first scalar component. - `end`: A pointer to the memory location following the last scalar component. ``` -------------------------------- ### exponentialEaseOut Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00023.html Applies an exponential easing function, modelled after y = -2^(-10x) + 1. This creates a rapid start with gradually decreasing speed. ```APIDOC ## exponentialEaseOut ### Description Applies an exponential easing function, modelled after y = -2^(-10x) + 1. This creates a rapid start with gradually decreasing speed. ### Signature template genType exponentialEaseOut(genType const &a) ``` -------------------------------- ### frustumZO Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00059_source.html Creates a frustum matrix. ```APIDOC ## frustumZO ### Description Creates a frustum matrix. ### Signature ```cpp mat< 4, 4, T, defaultp > frustumZO(T left, T right, T bottom, T top, T near, T far) ``` ``` -------------------------------- ### row (matrix access) Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00058.html Get a specific row of a matrix. This function retrieves a row from the given matrix based on the provided index. ```APIDOC ## row (matrix access) ### Description Get a specific row of a matrix. ### Signature template genType::row_type row (genType const & m, length_t index) ### Parameters * **m** (genType const &) - The input matrix. * **index** (length_t) - The index of the row to retrieve. ### Returns genType::row_type - The specified row of the matrix. ``` -------------------------------- ### column (matrix access) Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00058.html Get a specific column of a matrix. This function retrieves a column from the given matrix based on the provided index. ```APIDOC ## column (matrix access) ### Description Get a specific column of a matrix. ### Signature template genType::col_type column (genType const & m, length_t index) ### Parameters * **m** (genType const &) - The input matrix. * **index** (length_t) - The index of the column to retrieve. ### Returns genType::col_type - The specified column of the matrix. ``` -------------------------------- ### GLM Precision Qualifiers Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/manual.md Demonstrates GLM's emulation of GLSL precision qualifiers using prefixes like lowp_, mediump_, and highp_. ```cpp // Using precision qualifier in GLSL: ivec3 foo(in vec4 v) { highp vec4 a = v; mediump vec4 b = a; lowp ivec3 c = ivec3(b); return c; } // Using precision qualifier in GLM: #include ivec3 foo(const vec4 & v) { highp_vec4 a = v; medium_vec4 b = a; lowp_ivec3 c = glm::ivec3(b); return c; } ``` -------------------------------- ### make_mat3 Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00175.html Builds a 3x3 matrix from a pointer to its elements. ```APIDOC ## make_mat3 ### Description Builds a 3x3 matrix from a pointer. ### Signature ```cpp template mat< 3, 3, T, defaultp > make_mat3(T const *const ptr) ``` ### Parameters * **ptr** (T const *const) - Pointer to the matrix elements. ``` -------------------------------- ### sineEaseOut Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00023.html Applies a sine easing function, modelled after a quarter-cycle of a sine wave with a different phase. This creates a rapid start with decreasing speed. ```APIDOC ## sineEaseOut ### Description Applies a sine easing function, modelled after a quarter-cycle of a sine wave with a different phase. This creates a rapid start with decreasing speed. ### Signature template genType sineEaseOut(genType const &a) ``` -------------------------------- ### Defining and Building the Python Module Source: https://github.com/fictionarry/ambisur/blob/main/multi_view_priors/colmap/python/CMakeLists.txt Globally finds all .cc source files in the 'src/pycolmap' directory and adds them to a pybind11 module named '_core'. ```cmake file(GLOB_RECURSE SOURCE_FILES "${PROJECT_SOURCE_DIR}/../src/pycolmap/*.cc") pybind11_add_module(_core ${SOURCE_FILES}) target_include_directories(_core PRIVATE ${PROJECT_SOURCE_DIR}/../src/) target_link_libraries(_core PRIVATE colmap::colmap glog::glog Ceres::ceres) target_compile_definitions(_core PRIVATE VERSION_INFO="${PROJECT_VERSION}") install(TARGETS _core LIBRARY DESTINATION pycolmap) ``` -------------------------------- ### quinticEaseOut Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00023.html Applies a quintic easing function, modelled after y = (x - 1)^5 + 1. This creates a rapid start with gradually decreasing speed. ```APIDOC ## quinticEaseOut ### Description Applies a quintic easing function, modelled after y = (x - 1)^5 + 1. This creates a rapid start with gradually decreasing speed. ### Signature template genType quinticEaseOut(genType const &a) ``` -------------------------------- ### quarticEaseOut Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00023.html Applies a quartic easing function, modelled after y = 1 - (x - 1)^4. This creates a rapid start with gradually decreasing speed. ```APIDOC ## quarticEaseOut ### Description Applies a quartic easing function, modelled after y = 1 - (x - 1)^4. This creates a rapid start with gradually decreasing speed. ### Signature template genType quarticEaseOut(genType const &a) ``` -------------------------------- ### Create COLMAP Camera Object Source: https://github.com/fictionarry/ambisur/blob/main/multi_view_priors/colmap/python/README.md Instantiate a COLMAP camera object with its model, image dimensions, and parameters. This object is used by various estimation functions. ```python camera = pycolmap.Camera( model=camera_model_name_or_id, width=width, height=height, params=params, ) ``` ```python camera = pycolmap.Camera( model='SIMPLE_PINHOLE', width=width, height=height, params=[focal_length, cx, cy], ) ``` -------------------------------- ### Enable SSE3 SIMD Instructions Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/test/CMakeLists.txt Configures the build to use SSE3 instructions if supported by the compiler. Includes compiler-specific flags for GCC, Clang, Intel, and MSVC. ```cmake add_definitions(-DGLM_FORCE_INTRINSICS) if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) add_compile_options(-msse3) elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") add_compile_options(/QxSSE3) elseif((CMAKE_CXX_COMPILER_ID MATCHES "MSVC") AND NOT CMAKE_CL_64) add_compile_options(/arch:SSE2) # VC doesn't support SSE3 endif() message(STATUS "GLM: SSE3 instruction set") ``` -------------------------------- ### make_mat3x3 Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00175.html Builds a 3x3 matrix from a pointer to its elements. ```APIDOC ## make_mat3x3 ### Description Builds a 3x3 matrix from a pointer. ### Signature ```cpp template mat< 3, 3, T, defaultp > make_mat3x3(T const *const ptr) ``` ### Parameters * **ptr** (T const *const) - Pointer to the matrix elements. ``` -------------------------------- ### backEaseInOut with overshoot Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00318.html Applies a 'back' easing function that eases both in and out, with a specified overshoot factor. This version allows control over the overshoot at both the start and end of the transition. ```APIDOC ## backEaseInOut ### Description Applies a 'back' easing function that eases both in and out, with a specified overshoot factor. This creates a smooth acceleration and deceleration with an overshoot at the beginning and end of the transition, controlled by the `o` parameter. ### Template Parameters * `typename genType`: The scalar or vector type of the input and output values. ### Parameters * `a` (`genType const &`): The input value to be eased. * `o` (`genType const &`): The overshoot factor. A value greater than 0 will cause an overshoot. ### Returns `genType`: The eased value. ``` -------------------------------- ### Constructor Overloads Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00181_source.html Provides various constructors for initializing a vec<4, T, Q> object from other swizzled vectors or scalar values. ```APIDOC ## Constructor Overloads This section details the various ways to construct a `vec<4, T, Q>` object. ### Swizzle Constructors These constructors allow creating a `vec<4, T, Q>` by combining elements from other swizzled vectors or by providing individual components. - `template vec(detail::_swizzle<4, T, Q, E0, E1, E2, E3> const& that)`: Initializes from a 4-component swizzle. - `template vec(detail::_swizzle<2, T, Q, E0, E1, -1, -2> const& v, detail::_swizzle<2, T, Q, F0, F1, -1, -2> const& u)`: Initializes from two 2-component swizzles. - `template vec(T const& x, T const& y, detail::_swizzle<2, T, Q, E0, E1, -1, -2> const& v)`: Initializes with two scalars and a 2-component swizzle. - `template vec(T const& x, detail::_swizzle<2, T, Q, E0, E1, -1, -2> const& v, T const& w)`: Initializes with a scalar, a 2-component swizzle, and a scalar. - `template vec(detail::_swizzle<2, T, Q, E0, E1, -1, -2> const& v, T const& z, T const& w)`: Initializes with a 2-component swizzle and two scalars. - `template vec(detail::_swizzle<3, T, Q, E0, E1, E2, -1> const& v, T const& w)`: Initializes from a 3-component swizzle and a scalar. - `template vec(T const& x, detail::_swizzle<3, T, Q, E0, E1, E2, -1> const& v)`: Initializes with a scalar and a 3-component swizzle. ``` -------------------------------- ### glm::bitfieldExtract Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00043_source.html Extracts a specified number of bits from a value starting at a given offset. This is useful for parsing bitfields within larger integer types. ```APIDOC ## glm::bitfieldExtract ### Description Extracts `Bits` number of bits from `Value` starting at `Offset`. ### Signature ```cpp template vec bitfieldExtract(vec const& Value, int Offset, int Bits); ``` ### Parameters * `Value` (vec): The source vector from which to extract bits. * `Offset` (int): The starting bit position (0 is the least significant bit). * `Bits` (int): The number of bits to extract. ``` -------------------------------- ### make_mat2x3 Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00175.html Builds a 2x3 matrix from a pointer to its elements. ```APIDOC ## make_mat2x3 ### Description Builds a 2x3 matrix from a pointer. ### Signature ```cpp template mat< 2, 3, T, defaultp > make_mat2x3(T const *const ptr) ``` ### Parameters * **ptr** (T const *const) - Pointer to the matrix elements. ``` -------------------------------- ### exponentialEaseIn Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00023.html Applies an exponential easing function to a value, modelled after y = 2^(10(x - 1)). This creates a slow start with rapidly increasing speed. ```APIDOC ## exponentialEaseIn ### Description Applies an exponential easing function to a value, modelled after y = 2^(10(x - 1)). This creates a slow start with rapidly increasing speed. ### Signature template genType exponentialEaseIn(genType const &a) ``` -------------------------------- ### Enable SSE4.1 SIMD Instructions Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/test/CMakeLists.txt Configures the build to use SSE4.1 instructions if supported by the compiler. Includes compiler-specific flags for GCC, Clang, Intel, and MSVC. ```cmake add_compile_options(/arch:SSE2) # VC doesn't support SSE4.1 endif() message(STATUS "GLM: SSE4.1 instruction set") ``` -------------------------------- ### wwxx Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00187_source.html Constructs a new 4-component vector by selecting components from the input vector 'v'. The components are ordered as follows: v.w, v.w, v.x, v.x. ```APIDOC ## wwxx ### Description Constructs a new 4-component vector using the components v.w, v.w, v.x, and v.x from the input vector `v`. ### Signature ```cpp template glM_INLINE glm::vec<4, T, Q> wwxx(const glm::vec<4, T, Q> &v) ``` ### Parameters * `v` (const glm::vec<4, T, Q>&): The input vector. ### Return Value A `glm::vec<4, T, Q>` constructed with the specified components. ``` -------------------------------- ### Finding Required Packages Source: https://github.com/fictionarry/ambisur/blob/main/multi_view_priors/colmap/python/CMakeLists.txt Finds and links necessary external packages including colmap, Python (with Interpreter and Development.Module components), and pybind11. ```cmake find_package(colmap REQUIRED) if (CMAKE_VERSION VERSION_LESS 3.18) set(DEV_MODULE Development) else() set(DEV_MODULE Development.Module) endif() find_package(Python REQUIRED COMPONENTS Interpreter ${DEV_MODULE} REQUIRED) find_package(pybind11 2.13.0 REQUIRED) ``` -------------------------------- ### glm::quarticEaseInOut Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00318.html Applies a quartic ease-in-out effect, modelled after a piecewise quartic function. This creates an animation that starts slowly, accelerates in the middle, and then slows down again at the end. ```APIDOC ## glm::quarticEaseInOut ### Description Applies a quartic ease-in-out effect, modelled after a piecewise quartic function. This creates an animation that starts slowly, accelerates in the middle, and then slows down again at the end. ### Function Signature genType glm::quarticEaseInOut(genType const & a) ### Parameters * **a** (genType const &) - The input value to apply the easing function to. ### See Also * [GLM_GTX_easing](a00318.html) ``` -------------------------------- ### glm::quarticEaseIn Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00318.html Applies a quartic ease-in effect, modelled after the quartic function x^4. This function creates an animation that starts slowly and accelerates towards the end. ```APIDOC ## glm::quarticEaseIn ### Description Applies a quartic ease-in effect, modelled after the quartic function x^4. This function creates an animation that starts slowly and accelerates towards the end. ### Function Signature genType glm::quarticEaseIn(genType const & a) ### Parameters * **a** (genType const &) - The input value to apply the easing function to. ### See Also * [GLM_GTX_easing](a00318.html) ``` -------------------------------- ### GLM Initialization of Generic Types Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/doc/api/a00124_source.html Provides static methods for initializing generic GLM types, such as identity quaternions and matrices. ```c++ template struct init_gentype { }; template struct init_gentype { GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genType [identity](a00247.html#ga81696f2b8d1db02ea1aff8da8f269314)() { return genType(1, 0, 0, 0); } }; template struct init_gentype { GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genType [identity](a00247.html#ga81696f2b8d1db02ea1aff8da8f269314)() { return genType(1); } }; ``` -------------------------------- ### Enable SSSE3 SIMD Instructions Source: https://github.com/fictionarry/ambisur/blob/main/submodules/diff-plane-rasterization-ambisur/third_party/glm/test/CMakeLists.txt Configures the build to use SSSE3 instructions if supported by the compiler. Includes compiler-specific flags for GCC, Clang, Intel, and MSVC. ```cmake add_definitions(-DGLM_FORCE_INTRINSICS) if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) add_compile_options(-mssse3) elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") add_compile_options(/QxSSSE3) elseif((CMAKE_CXX_COMPILER_ID MATCHES "MSVC") AND NOT CMAKE_CL_64) add_compile_options(/arch:SSE2) # VC doesn't support SSSE3 endif() message(STATUS "GLM: SSSE3 instruction set") ```