Class: Google::Cloud::Vision::V1::Feature

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/image_annotator.rb

Overview

Users describe the type of Google Cloud Vision API tasks to perform over images by using *Feature*s. Each Feature indicates a type of image detection task to perform. Features encode the Cloud Vision API vertical to operate on and the number of top-scoring results to return.

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Instance Attribute Details

#max_resultsInteger

Returns Maximum number of results of this type.

Returns:

  • (Integer)

    Maximum number of results of this type.



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/image_annotator.rb', line 40

class Feature
  # Type of image feature.
  module Type
    # Unspecified feature type.
    TYPE_UNSPECIFIED = 0

    # Run face detection.
    FACE_DETECTION = 1

    # Run landmark detection.
    LANDMARK_DETECTION = 2

    # Run logo detection.
    LOGO_DETECTION = 3

    # Run label detection.
    LABEL_DETECTION = 4

    # Run OCR.
    TEXT_DETECTION = 5

    # Run dense text document OCR. Takes precedence when both
    # DOCUMENT_TEXT_DETECTION and TEXT_DETECTION are present.
    DOCUMENT_TEXT_DETECTION = 11

    # Run computer vision models to compute image safe-search properties.
    SAFE_SEARCH_DETECTION = 6

    # Compute a set of image properties, such as the image's dominant colors.
    IMAGE_PROPERTIES = 7

    # Run crop hints.
    CROP_HINTS = 9

    # Run web detection.
    WEB_DETECTION = 10
  end
end

#typeGoogle::Cloud::Vision::V1::Feature::Type

Returns The feature type.

Returns:



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/image_annotator.rb', line 40

class Feature
  # Type of image feature.
  module Type
    # Unspecified feature type.
    TYPE_UNSPECIFIED = 0

    # Run face detection.
    FACE_DETECTION = 1

    # Run landmark detection.
    LANDMARK_DETECTION = 2

    # Run logo detection.
    LOGO_DETECTION = 3

    # Run label detection.
    LABEL_DETECTION = 4

    # Run OCR.
    TEXT_DETECTION = 5

    # Run dense text document OCR. Takes precedence when both
    # DOCUMENT_TEXT_DETECTION and TEXT_DETECTION are present.
    DOCUMENT_TEXT_DETECTION = 11

    # Run computer vision models to compute image safe-search properties.
    SAFE_SEARCH_DETECTION = 6

    # Compute a set of image properties, such as the image's dominant colors.
    IMAGE_PROPERTIES = 7

    # Run crop hints.
    CROP_HINTS = 9

    # Run web detection.
    WEB_DETECTION = 10
  end
end