matchKeypoints: Match Keypoints

View source: R/feature.R

matchKeypointsR Documentation

Match Keypoints

Description

matchKeypoints matches keypoints detected in two separate images. This is useful to find common features for image registration, for instance.

Usage

matchKeypoints(
  source,
  target,
  descriptor_matcher = "BruteForce-Hamming",
  match_frac = 0.15
)

Arguments

source, target

Single-channel Image objects containing the BRIEF descriptors of the source and target images, as produced by ORBkeypoints.

descriptor_matcher

A character string indicating the type of the descriptor matcher to use. It can be one of the followings: "BruteForce", "BruteForce-L1", "BruteForce-Hamming" (the default), "BruteForce-Hamming(2)", or "FlannBased".

match_frac

The fraction of top matches to keep (default: 0.15).

Value

A three-column matrix with the identities of the keypoints matched between the source and target images, and the distance between them (a lower distance indicates a better match).

Author(s)

Simon Garnier, garnier@njit.edu

See Also

ORBkeypoints

Examples

balloon1 <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
balloon2 <- image(system.file("sample_img/balloon2.png", package = "Rvision"))
kp1 <- ORBkeypoints(balloon1, n_features = 40000)
kp2 <- ORBkeypoints(balloon2, n_features = 40000)
matchKeypoints(kp1$descriptors, kp2$descriptors, match_frac = 1)


swarm-lab/Rvision documentation built on Feb. 7, 2024, 4:59 a.m.