Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Adapt all the controllers to inherit from BaseController rather than Thread (except for feature extraction and matching)#2406

Merged
ahojnnes merged 17 commits into
colmap:maincolmap/colmap:mainfrom
B1ueber2y:features/controllersB1ueber2y/colmap:features/controllersCopy head branch name to clipboard
Feb 10, 2024
Merged

Adapt all the controllers to inherit from BaseController rather than Thread (except for feature extraction and matching)#2406
ahojnnes merged 17 commits into
colmap:maincolmap/colmap:mainfrom
B1ueber2y:features/controllersB1ueber2y/colmap:features/controllersCopy head branch name to clipboard

Conversation

@B1ueber2y

@B1ueber2y B1ueber2y commented Feb 9, 2024

Copy link
Copy Markdown
Contributor

This PR includes the updates as follows:

  • Adapt all the controllers except for feature extraction and matching to use the new logic. Each controller inherits from BaseController, and in the ui a ControllerThread is instantiated.
  • Move ControllerThread in the util, such that there is no "Thread"-related practice in the other folder. Maybe we should separate class Thread from ThreadPool and JobQueue at util/threading.h and move Thread class and ControllerThread class completely into the ui folder.

Now feature extraction and feature matching still inherits from the Thread class since in Python we will use different logics. However, because of this the AutomaticReconstructionController needs to inherit from Thread as well to support the Stopping function for the feature extractor and matcher. While this can potentially be resolved by adding SignalInvalidSetup, SignalValidSetup, and CheckValidSetup into the controller with a boolean valued callback, this might be a little overcomplication in the class design since this is not relevant to pybind for now. It depends on whether we want to totally disentangle the Thread outside the ui @ahojnnes @sarlinpe

If needed I can make the update on the feature extraction and matcher later as well in a separate PR.

@B1ueber2y

Copy link
Copy Markdown
Contributor Author

OK unfortunately keeping the BaseController class in the controllers folder and inheriting it in the undistorters will result in cyclic dependency between the controllers folder and image folder, so I have to move the BaseController implementation to util folder as well.

@sarlinpe

sarlinpe commented Feb 9, 2024

Copy link
Copy Markdown
Member

undistortion.cc is huge (1.1k LOC), it would make sense to split it into a controller (that would go into controllers/) and the actual undistortion utils. This would also make it easier to write bindings for it.

@B1ueber2y

Copy link
Copy Markdown
Contributor Author

undistortion.cc is huge (1.1k LOC), it would make sense to split it into a controller (that would go into controllers/) and the actual undistortion utils. This would also make it easier to write bindings for it.

Sure sounds good. But then how about the mvs if we put BaseController back to the controllers folder? Patchmatch stereo and fusion also uses the controller, making the controller folder a dependency for the mvs. This also does not feel like an ideal dependency graph conceptually.

Comment thread src/colmap/util/controller_thread.h
Comment thread src/colmap/util/controller_thread.h Outdated
Comment thread src/colmap/util/controller_thread.h Outdated
@ahojnnes
ahojnnes merged commit a692b68 into colmap:main Feb 10, 2024
@B1ueber2y
B1ueber2y deleted the features/controllers branch February 11, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.