Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
Google Inc.
Anand Suresh
Brett Bergmann
Jesse Friedman
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Brett Bergmann <me@brettbergmann.com>
Burcu Dogan <jbd@google.com>
Hector Rovira <hrovira@gmail.com>
Ido Shamun <idoesh1@gmail.com>
Jesse Friedman <jesse@jesse.ws>
Johan Euphrosine <proppy@google.com>
Marco Ziccardi <marco.ziccard@gmail.com>
Patrick Costello <pcostell@google.com>
Expand Down
6 changes: 6 additions & 0 deletions lib/vision/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ Vision.prototype.annotate = function(requests, callback) {
* `logos`, `properties`, `safeSearch`, `text`.
* @param {boolean=} options.verbose - Use verbose mode, which returns a less-
* simplistic representation of the annotation (default: `false`).
* @param {object=} options.imageContext - An `ImageContext`. See an

This comment was marked as spam.

* [`ImageContext`](https://cloud.google.com/vision/reference/rest/v1/images/annotate#ImageContext).
* @param {function} callback - The callback function.
* @param {?error} callback.err - An error returned while making this request.
* @param {object|object[]} callback.detections - If a single detection type was
Expand Down Expand Up @@ -316,6 +318,10 @@ Vision.prototype.detect = function(images, options, callback) {
cfg.features.maxResults = options.maxResults;
}

if (is.object(options.imageContext)) {
cfg.imageContext = options.imageContext;
}

config.push(cfg);
});
});
Expand Down