google-cloud-vision 0.24.0 → 0.25.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 264c4bec187e3b7f07a1071352e54a7d41052349
|
4
|
+
data.tar.gz: 78d4f95902e26bd2d78d95e84cf0f8775fcc1d42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 433215101554848c5ba0ea8f55a0ae6524772d61eedfca5087cf3053946bcf196b14046778833b2833d8bd57de04fdcfda8f2ed72c393c6247679c886b99d611
|
7
|
+
data.tar.gz: d3aae9451019ece567eacbc30e6b81bca5c2303e3afe648795ccdbad4ae796c89106a3b526e00f21631ece6fd7d262bec04e446651bca853618e2f0255716883
|
@@ -434,6 +434,96 @@ module Google
|
|
434
434
|
annotation.web
|
435
435
|
end
|
436
436
|
|
437
|
+
##
|
438
|
+
# Performs detection of Cloud Vision
|
439
|
+
# [features](https://cloud.google.com/vision/reference/rest/v1/images/annotate#Feature)
|
440
|
+
# on the image. If no options for features are provided, **all** image
|
441
|
+
# detection features will be performed, with a default of `100` results
|
442
|
+
# for faces, landmarks, logos, labels, crop_hints, and web. If any
|
443
|
+
# feature option is provided, only the specified feature detections will
|
444
|
+
# be performed. Please review
|
445
|
+
# [Pricing](https://cloud.google.com/vision/docs/pricing) before use, as
|
446
|
+
# a separate charge is incurred for each feature performed on an image.
|
447
|
+
#
|
448
|
+
# @see https://cloud.google.com/vision/docs/requests-and-responses Cloud
|
449
|
+
# Vision API Requests and Responses
|
450
|
+
# @see https://cloud.google.com/vision/reference/rest/v1/images/annotate#AnnotateImageRequest
|
451
|
+
# AnnotateImageRequest
|
452
|
+
# @see https://cloud.google.com/vision/docs/pricing Cloud Vision Pricing
|
453
|
+
#
|
454
|
+
# @param [Boolean, Integer] faces Whether to perform the facial
|
455
|
+
# detection feature. The maximum number of results is configured in
|
456
|
+
# {Google::Cloud::Vision.default_max_faces}, or may be provided here.
|
457
|
+
# Optional.
|
458
|
+
# @param [Boolean, Integer] landmarks Whether to perform the landmark
|
459
|
+
# detection feature. The maximum number of results is configured in
|
460
|
+
# {Google::Cloud::Vision.default_max_landmarks}, or may be provided
|
461
|
+
# here. Optional.
|
462
|
+
# @param [Boolean, Integer] logos Whether to perform the logo detection
|
463
|
+
# feature. The maximum number of results is configured in
|
464
|
+
# {Google::Cloud::Vision.default_max_logos}, or may be provided here.
|
465
|
+
# Optional.
|
466
|
+
# @param [Boolean, Integer] labels Whether to perform the label
|
467
|
+
# detection feature. The maximum number of results is configured in
|
468
|
+
# {Google::Cloud::Vision.default_max_labels}, or may be provided here.
|
469
|
+
# Optional.
|
470
|
+
# @param [Boolean] text Whether to perform the text detection feature
|
471
|
+
# (OCR for shorter documents with sparse text). Optional.
|
472
|
+
# @param [Boolean] document Whether to perform the document text
|
473
|
+
# detection feature (OCR for longer documents with dense text).
|
474
|
+
# Optional.
|
475
|
+
# @param [Boolean] safe_search Whether to perform the safe search
|
476
|
+
# feature. Optional.
|
477
|
+
# @param [Boolean] properties Whether to perform the image properties
|
478
|
+
# feature (currently, the image's dominant colors.) Optional.
|
479
|
+
# @param [Boolean, Integer] crop_hints Whether to perform the crop hints
|
480
|
+
# feature. Optional.
|
481
|
+
# @param [Boolean, Integer] web Whether to perform the web annotation
|
482
|
+
# feature. Optional.
|
483
|
+
#
|
484
|
+
# @return [Annotation] The results for all image detections, returned as
|
485
|
+
# a single {Annotation} instance.
|
486
|
+
#
|
487
|
+
# @example
|
488
|
+
# require "google/cloud/vision"
|
489
|
+
#
|
490
|
+
# vision = Google::Cloud::Vision.new
|
491
|
+
#
|
492
|
+
# image = vision.image "path/to/landmark.jpg"
|
493
|
+
#
|
494
|
+
# annotation = image.annotate labels: true, landmarks: true
|
495
|
+
#
|
496
|
+
# annotation.labels.map &:description
|
497
|
+
# # ["stone carving", "ancient history", "statue", "sculpture",
|
498
|
+
# # "monument", "landmark"]
|
499
|
+
# annotation.landmarks.count #=> 1
|
500
|
+
#
|
501
|
+
# @example Maximum result values can also be provided:
|
502
|
+
# require "google/cloud/vision"
|
503
|
+
#
|
504
|
+
# vision = Google::Cloud::Vision.new
|
505
|
+
#
|
506
|
+
# image = vision.image "path/to/landmark.jpg"
|
507
|
+
#
|
508
|
+
# annotation = image.annotate labels: 3, landmarks: 3
|
509
|
+
#
|
510
|
+
# annotation.labels.map &:description
|
511
|
+
# # ["stone carving", "ancient history", "statue"]
|
512
|
+
# annotation.landmarks.count #=> 1
|
513
|
+
#
|
514
|
+
def annotate faces: false, landmarks: false, logos: false,
|
515
|
+
labels: false, text: false, document: false,
|
516
|
+
safe_search: false, properties: false, crop_hints: false,
|
517
|
+
web: false
|
518
|
+
@vision.annotate(self, faces: faces, landmarks: landmarks,
|
519
|
+
logos: logos, labels: labels, text: text,
|
520
|
+
document: document, safe_search: safe_search,
|
521
|
+
properties: properties, crop_hints: crop_hints,
|
522
|
+
web: web)
|
523
|
+
end
|
524
|
+
alias_method :mark, :annotate
|
525
|
+
alias_method :detect, :annotate
|
526
|
+
|
437
527
|
# @private
|
438
528
|
def to_s
|
439
529
|
@to_s ||= begin
|
@@ -140,9 +140,9 @@ module Google
|
|
140
140
|
# [features](https://cloud.google.com/vision/reference/rest/v1/images/annotate#Feature)
|
141
141
|
# on the given image(s). If no options for features are provided,
|
142
142
|
# **all** image detection features will be performed, with a default of
|
143
|
-
# `100` results for faces, landmarks, logos,
|
144
|
-
# option is provided, only the specified feature
|
145
|
-
# performed. Please review
|
143
|
+
# `100` results for faces, landmarks, logos, labels, crop_hints, and
|
144
|
+
# web. If any feature option is provided, only the specified feature
|
145
|
+
# detections will be performed. Please review
|
146
146
|
# [Pricing](https://cloud.google.com/vision/docs/pricing) before use, as
|
147
147
|
# a separate charge is incurred for each feature performed on an image.
|
148
148
|
#
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-vision
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.25.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Moore
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-07-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-cloud-core
|
@@ -211,7 +211,7 @@ files:
|
|
211
211
|
- lib/google/cloud/vision/v1/text_annotation_pb.rb
|
212
212
|
- lib/google/cloud/vision/v1/web_detection_pb.rb
|
213
213
|
- lib/google/cloud/vision/version.rb
|
214
|
-
homepage:
|
214
|
+
homepage: https://github.com/GoogleCloudPlatform/google-cloud-ruby/tree/master/google-cloud-vision
|
215
215
|
licenses:
|
216
216
|
- Apache-2.0
|
217
217
|
metadata: {}
|
@@ -231,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
231
231
|
version: '0'
|
232
232
|
requirements: []
|
233
233
|
rubyforge_project:
|
234
|
-
rubygems_version: 2.6.
|
234
|
+
rubygems_version: 2.6.12
|
235
235
|
signing_key:
|
236
236
|
specification_version: 4
|
237
237
|
summary: API Client library for Google Cloud Vision API
|