- JSON representation
- LatLongRect
- CropHintsParams
- ProductSearchParams
- WebDetectionParams
- TextDetectionParams
Image context and/or feature-specific parameters.
JSON representation | |
---|---|
{ "latLongRect": { object ( |
Fields | |
---|---|
latLongRect |
Not used. |
languageHints[] |
List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting |
cropHintsParams |
Parameters for crop hints annotation request. |
productSearchParams |
Parameters for product search. |
webDetectionParams |
Parameters for web detection. |
textDetectionParams |
Parameters for text detection and document text detection. |
LatLongRect
Rectangle determined by min and max LatLng
pairs.
JSON representation | |
---|---|
{ "minLatLng": { object ( |
Fields | |
---|---|
minLatLng |
Min lat/long pair. |
maxLatLng |
Max lat/long pair. |
CropHintsParams
Parameters for crop hints annotation request.
JSON representation | |
---|---|
{ "aspectRatios": [ number ] } |
Fields | |
---|---|
aspectRatios[] |
Aspect ratios in floats, representing the ratio of the width to the height of the image. For example, if the desired aspect ratio is 4/3, the corresponding float value should be 1.33333. If not specified, the best possible crop is returned. The number of provided aspect ratios is limited to a maximum of 16; any aspect ratios provided after the 16th are ignored. |
ProductSearchParams
Parameters for a product search request.
JSON representation | |
---|---|
{
"boundingPoly": {
object ( |
Fields | |
---|---|
boundingPoly |
The bounding polygon around the area of interest in the image. If it is not specified, system discretion will be applied. |
productSet |
The resource name of a Format is: |
productCategories[] |
The list of product categories to search in. Currently, we only consider the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1", or "general-v1" should be specified. The legacy categories "homegoods", "apparel", and "toys" are still supported but will be deprecated. For new products, please use "homegoods-v2", "apparel-v2", or "toys-v2" for better product search accuracy. It is recommended to migrate existing products to these categories as well. |
filter |
The filtering expression. This can be used to restrict search results based on Product labels. We currently support an AND of OR of key-value expressions, where each expression within an OR must have the same key. An '=' should be used to connect the key and value. For example, "(color = red OR color = blue) AND brand = Google" is acceptable, but "(color = red OR brand = Google)" is not acceptable. "color: red" is not acceptable because it uses a ':' instead of an '='. |
WebDetectionParams
Parameters for web detection request.
JSON representation | |
---|---|
{ "includeGeoResults": boolean } |
Fields | |
---|---|
includeGeoResults |
Whether to include results derived from the geo information in the image. |
TextDetectionParams
Parameters for text detections. This is used to control TEXT_DETECTION and DOCUMENT_TEXT_DETECTION features.
JSON representation | |
---|---|
{ "disableOrientationDetection": boolean, "disableTextAnnotations": boolean, "pageFilter": string, "blockFilter": string, "paragraphFilter": string, "lineFilter": string, "wordFilter": string, "symbolFilter": string, "enableTextDetectionConfidenceScore": boolean } |
Fields | |
---|---|
disableOrientationDetection |
Disables orientation detection such that rotated text will not be detected. This is only supported for DOCUMENT_TEXT_DETECTION. |
disableTextAnnotations |
Disables the old textAnnotations field. Only full_text_annotations will be returned. |
pageFilter |
Controls what data is returned at the page level in fullTextAnnotation. Example: "pageFilter": { "paths": ["confidence", "mergedText"] } The above will return Page objects with only the "confidence" and "mergedText" fields populated. This can save bandwidth and storage for unnecessary data. Default when unset: All fields are included A comma-separated list of fully qualified names of fields. Example: |
blockFilter |
Controls what data is returned at the block level in fullTextAnnotation. Example: "blockFilter": { "paths": ["confidence", "mergedText"] } The above will return Block objects with only the "confidence" and "mergedText" fields populated. This can save bandwidth and storage for unnecessary data. Default when unset: All fields are included except A comma-separated list of fully qualified names of fields. Example: |
paragraphFilter |
Controls what data is returned at the paragraph level in fullTextAnnotation. Example: "paragraphFilter": { "paths": ["confidence", "mergedText"] } The above will return Paragraph objects with only the "confidence" and "mergedText" fields populated. This can save bandwidth and storage for unnecessary data. Default when unset: All fields are included except A comma-separated list of fully qualified names of fields. Example: |
lineFilter |
Controls what data is returned at the line level in fullTextAnnotation. If this field is specified, the Example: "lineFilter": { "paths": ["boundingBox", "words"] } The above will return Line objects with only the "boundingBox" and "words" fields populated. This can save bandwidth and storage for unnecessary data. Default when unset: No lines are returned in paragraphs. A comma-separated list of fully qualified names of fields. Example: |
wordFilter |
Controls what data is returned at the word level in fullTextAnnotation. Example: "wordFilter": { "paths": ["confidence", "mergedText"] } The above will return Word objects with only the "confidence" and "mergedText" fields populated. This can save bandwidth and storage for unnecessary data. Default when unset: All fields are included except A comma-separated list of fully qualified names of fields. Example: |
symbolFilter |
Controls what data is returned at the symbol level in fullTextAnnotation. Example: "symbolFilter": { "paths": ["confidence", "text"] } The above will return Symbol objects with only the "confidence" and "text" fields populated. This can save bandwidth and storage for unnecessary data. Default when unset: All fields are included except A comma-separated list of fully qualified names of fields. Example: |
enableTextDetectionConfidenceScore |
By default, Cloud Vision API only includes confidence score for DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence score for TEXT_DETECTION as well. |