View source: R/identify_matches.R
identify_matches | R Documentation |
identify_matches
analyzes a matchr_matrix
vector of image signature
Hamming distances to identify possible matches. By default it sets a low
threshold for identifying matches, with the assumption that the results will
be refined using confirm_matches
, either within the function if
confirm = TRUE
, or subsequently with a separate function call.
identify_matches(x, y = NULL, threshold = 200, quiet = FALSE, ...)
## S3 method for class 'matchr_matrix'
identify_matches(x, y = NULL, threshold = 200, quiet = FALSE, ...)
## S3 method for class 'matchr_signature'
identify_matches(
x,
y = NULL,
threshold = 200,
quiet = FALSE,
distance = ~nearest * bilinear,
compare_ar = TRUE,
stretch = 1.2,
mem_scale = 0.2,
...
)
x |
A vector of class |
y |
A vector of class |
threshold |
A numeric scalar. The maximum Hamming distance to consider images to be matched. |
quiet |
A logical scalar. Should the function execute quietly, or should it return status updates throughout the function (default)? |
... |
Additional arguments passed to methods. |
distance, compare_ar, stretch, mem_scale |
Arguments passed to
|
A tibble if dplyr is installed or a data frame if not, with one row per identified match, and the following columns:
index
: The match's index position in the input matchr_matrix
vector.
Each element is a length-three integer vector giving, respectively, the
matrix, row index position, and column index position of the match.
x_sig
and y_sig
: matchr_signature
vectors containing the image
signatures which were matched.
distance
: An integer vector giving the Hamming distance between the two
files' image signatures. (The lower the distance, the more perceptually
similar the images are.)
## Not run:
# Setup
sigs <- create_signature(test_urls)
matches <- match_signatures(sigs)
# By default, confirm_matches will be called inside identify_matches
result <- identify_matches(matches)
# Skip this step with confirm = FALSE
result_no_confirm <- identify_matches(matches, confirm = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.