Matching
You can import icepy4d matching module by
from icepy4d import matching
ImageMatcherBase
Bases: ImageMatcherABC
__init__(opt={})
Base class for matchers. It defines the basic interface for matchers and basic functionalities that are shared among all matchers, in particular the match
method. It must be subclassed to implement a new matcher.
Parameters: |
|
---|
Raises: |
|
---|
match(image0, image1, quality=Quality.HIGH, tile_selection=TileSelection.NONE, **config)
Matches images and performs geometric verification.
Parameters: |
|
---|
Returns: |
|
---|
reset()
Reset the matcher by clearing the features and matches
save_mkpts_as_txt(savedir, delimiter=',', header='x,y')
Save keypoints in a .txt file
viz_matches_cv2(image0, image1, pts0, pts1, save_path=None, pts_col=(0, 0, 255), point_size=2, line_col=(0, 255, 0), line_thickness=1, margin=10)
Plot matching points between two images using OpenCV.
Parameters: |
|
---|
Returns: |
|
---|
LOFTRMatcher
Bases: ImageMatcherBase
__init__(opt={})
Initializes a LOFTRMatcher with Kornia object with the given options dictionary.
LightGlueMatcher
Bases: ImageMatcherBase
__init__(opt={})
Initializes a LightGlueMatcher with Kornia
SuperGlueMatcher
Bases: ImageMatcherBase
__init__(opt)
Initializes a SuperGlueMatcher object with the given options dictionary.
The options dictionary should contain the following keys:
- 'weights': defines the type of the weights used for SuperGlue inference. It can be either "indoor" or "outdoor". Default value is "outdoor".
- 'keypoint_threshold': threshold for the SuperPoint keypoint detector
- 'max_keypoints': maximum number of keypoints to extract with the SuperPoint detector. Default value is 0.001.
- 'match_threshold': threshold for the SuperGlue feature matcher
- 'force_cpu': whether to force using the CPU for inference
Parameters: |
|
---|
Raises: |
|
---|
viz_matches(image0, image1, path, fast_viz=False, show_keypoints=False, opencv_display=False)
Visualize the matching result between two images.
Args: - path (str): The output path to save the visualization. - fast_viz (bool): Whether to use preselection visualization method. - show_keypoints (bool): Whether to show the detected keypoints. - opencv_display (bool): Whether to use OpenCV for displaying the image.
Returns: - None
TODO: replace make_matching_plot with native a function implemented in icepy4D