View source: R/parse_annotations.R
parse_annotations | R Documentation |
Parses the annotations and converts most of the features to data frames. Also stores the corresponding image identifiers for each feature as 'img_id'
parse_annotations(annotations)
annotations |
An annotation object created with |
A list containing data frames for each feature:
label annotations
web label annotations
similar web images
partial matching web images
full matching web images
matching web pages
face annotations
object annotations
logo annotations
landmark annotations
full text annotation
safe search annotation
dominant color annotations
crop hints for ratios 0.8/1.0/1.2
## Not run:
# initialize api credentials
gvision_init()
# annotate images
finn_image <- 'https://upload.wikimedia.org/wikipedia/en/2/2a/Finn-Force_Awakens_%282015%29.png'
sw_image <- 'https://upload.wikimedia.org/wikipedia/en/8/82/Leiadeathstar.jpg'
padme_image <- 'https://upload.wikimedia.org/wikipedia/en/e/ee/Amidala.png'
results <- get_annotations(images = c(finn_image, sw_image, padme_image),
features = 'all', max_res = 10, mode = 'url')
# parse annotations
img_data <- parse_annotations(results)
# available feature data frames
names(img_data)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.