Class: Azure::CognitiveServices::ComputerVision::V2_1::Models::OcrLine

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

Overview

An object describing a single recognized line of text.

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 line. The four integers



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

def bounding_box
  @bounding_box
end

#wordsArray<OcrWord>

represents a recognized word.

Returns:

  • (Array<OcrWord>)

    An array of objects, where each object



25
26
27
# File 'lib/2.1/generated/azure_cognitiveservices_computervision/models/ocr_line.rb', line 25

def words
  @words
end

Class Method Details

.mapperObject

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



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
60
61
62
63
64
65
66
67
68
69
# File 'lib/2.1/generated/azure_cognitiveservices_computervision/models/ocr_line.rb', line 32

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