match_images | R Documentation |
match_images
is a convenience wrapper around the core workflow of
matchr. It reads in one or two character vectors of image paths and then
runs load_image
, create_signature
,
match_signatures
, and identify_matches
, (in each
case with the respective function's default arguments), and then optionally
sends the results to the confirm_matches
interactive Shiny app
for manual verification and integrates any manual changes into the output
data frame.
match_images(x, y = NULL, compare = TRUE, quiet = FALSE)
x, y |
Character vector of file paths or URLs. If |
compare |
A logical scalar. Should the interactive
|
quiet |
A logical scalar. Should the function execute quietly, or should it return status updates throughout the function (default)? |
For large datasets where performance and memory considerations make it
prudent to save intermediate outputs, or if any non-default options are
required, it is recommended to run the component functions separately, but
for small datasets match_images
offers the simplest path from images
to image matches.
A tibble if dplyr is installed or a data frame if not, with one row per identified match, and the following columns:
x_path
and y_path
: The file paths for the images which were matched.
x_sig
and y_sig
: The matchr_signature
vectors of the matched images.
distance
: The Hamming distance between the two files' image signatures.
match
: If compare = TRUE
, a logical vector indicating match status.
highlight
: If compare = TRUE
, a logical vector indicating matches
flagged for future review.
#' (See confirm_matches
for details.)
## Not run:
# Use match_images with a single argument to identify matches within a set of images
match_images(example_urls)
# Or add a second argument to identify matches between two sets of images
match_images(example_urls[1:8], example_urls[9:15])
# To retrieve results without verification through the Shiny app, set `compare = FALSE`
match_images(example_urls, compare = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.