Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@B1ueber2y
Copy link
Contributor

@B1ueber2y B1ueber2y commented Feb 9, 2024

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
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
Copy link
Member

sarlinpe commented Feb 9, 2024

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
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.

@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