Reference documentation and code samples for the Cloud Vision V1 Client class CropHint.
Single crop hint that is used to generate a new crop when serving an image.
Generated from protobuf message google.cloud.vision.v1.CropHint
Namespace
Google \ Cloud \ Vision \ V1Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ bounding_poly |
Google\Cloud\Vision\V1\BoundingPoly
The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale. |
↳ confidence |
float
Confidence of this being a salient region. Range [0, 1]. |
↳ importance_fraction |
float
Fraction of importance of this salient region with respect to the original image. |
getBoundingPoly
The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale.
Returns | |
---|---|
Type | Description |
Google\Cloud\Vision\V1\BoundingPoly|null |
hasBoundingPoly
clearBoundingPoly
setBoundingPoly
The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Vision\V1\BoundingPoly
|
Returns | |
---|---|
Type | Description |
$this |
getConfidence
Confidence of this being a salient region. Range [0, 1].
Returns | |
---|---|
Type | Description |
float |
setConfidence
Confidence of this being a salient region. Range [0, 1].
Parameter | |
---|---|
Name | Description |
var |
float
|
Returns | |
---|---|
Type | Description |
$this |
getImportanceFraction
Fraction of importance of this salient region with respect to the original image.
Returns | |
---|---|
Type | Description |
float |
setImportanceFraction
Fraction of importance of this salient region with respect to the original image.
Parameter | |
---|---|
Name | Description |
var |
float
|
Returns | |
---|---|
Type | Description |
$this |