BaseFeature2D.match#
- BaseFeature2D.match(other: BaseFeature2D, ratio: float = 0.75, crosscheck: bool = False, metric: str = 'L2', sort: bool = True, top: int | None = None, thresh: float | None = None) FeatureMatch[source]#
Match point features
- Parameters:
other (BaseFeature2D) – set of feature points
ratio (float, optional) – parameter for Lowe’s ratio test, defaults to 0.75
crosscheck (bool, optional) – perform left-right cross check, defaults to False
metric (str, optional) – distance metric, one of: ‘L1’, ‘L2’ [default], ‘hamming’, ‘hamming2’
sort (bool, optional) – sort features by strength, defaults to True
- Raises:
ValueError – bad metric name provided
- Returns:
set of candidate matches
- Return type:
FeatureMatchinstance
Return a match object that contains pairs of putative corresponding points. If
crosscheckis True the ratio test is disabledExample:
>>> from machinevisiontoolbox import Image >>> orb1 = Image.Read("eiffel-1.png").ORB() >>> orb2 = Image.Read("eiffel-2.png").ORB() >>> m = orb1.match(orb2) >>> len(m) 39
- Seealso: