Class: Azure::CognitiveServices::ComputerVision::V2_0::Models::OcrRegion

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

Overview

A region consists of multiple lines (e.g. a column of text in a multi-column document).

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



22
23
24
# File 'lib/2.0/generated/azure_cognitiveservices_computervision/models/ocr_region.rb', line 22

def bounding_box
  @bounding_box
end

#linesArray<OcrLine>

Returns An array of recognized lines of text.

Returns:

  • (Array<OcrLine>)

    An array of recognized lines of text.



25
26
27
# File 'lib/2.0/generated/azure_cognitiveservices_computervision/models/ocr_region.rb', line 25

def lines
  @lines
end

Class Method Details

.mapperObject

Mapper for OcrRegion 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.0/generated/azure_cognitiveservices_computervision/models/ocr_region.rb', line 32

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