parse_annotations {imgrec} | R Documentation |
parse image annotations
Description
Parses the annotations and converts most of the features to data frames. Also stores the corresponding image identifiers for each feature as 'img_id'
Usage
parse_annotations(annotations)
Arguments
annotations |
An annotation object created with |
Value
A list containing data frames for each feature:
- labels
label annotations
- web_labels
web label annotations
- web_similar
similar web images
- web_match_partial
partial matching web images
- web_match_full
full matching web images
- web_match_pages
matching web pages
- faces
face annotations
- objects
object annotations
- logos
logo annotations
- landmarks
landmark annotations
- full_text
full text annotation
- safe_serarch
safe search annotation
- colors
dominant color annotations
- crop_hints
crop hints for ratios 0.8/1.0/1.2
Examples
## 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)
[Package imgrec version 0.1.4 Index]