Class: Azure::CognitiveServices::ComputerVision::V2_1::Models::OcrWord

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2.1/generated/azure_cognitiveservices_computervision/models/ocr_word.rb

Overview

Information on a recognized word.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#bounding_boxString

represent the x-coordinate of the left edge, the y-coordinate of the top edge, width, and height of the bounding box, in the coordinate system of the input image, after it has been rotated around its center according to the detected text angle (see textAngle property), with the origin at the top-left corner, and the y-axis pointing down.

Returns:

  • (String)

    Bounding box of a recognized word. The four integers



21
22
23
# File 'lib/2.1/generated/azure_cognitiveservices_computervision/models/ocr_word.rb', line 21

def bounding_box
  @bounding_box
end

#textString

Returns String value of a recognized word.

Returns:

  • (String)

    String value of a recognized word.



24
25
26
# File 'lib/2.1/generated/azure_cognitiveservices_computervision/models/ocr_word.rb', line 24

def text
  @text
end

Class Method Details

.mapperObject

Mapper for OcrWord class as Ruby Hash. This will be used for serialization/deserialization.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/2.1/generated/azure_cognitiveservices_computervision/models/ocr_word.rb', line 31

def self.mapper()
  {
    client_side_validation: true,
    required: false,
    serialized_name: 'OcrWord',
    type: {
      name: 'Composite',
      class_name: 'OcrWord',
      model_properties: {
        bounding_box: {
          client_side_validation: true,
          required: false,
          serialized_name: 'boundingBox',
          type: {
            name: 'String'
          }
        },
        text: {
          client_side_validation: true,
          required: false,
          serialized_name: 'text',
          type: {
            name: 'String'
          }
        }
      }
    }
  }
end