-
Notifications
You must be signed in to change notification settings - Fork 77
Refactor matching options #199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dumasl
wants to merge
14
commits into
MISS3D:master
Choose a base branch
from
dumasl:refactor_matching_options
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…e stereo_matcher instance at first, once and for all
…ptions Conflicts: s2p.py
Note that there still could be some improvements like:
|
dumasl
commented
Mar 1, 2019
…nto refactor_matching_options
dyoussef
approved these changes
Mar 6, 2019
dyoussef
approved these changes
Mar 6, 2019
Environment export calls have been gather in a function, define in the abstract metadata base class
…arams Define default values for exported environment parameters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Color description
Technical summary
StereoMatching
classThis MR refactors the way we use matching algorithms:
stereo_matching_algo
package is created under s2plib modulestereo_matching
module can be found and it provides aStereoMatching
classmgm
andmsmw
module are available with associated stereo matching classesThe
StereoMatching
class iscompute_disparity_map()
rectify_secondary_tile_only()
__new__()
, which is a constructor, and a constructor creates a class, and what creates a class is a metaclass, hence making StereoMatching a metaclassStereoMatching
itself does not provide any way to compute a disparity map. Subclasses are required for that purpose and shall be seen as stereo matching plugins.This means importing
StereoMatching
does not provide any algorithm (let alone algorithms choice) if no plugin is loaded.StereoMatching
pluginsEvery time a plugin is loaded / imported with classes that are
StereoMatching
subclasses, it is registered as aStereoMatching
class and then is instanciable.Then it becomes possible to instanciate a stereo matcher:
Now this does not really come handy since one has to know the class fullname (
mgmMatching
here). To ease this process and match s2p configuration (stereo matching algorithms),StereoMatching
provides a decorator for self registring with a short name so that one can also istanciate themgmMatching
class like this:The only thing requires then to use a new stereo matching algorithm (apart from implementing the stereo matching plugin) is to import it.
What changes for s2p
Then:
StereoMatching
class is created inside s2p.py main method so that we crash early on in the process if the stereo method is not availableCaution
This MR gets rid off lots of stereo matchers s2p provided so far. However, there is nothing preventing us from addind them back if required.