- JSON representation
- LatLongRect
- CropHintsParams
- ProductSearchParams
- WebDetectionParams
- TextDetectionParams
- QualityOptimizationParams
- CompressionConfig
- EnhancementConfig
- QualityScoreConfig
- DocumentParsingParams
- TableDetectionOptions
- TableBoundHint
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 document text detection. |
qualityOptimizationParams |
Parameters for image quality optimizations. |
documentParsingParams |
Parameters for document parsing. |
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. Optional. 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", "apparel", or "toys" should be specified. |
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. For example, "(color = red OR color = blue) AND brand = Google" is acceptable, but not "(color = red OR brand = Google)" or "color: red". |
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, "wordFilter": string, "symbolFilter": string } |
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. 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. 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. Default when unset: All fields are included except A comma-separated list of fully qualified names of fields. Example: |
wordFilter |
Controls what data is returned at the word level in fullTextAnnotation. 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. Default when unset: All fields are included except A comma-separated list of fully qualified names of fields. Example: |
QualityOptimizationParams
Parameters for image quality optimizations.
JSON representation | |
---|---|
{ "type": enum( |
Fields | |
---|---|
type |
Choose one optimization type. |
compressionConfig |
Specify compression configuration. |
enhancementConfig |
Specify auto enhancement configuration. |
qualityScoreConfig |
Specify quality score configuration. |
CompressionConfig
Configuration for COMPRESSION.
JSON representation | |
---|---|
{ "targetQuality": number } |
Fields | |
---|---|
targetQuality |
In range [0, 1]. Target quality after compression. 1 means lossless compared to input image, 0 means no minimum quality requirement. |
EnhancementConfig
Configuration for ENHANCMENT. If not specify enhancementConfig, default values sharpeningLevel equals to 0.5, autoHdrLevel equals to 0.5 and upscaleRatio equals to 1 will be used. If you want to customize any of the three parameters, you need to specify the whole EnhancementConfig. For example, if you want to use higher autoHdrLevel, which usually will make the image brighter, and keep sharpnening level and upscale ratio the same as default, you can set the config as: enhancementConfig { sharpeningLevel: 0.5 autoHdrLevel: 1.0 upscaleRatio: 1 }
JSON representation | |
---|---|
{ "sharpeningLevel": number, "autoHdrLevel": number, "upscaleRatio": number } |
Fields | |
---|---|
sharpeningLevel |
In range [0,1]. Level of sharpening, 0 means no sharpening, 1 means largest sharpening. Default is 0.5. |
autoHdrLevel |
In range [0,1]. Level of Auto HDR, 0 means no auto HDR, 1 means largest AutoHDR. Default is 0.5. |
upscaleRatio |
In range [1, 2]. Whether do upscaling, default value will be 1, which means no upscaling. If specified, the output height and width will be equals to original height and width times upscaleRatio. |
QualityScoreConfig
Configuration for QUALITY_SCORE.
JSON representation | |
---|---|
{ "qualityModel": string } |
Fields | |
---|---|
qualityModel |
Specify which model to be used. Default value is empty string, and aesthetic score will be returned. Another supported quality model is "builtin/technical-score", which will return image technical quality. |
DocumentParsingParams
Parameters for DOCUMENT_PARSING feature.
JSON representation | |
---|---|
{
"disableOrientationDetection": boolean,
"tableDetectionOptions": {
object( |
Fields | |
---|---|
disableOrientationDetection |
Disables orientation detection such that rotated text will not be detected. |
tableDetectionOptions |
Controls table detection behavior. Table detection is disabled if this field is not set. |
documentType |
Specify a known document type for deeper structure detection. Valid values are currently "invoice" or "general". |
TableDetectionOptions
Options for the table detection.
JSON representation | |
---|---|
{
"tableBoundHints": [
{
object( |
Fields | |
---|---|
tableBoundHints[] |
Optional table bounding box hints that can be provided for complex cases which our algorithm cannot locate the table(s) in. |
TableBoundHint
A hint for a table bounding box on the page for table parsing.
JSON representation | |
---|---|
{
"pageNumber": number,
"boundingBox": {
object( |
Fields | |
---|---|
pageNumber |
Optional page number for multi-paged inputs this hint applies to. If not provided, this hint will apply to all pages by default. This value is 1-indexed. |
boundingBox |
Bounding box hint for a table on this page. The coordinates must be normalized to [0,1] and the bounding box must be an axis-aligned rectangle. |