google_api_vision v0.4.0 API Reference
Modules
API calls for all endpoints tagged Files
.
API calls for all endpoints tagged Images
.
API calls for all endpoints tagged Locations
.
API calls for all endpoints tagged Operations
.
API calls for all endpoints tagged Projects
.
Handle Tesla connections for GoogleApi.Vision.V1.
Helper functions for deserializing responses into models.
Request message for the `AddProductToProductSet` method.
Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.
Request for performing Google Cloud Vision API tasks over a user-provided image, with user-requested features, and with context information.
Response to an image annotation request.
An offline file annotation request.
The response for a single offline file annotation request.
Multiple async file annotation requests are batched into a single service call.
Response to an async batch file annotation request.
Multiple image annotation requests are batched into a single service call.
Response to a batch image annotation request.
Metadata for the batch operations such as the current state. This is included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.
Logical element on the page.
A bounding polygon for the detected image annotation.
The request message for Operations.CancelOperation.
Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness; for example, the fields of this representation can be trivially provided to the constructor of "java.awt.Color" in Java; it can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" method in iOS; and, with just a little work, it can be easily formatted into a CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color space. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor fromProto(Color protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color toProto(UIColor color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgbcolor) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac 255); var green = Math.floor(greenFrac 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgbcolor.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...
Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.
Single crop hint that is used to generate a new crop when serving an image.
Set of crop hints that are used to generate new crops when serving images.
Parameters for crop hints annotation request.
Detected start or end of a structural component.
Detected language for a structural component.
Set of dominant colors and their corresponding scores.
A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
Set of detected entity features.
A face annotation object contains the results of face detection.
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.
The Google Cloud Storage location where the output will be written to.
The Google Cloud Storage location where the input will be read from.
Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.
Response to an image annotation request.
The response for a single offline file annotation request.
Response to an async batch file annotation request.
Logical element on the page.
A bounding polygon for the detected image annotation.
Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.
Single crop hint that is used to generate a new crop when serving an image.
Set of crop hints that are used to generate new crops when serving images.
Set of dominant colors and their corresponding scores.
Set of detected entity features.
A face annotation object contains the results of face detection.
A face-specific landmark (for example, a face feature).
The Google Cloud Storage location where the output will be written to.
The Google Cloud Storage location where the input will be read from.
If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.
Stores image properties, such as dominant colors.
The desired input location and metadata.
Set of detected objects with bounding boxes.
Detected entity location information.
A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
Contains metadata for the BatchAnnotateImages operation.
The desired output location and metadata.
Detected page from OCR.
Structural unit of text representing a number of words in certain order.
A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.
A Product contains ReferenceImages.
A product label represented as a key-value pair.
Results for a product search request.
Information about the products similar to a single product in a query image.
Information about a product.
A `Property` consists of a user-supplied name/value pair.
Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).
A single symbol representation.
TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.
Detected start or end of a structural component.
Detected language for a structural component.
Additional information detected on the structural component.
A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
Relevant information for the image from the Internet.
Entity deduced from similar images on the Internet.
Metadata for online images.
Label to provide extra metadata for the web detection.
Metadata for web pages.
A word representation.
Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.
Response to an image annotation request.
The response for a single offline file annotation request.
Response to an async batch file annotation request.
Logical element on the page.
A bounding polygon for the detected image annotation.
Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.
Single crop hint that is used to generate a new crop when serving an image.
Set of crop hints that are used to generate new crops when serving images.
Set of dominant colors and their corresponding scores.
Set of detected entity features.
A face annotation object contains the results of face detection.
A face-specific landmark (for example, a face feature).
The Google Cloud Storage location where the output will be written to.
The Google Cloud Storage location where the input will be read from.
If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.
Stores image properties, such as dominant colors.
The desired input location and metadata.
Set of detected objects with bounding boxes.
Detected entity location information.
A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
Contains metadata for the BatchAnnotateImages operation.
The desired output location and metadata.
Detected page from OCR.
Structural unit of text representing a number of words in certain order.
A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.
A Product contains ReferenceImages.
A product label represented as a key-value pair.
Results for a product search request.
Information about the products similar to a single product in a query image.
Information about a product.
A `Property` consists of a user-supplied name/value pair.
Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).
A single symbol representation.
TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.
Detected start or end of a structural component.
Detected language for a structural component.
Additional information detected on the structural component.
A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
Relevant information for the image from the Internet.
Entity deduced from similar images on the Internet.
Metadata for online images.
Label to provide extra metadata for the web detection.
Metadata for web pages.
A word representation.
Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.
Response to an image annotation request.
The response for a single offline file annotation request.
Response to an async batch file annotation request.
Metadata for the batch operations such as the current state. This is included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.
Logical element on the page.
A bounding polygon for the detected image annotation.
Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.
Single crop hint that is used to generate a new crop when serving an image.
Set of crop hints that are used to generate new crops when serving images.
Set of dominant colors and their corresponding scores.
Set of detected entity features.
A face annotation object contains the results of face detection.
A face-specific landmark (for example, a face feature).
The Google Cloud Storage location where the output will be written to.
The Google Cloud Storage location where the input will be read from.
If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.
Stores image properties, such as dominant colors.
Response message for the `ImportProductSets` method. This message is returned by the google.longrunning.Operations.GetOperation method in the returned google.longrunning.Operation.response field.
The desired input location and metadata.
Set of detected objects with bounding boxes.
Detected entity location information.
A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
Contains metadata for the BatchAnnotateImages operation.
The desired output location and metadata.
Detected page from OCR.
Structural unit of text representing a number of words in certain order.
A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.
A Product contains ReferenceImages.
A product label represented as a key-value pair.
Results for a product search request.
Information about the products similar to a single product in a query image.
Information about a product.
A `Property` consists of a user-supplied name/value pair.
A `ReferenceImage` represents a product image and its associated metadata, such as bounding boxes.
Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).
A single symbol representation.
TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.
Detected start or end of a structural component.
Detected language for a structural component.
Additional information detected on the structural component.
A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
Relevant information for the image from the Internet.
Entity deduced from similar images on the Internet.
Metadata for online images.
Label to provide extra metadata for the web detection.
Metadata for web pages.
A word representation.
Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.
Response to an image annotation request.
The response for a single offline file annotation request.
Response to an async batch file annotation request.
Response to an async batch image annotation request.
A list of file annotation responses.
Metadata for the batch operations such as the current state. This is included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.
Logical element on the page.
A bounding polygon for the detected image annotation.
Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.
Single crop hint that is used to generate a new crop when serving an image.
Set of crop hints that are used to generate new crops when serving images.
Set of dominant colors and their corresponding scores.
Set of detected entity features.
A face annotation object contains the results of face detection.
A face-specific landmark (for example, a face feature).
The Google Cloud Storage location where the output will be written to.
The Google Cloud Storage location where the input will be read from.
If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.
Stores image properties, such as dominant colors.
Response message for the `ImportProductSets` method. This message is returned by the google.longrunning.Operations.GetOperation method in the returned google.longrunning.Operation.response field.
The desired input location and metadata.
Set of detected objects with bounding boxes.
Detected entity location information.
A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
Contains metadata for the BatchAnnotateImages operation.
The desired output location and metadata.
Detected page from OCR.
Structural unit of text representing a number of words in certain order.
A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.
A Product contains ReferenceImages.
A product label represented as a key-value pair.
Results for a product search request.
Information about the products similar to a single product in a query image.
Information about a product.
A `Property` consists of a user-supplied name/value pair.
A `ReferenceImage` represents a product image and its associated metadata, such as bounding boxes.
Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).
A single symbol representation.
TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.
Detected start or end of a structural component.
Detected language for a structural component.
Additional information detected on the structural component.
A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
Relevant information for the image from the Internet.
Entity deduced from similar images on the Internet.
Metadata for online images.
Label to provide extra metadata for the web detection.
Metadata for web pages.
A word representation.
Information about the products similar to a single product in a query image.
Client image to perform Google Cloud Vision API tasks over.
If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.
Image context and/or feature-specific parameters.
Stores image properties, such as dominant colors.
External image source (Google Cloud Storage or web URL image location).
The Google Cloud Storage location for a csv file which preserves a list of ImportProductSetRequests in each line.
The input content for the `ImportProductSets` method.
Request message for the `ImportProductSets` method.
Response message for the `ImportProductSets` method. This message is returned by the google.longrunning.Operations.GetOperation method in the returned google.longrunning.Operation.response field.
The desired input location and metadata.
A product label represented as a key-value pair.
A face-specific landmark (for example, a face feature).
An object representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 standard</a>. Values must be within normalized ranges.
Rectangle determined by min and max `LatLng` pairs.
The response message for Operations.ListOperations.
Response message for the `ListProductSets` method.
Response message for the `ListProductsInProductSet` method.
Response message for the `ListProducts` method.
Response message for the `ListReferenceImages` method.
Set of detected objects with bounding boxes.
Detected entity location information.
A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
This resource represents a long-running operation that is the result of a network API call.
Contains metadata for the BatchAnnotateImages operation.
The desired output location and metadata.
Detected page from OCR.
Structural unit of text representing a number of words in certain order.
A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.
A Product contains ReferenceImages.
Parameters for a product search request.
Results for a product search request.
A ProductSet contains Products. A ProductSet can contain a maximum of 1 million reference images. If the limit is exceeded, periodic indexing will fail.
A `Property` consists of a user-supplied name/value pair.
A `ReferenceImage` represents a product image and its associated metadata, such as bounding boxes.
Request message for the `RemoveProductFromProductSet` method.
Information about a product.
Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).
The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` that can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons.
A single symbol representation.
TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.
Additional information detected on the structural component.
A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
Relevant information for the image from the Internet.
Parameters for web detection request.
Entity deduced from similar images on the Internet.
Metadata for online images.
Label to provide extra metadata for the web detection.
Metadata for web pages.
A word representation.
Helper functions for building Tesla requests.