FREAKFeature.match#
- FREAKFeature.match(other: BaseFeature2D, ratio: float = 0.75, crosscheck: bool = False, metric: str | None = None, 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’, ‘hamming’, ‘hamming2’. Defaults to
None, which auto-selects ‘hamming’ for binary descriptors (eg. ORB, BRISK, AKAZE) and ‘L2’ otherwise (eg. SIFT).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 disabledNote
Binary descriptors (eg. ORB, BRISK, AKAZE) are
uint8arrays, for which ‘L2’ distance is close to meaningless – it will silently return very few matches rather than raising an error, which is why this is auto-selected rather than left for the caller to always remember.Example:
>>> from machinevisiontoolbox import Image >>> orb1 = Image.Read("eiffel-1.png").ORB() >>> orb2 = Image.Read("eiffel-2.png").ORB() >>> m = orb1.match(orb2) >>> len(m) 82
- Seealso: