read_captcha | R Documentation |
Given the paths to one or more files, reads and converts
them into a captcha
list that can be used for modeling or
prediction. If lab_in_path=TRUE
, will take the label for the
Captchas from their filenames using _
as the separator.
read_captcha(files, lab_in_path = FALSE)
files |
Paths to one or more captcha images |
lab_in_path |
Whether or not the labels to the captchas are already in the paths to the files (separated by and underscore in the filename) |
The read_captcha()
function reads a character vector of image files and
stores them in memory. Behind the scenes, the function uses the
{magick}
package to deal with
the types of files that may appear (JPEG, PNG, among others).
A list of class captcha
. The captcha
object is a list with
three elements: $img
, which contains the image read from the {magick}
package; $lab
, which contains the image label (by default, NULL
); and
$path
, which contains the path of the image.
captcha_file <- system.file("examples/captcha/esaj.png", package = "captcha")
cap <- read_captcha(captcha_file)
cap
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.