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

The type of Google Cloud Vision API detection to perform, and the maximum number of results to return for that type. Multiple +Feature+ objects can be specified in the +features+ list.

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Instance Attribute Details

#max_resultsInteger

Returns Maximum number of results of this type. Does not apply to +TEXT_DETECTION+, +DOCUMENT_TEXT_DETECTION+, or +CROP_HINTS+.

Returns:

  • (Integer)

    Maximum number of results of this type. Does not apply to +TEXT_DETECTION+, +DOCUMENT_TEXT_DETECTION+, or +CROP_HINTS+.



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
78
79
80
81
82
83
84
85
86
# File 'lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/image_annotator.rb', line 45

class Feature
  # Type of Google Cloud Vision API feature to be extracted.
  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 text detection / optical character recognition (OCR). Text detection
    # is optimized for areas of text within a larger image; if the image is
    # a document, use +DOCUMENT_TEXT_DETECTION+ instead.
    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 Safe Search to detect potentially unsafe
    # or undesirable content.
    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

#modelString

Returns Model to use for the feature. Supported values: "builtin/stable" (the default if unset) and "builtin/latest".

Returns:

  • (String)

    Model to use for the feature. Supported values: "builtin/stable" (the default if unset) and "builtin/latest".



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
78
79
80
81
82
83
84
85
86
# File 'lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/image_annotator.rb', line 45

class Feature
  # Type of Google Cloud Vision API feature to be extracted.
  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 text detection / optical character recognition (OCR). Text detection
    # is optimized for areas of text within a larger image; if the image is
    # a document, use +DOCUMENT_TEXT_DETECTION+ instead.
    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 Safe Search to detect potentially unsafe
    # or undesirable content.
    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:



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
78
79
80
81
82
83
84
85
86
# File 'lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/image_annotator.rb', line 45

class Feature
  # Type of Google Cloud Vision API feature to be extracted.
  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 text detection / optical character recognition (OCR). Text detection
    # is optimized for areas of text within a larger image; if the image is
    # a document, use +DOCUMENT_TEXT_DETECTION+ instead.
    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 Safe Search to detect potentially unsafe
    # or undesirable content.
    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