Reference documentation and code samples for the Google Cloud Document Ai V1 Client class Matrix.
Representation for transformation matrix, intended to be compatible and used with OpenCV format for image manipulation.
Generated from protobuf message google.cloud.documentai.v1.Document.Page.Matrix
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ rows |
int
Number of rows in the matrix. |
↳ cols |
int
Number of columns in the matrix. |
↳ type |
int
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__core__hal__interface.html |
↳ data |
string
The matrix data. |
getRows
Number of rows in the matrix.
Returns | |
---|---|
Type | Description |
int |
setRows
Number of rows in the matrix.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getCols
Number of columns in the matrix.
Returns | |
---|---|
Type | Description |
int |
setCols
Number of columns in the matrix.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getType
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__core__hal__interface.html
Returns | |
---|---|
Type | Description |
int |
setType
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__core__hal__interface.html
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getData
The matrix data.
Returns | |
---|---|
Type | Description |
string |
setData
The matrix data.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |