Reference documentation and code samples for the Cloud Vision V1 Client class Feature.
The type of Google Cloud Vision API detection to perform, and the maximum
number of results to return for that type. Multiple Feature objects can
be specified in the features list.
Generated from protobuf message google.cloud.vision.v1.Feature
Namespace
Google \ Cloud \ Vision \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ type
int
The feature type.
↳ max_results
int
Maximum number of results of this type. Does not apply to TEXT_DETECTION, DOCUMENT_TEXT_DETECTION, or CROP_HINTS.
↳ model
string
Model to use for the feature. Supported values: "builtin/stable" (the default if unset) and "builtin/latest". DOCUMENT_TEXT_DETECTION and TEXT_DETECTION also support "builtin/weekly" for the bleeding edge release updated weekly.
getType
The feature type.
Returns
Type
Description
int
setType
The feature type.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getMaxResults
Maximum number of results of this type. Does not apply to
TEXT_DETECTION, DOCUMENT_TEXT_DETECTION, or CROP_HINTS.
Returns
Type
Description
int
setMaxResults
Maximum number of results of this type. Does not apply to
TEXT_DETECTION, DOCUMENT_TEXT_DETECTION, or CROP_HINTS.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getModel
Model to use for the feature.
Supported values: "builtin/stable" (the default if unset) and
"builtin/latest". DOCUMENT_TEXT_DETECTION and TEXT_DETECTION also
support "builtin/weekly" for the bleeding edge release updated weekly.
Returns
Type
Description
string
setModel
Model to use for the feature.
Supported values: "builtin/stable" (the default if unset) and
"builtin/latest". DOCUMENT_TEXT_DETECTION and TEXT_DETECTION also
support "builtin/weekly" for the bleeding edge release updated weekly.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Vision V1 Client - Class Feature (2.0.3)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.3 (latest)](/php/docs/reference/cloud-vision/latest/V1.Feature)\n- [2.0.2](/php/docs/reference/cloud-vision/2.0.2/V1.Feature)\n- [1.10.3](/php/docs/reference/cloud-vision/1.10.3/V1.Feature)\n- [1.9.4](/php/docs/reference/cloud-vision/1.9.4/V1.Feature)\n- [1.8.0](/php/docs/reference/cloud-vision/1.8.0/V1.Feature)\n- [1.7.6](/php/docs/reference/cloud-vision/1.7.6/V1.Feature)\n- [1.6.8](/php/docs/reference/cloud-vision/1.6.8/V1.Feature) \nReference documentation and code samples for the Cloud Vision V1 Client class Feature.\n\nThe type of Google Cloud Vision API detection to perform, and the maximum\nnumber of results to return for that type. Multiple `Feature` objects can\nbe specified in the `features` list.\n\nGenerated from protobuf message `google.cloud.vision.v1.Feature`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Vision \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getType\n\nThe feature type.\n\n### setType\n\nThe feature type.\n\n### getMaxResults\n\nMaximum number of results of this type. Does not apply to\n`TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.\n\n### setMaxResults\n\nMaximum number of results of this type. Does not apply to\n`TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.\n\n### getModel\n\nModel to use for the feature.\n\nSupported values: \"builtin/stable\" (the default if unset) and\n\"builtin/latest\". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also\nsupport \"builtin/weekly\" for the bleeding edge release updated weekly.\n\n### setModel\n\nModel to use for the feature.\n\nSupported values: \"builtin/stable\" (the default if unset) and\n\"builtin/latest\". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also\nsupport \"builtin/weekly\" for the bleeding edge release updated weekly."]]