Class: Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentPageMatrix

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/documentai_v1/classes.rb,
lib/google/apis/documentai_v1/representations.rb,
lib/google/apis/documentai_v1/representations.rb
more...

Overview

Representation for transformation matrix, intended to be compatible and used with OpenCV format for image manipulation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDocumentaiV1DocumentPageMatrix

Returns a new instance of GoogleCloudDocumentaiV1DocumentPageMatrix.

[View source]

2784
2785
2786
# File 'lib/google/apis/documentai_v1/classes.rb', line 2784

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#colsFixnum

Number of columns in the matrix. Corresponds to the JSON property cols

Returns:

  • (Fixnum)

2763
2764
2765
# File 'lib/google/apis/documentai_v1/classes.rb', line 2763

def cols
  @cols
end

#dataString

The matrix data. Corresponds to the JSON property data NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)

2769
2770
2771
# File 'lib/google/apis/documentai_v1/classes.rb', line 2769

def data
  @data
end

#rowsFixnum

Number of rows in the matrix. Corresponds to the JSON property rows

Returns:

  • (Fixnum)

2774
2775
2776
# File 'lib/google/apis/documentai_v1/classes.rb', line 2774

def rows
  @rows
end

#typeFixnum

This encodes information about what data type the matrix uses. For example, 0 ( CV_8U) is an unsigned 8-bit image. For the full list of OpenCV primitive data types, please refer to https://docs.opencv.org/4.3.0/d1/d1b/ group_corehal_interface.html Corresponds to the JSON property type

Returns:

  • (Fixnum)

2782
2783
2784
# File 'lib/google/apis/documentai_v1/classes.rb', line 2782

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object

[View source]

2789
2790
2791
2792
2793
2794
# File 'lib/google/apis/documentai_v1/classes.rb', line 2789

def update!(**args)
  @cols = args[:cols] if args.key?(:cols)
  @data = args[:data] if args.key?(:data)
  @rows = args[:rows] if args.key?(:rows)
  @type = args[:type] if args.key?(:type)
end