Learn R Programming

cognizer (version 0.0.1)

image_classify: IBM Watson Image Classifier

Description

image_classify: Uses default classifier to determine the object catagory in the image.

image_detectface: Uses default algorithm to detect a face in the image and provide its coordinates.

image_detecttext: Uses default algorithm to detect text in the image.

Usage

image_classify(images, api_key, keep_data = "true", callback = NULL, type = "image/jpeg", version = "2016-05-20", accept_language = "en", batch_size = 1)
image_detectface(images, api_key, keep_data = "true", callback = NULL, type = "image/jpeg", version = "2016-05-20", batch_size = 1)
image_detecttext(images, api_key, keep_data = "true", callback = NULL, type = "image/jpeg", version = "2016-05-20", batch_size = 1)

Arguments

images
Character vector (list) of paths to images or to .zip files containing upto 100 images.
api_key
Character scalar containing api key obtained from Watson services.
keep_data
Character scalar specifying whether to share your data with Watson services for the purpose of training their models.
callback
Function that can be applied to responses to examine http status, headers, and content, to debug or to write a custom parser for content. The default callback parses content into a data.frame while dropping other response values to make the output easily passable to tidyverse packages like dplyr or ggplot2. For further details or debugging one can pass a fail or a more compicated function.
type
Character scalar specifying image format. Alternative is "image/png".
version
Character scalar giving version of api to use.
accept_language
Character scalar specifying the output language.
batch_size
Integer scalar giving the number of images in a given path. This is used when images are zipped together. Check IBM docs for maximum number in a single zip file.

Value

List of parsed responses.List of parsed responses.List of parsed responses.