prep_image: prepare local image

Description Usage Arguments Value Examples

Description

Prepares a local image for an upload the 'Kairos' API via detect, enroll, recognize and verify.

Usage

1
prep_image(img_file)

Arguments

img_file

Path to an image of file type 'JPG', 'PNG', or 'BMP'.

Value

The prepared image object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
 

 facerec_init()

 # download example image
 finn_image <- 'https://upload.wikimedia.org/wikipedia/en/2/2a/Finn-Force_Awakens_%282015%29.png'
 temp_img_path <- tempfile(fileext = '.png')
 download.file(finn_image, temp_img_path, mode = 'wb', quiet = TRUE)

 # prepare image
 finn_local <- prep_image(temp_img_path)

 # use prepared image
 faces <- detect(image = finn_local)
 

facerec documentation built on May 2, 2019, 3:45 p.m.