ahojnnes ยท GitHub

Summary of Changes

Hello @ahojnnes, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request undertakes a significant refactoring effort to untangle a circular dependency between the feature and scene libraries. By creating a dedicated colmap_scene_types library for common scene data structures and relocating pairing and matcher_cache to the controllers module, the codebase's modularity and maintainability are greatly enhanced. The changes ensure a cleaner, more logical dependency flow, all while preserving the current operational behavior of the system.

Highlights

  • New Library Introduction: A new library, colmap_scene_types, has been introduced to house fundamental scene-related data structures, such as camera, frame, image, point2d, and two_view_geometry.
  • Component Relocation: The pairing and matcher_cache functionalities, along with their associated test files, have been moved from the feature library to the controllers library.
  • Dependency Refactoring: Circular dependencies between the feature and scene libraries have been resolved by reorganizing header includes and updating CMake build configurations to reflect the new library structure.
  • No Functional Change: These extensive structural and organizational changes have been implemented without altering the existing functionality of the application.
Changelog
  • CMakeLists.txt
    • Added colmap_scene_types to the list of exported libraries.
  • src/colmap/controllers/CMakeLists.txt
    • Added matcher_cache.h, matcher_cache.cc, pairing.h, and pairing.cc to the colmap_controllers library sources.
    • Added colmap_retrieval and faiss to the public link libraries for colmap_controllers.
    • Added a new test target for pairing_test.cc.
  • src/colmap/controllers/feature_matching.h
    • Updated include path for pairing.h to reflect its new location.
  • src/colmap/controllers/matcher_cache.cc
    • Added implementation for the FeatureMatcherCache class.
  • src/colmap/controllers/matcher_cache.h
    • Added declaration for the FeatureMatcherCache class.
  • src/colmap/controllers/option_manager.cc
    • Updated include path for pairing.h to reflect its new location.
  • src/colmap/controllers/pairing.cc
    • Renamed from src/colmap/feature/pairing.cc and updated its self-include path.
  • src/colmap/controllers/pairing.h
    • Renamed from src/colmap/feature/pairing.h and updated its includes to use colmap/controllers/matcher_cache.h.
  • src/colmap/controllers/pairing_test.cc
    • Renamed from src/colmap/feature/pairing_test.cc and updated its include path.
  • src/colmap/feature/CMakeLists.txt
    • Removed pairing.h, pairing.cc, and pairing_test.cc from the colmap_feature library sources and tests.
    • Removed colmap_retrieval and colmap_scene from PUBLIC_LINK_LIBS.
    • Added colmap_scene_types to PUBLIC_LINK_LIBS.
  • src/colmap/feature/matcher.cc
    • Removed the implementation of FeatureMatcherCache.
  • src/colmap/feature/matcher.h
    • Removed the declaration of FeatureMatcherCache and associated includes.
  • src/colmap/feature/sift.h
    • Added includes for colmap/feature/index.h and colmap/util/cache.h.
  • src/colmap/scene/CMakeLists.txt
    • Created a new library colmap_scene_types and moved camera.h/cc, frame.h/cc, image.h/cc, point2d.h/cc, and two_view_geometry.h/cc to its sources.
    • Configured colmap_scene_types with necessary public link libraries.
    • Removed the moved files from the colmap_scene library sources.
    • Updated colmap_scene to publicly link colmap_scene_types and removed direct links to its former dependencies.
  • src/pycolmap/pipeline/match_features.cc
    • Updated include path for pairing.h to reflect its new location.
Activity
  • No human activity (comments, reviews, etc.) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with ๐Ÿ‘ and ๐Ÿ‘Ž on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. โ†ฉ

Read the original on github.com โ†—