FeatureMatcher

class giant.image_processing.feature_matchers.FeatureMatcher[source]

Abstract base class for any image matching process.

This provides a generalized, high-level interface. The only requirement for a concrete implementation is to define a match_images method that takes two images and returns the coordinates of matching points.

abstractmethod match_images(image1, image2)[source]

Finds and returns correspondences between two images.

Parameters:
  • image1 (ndarray[tuple[Any, ...], dtype[_ScalarT]]) – The first image to match (NumPy array).

  • image2 (ndarray[tuple[Any, ...], dtype[_ScalarT]]) – The second image to match (NumPy array).

Returns:

A NumPy array of matched keypoint locations with a shape of (N, 2, 2), where N is the number of matches. Each element is structured as [[x1, y1], [x2, y2]], representing the coordinates from image 1 and image 2, respectively.

Return type:

ndarray[tuple[Any, …], dtype[float64]]