vision

package
v0.0.0-...-2824937 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2020 License: MIT, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package vision is a generated protocol buffer package.

It is generated from these files:

google/cloud/vision/v1/geometry.proto
google/cloud/vision/v1/image_annotator.proto
google/cloud/vision/v1/text_annotation.proto
google/cloud/vision/v1/web_detection.proto

It has these top-level messages:

Vertex
BoundingPoly
Position
Feature
ImageSource
Image
FaceAnnotation
LocationInfo
Property
EntityAnnotation
SafeSearchAnnotation
LatLongRect
ColorInfo
DominantColorsAnnotation
ImageProperties
CropHint
CropHintsAnnotation
CropHintsParams
WebDetectionParams
ImageContext
AnnotateImageRequest
AnnotateImageResponse
BatchAnnotateImagesRequest
BatchAnnotateImagesResponse
TextAnnotation
Page
Block
Paragraph
Word
Symbol
WebDetection

Index

Constants

This section is empty.

Variables

View Source
var Block_BlockType_name = map[int32]string{
	0: "UNKNOWN",
	1: "TEXT",
	2: "TABLE",
	3: "PICTURE",
	4: "RULER",
	5: "BARCODE",
}
View Source
var Block_BlockType_value = map[string]int32{
	"UNKNOWN": 0,
	"TEXT":    1,
	"TABLE":   2,
	"PICTURE": 3,
	"RULER":   4,
	"BARCODE": 5,
}
View Source
var FaceAnnotation_Landmark_Type_name = map[int32]string{
	0:  "UNKNOWN_LANDMARK",
	1:  "LEFT_EYE",
	2:  "RIGHT_EYE",
	3:  "LEFT_OF_LEFT_EYEBROW",
	4:  "RIGHT_OF_LEFT_EYEBROW",
	5:  "LEFT_OF_RIGHT_EYEBROW",
	6:  "RIGHT_OF_RIGHT_EYEBROW",
	7:  "MIDPOINT_BETWEEN_EYES",
	8:  "NOSE_TIP",
	9:  "UPPER_LIP",
	10: "LOWER_LIP",
	11: "MOUTH_LEFT",
	12: "MOUTH_RIGHT",
	13: "MOUTH_CENTER",
	14: "NOSE_BOTTOM_RIGHT",
	15: "NOSE_BOTTOM_LEFT",
	16: "NOSE_BOTTOM_CENTER",
	17: "LEFT_EYE_TOP_BOUNDARY",
	18: "LEFT_EYE_RIGHT_CORNER",
	19: "LEFT_EYE_BOTTOM_BOUNDARY",
	20: "LEFT_EYE_LEFT_CORNER",
	21: "RIGHT_EYE_TOP_BOUNDARY",
	22: "RIGHT_EYE_RIGHT_CORNER",
	23: "RIGHT_EYE_BOTTOM_BOUNDARY",
	24: "RIGHT_EYE_LEFT_CORNER",
	25: "LEFT_EYEBROW_UPPER_MIDPOINT",
	26: "RIGHT_EYEBROW_UPPER_MIDPOINT",
	27: "LEFT_EAR_TRAGION",
	28: "RIGHT_EAR_TRAGION",
	29: "LEFT_EYE_PUPIL",
	30: "RIGHT_EYE_PUPIL",
	31: "FOREHEAD_GLABELLA",
	32: "CHIN_GNATHION",
	33: "CHIN_LEFT_GONION",
	34: "CHIN_RIGHT_GONION",
}
View Source
var FaceAnnotation_Landmark_Type_value = map[string]int32{
	"UNKNOWN_LANDMARK":             0,
	"LEFT_EYE":                     1,
	"RIGHT_EYE":                    2,
	"LEFT_OF_LEFT_EYEBROW":         3,
	"RIGHT_OF_LEFT_EYEBROW":        4,
	"LEFT_OF_RIGHT_EYEBROW":        5,
	"RIGHT_OF_RIGHT_EYEBROW":       6,
	"MIDPOINT_BETWEEN_EYES":        7,
	"NOSE_TIP":                     8,
	"UPPER_LIP":                    9,
	"LOWER_LIP":                    10,
	"MOUTH_LEFT":                   11,
	"MOUTH_RIGHT":                  12,
	"MOUTH_CENTER":                 13,
	"NOSE_BOTTOM_RIGHT":            14,
	"NOSE_BOTTOM_LEFT":             15,
	"NOSE_BOTTOM_CENTER":           16,
	"LEFT_EYE_TOP_BOUNDARY":        17,
	"LEFT_EYE_RIGHT_CORNER":        18,
	"LEFT_EYE_BOTTOM_BOUNDARY":     19,
	"LEFT_EYE_LEFT_CORNER":         20,
	"RIGHT_EYE_TOP_BOUNDARY":       21,
	"RIGHT_EYE_RIGHT_CORNER":       22,
	"RIGHT_EYE_BOTTOM_BOUNDARY":    23,
	"RIGHT_EYE_LEFT_CORNER":        24,
	"LEFT_EYEBROW_UPPER_MIDPOINT":  25,
	"RIGHT_EYEBROW_UPPER_MIDPOINT": 26,
	"LEFT_EAR_TRAGION":             27,
	"RIGHT_EAR_TRAGION":            28,
	"LEFT_EYE_PUPIL":               29,
	"RIGHT_EYE_PUPIL":              30,
	"FOREHEAD_GLABELLA":            31,
	"CHIN_GNATHION":                32,
	"CHIN_LEFT_GONION":             33,
	"CHIN_RIGHT_GONION":            34,
}
View Source
var Feature_Type_name = map[int32]string{
	0:  "TYPE_UNSPECIFIED",
	1:  "FACE_DETECTION",
	2:  "LANDMARK_DETECTION",
	3:  "LOGO_DETECTION",
	4:  "LABEL_DETECTION",
	5:  "TEXT_DETECTION",
	11: "DOCUMENT_TEXT_DETECTION",
	6:  "SAFE_SEARCH_DETECTION",
	7:  "IMAGE_PROPERTIES",
	9:  "CROP_HINTS",
	10: "WEB_DETECTION",
}
View Source
var Feature_Type_value = map[string]int32{
	"TYPE_UNSPECIFIED":        0,
	"FACE_DETECTION":          1,
	"LANDMARK_DETECTION":      2,
	"LOGO_DETECTION":          3,
	"LABEL_DETECTION":         4,
	"TEXT_DETECTION":          5,
	"DOCUMENT_TEXT_DETECTION": 11,
	"SAFE_SEARCH_DETECTION":   6,
	"IMAGE_PROPERTIES":        7,
	"CROP_HINTS":              9,
	"WEB_DETECTION":           10,
}
View Source
var Likelihood_name = map[int32]string{
	0: "UNKNOWN",
	1: "VERY_UNLIKELY",
	2: "UNLIKELY",
	3: "POSSIBLE",
	4: "LIKELY",
	5: "VERY_LIKELY",
}
View Source
var Likelihood_value = map[string]int32{
	"UNKNOWN":       0,
	"VERY_UNLIKELY": 1,
	"UNLIKELY":      2,
	"POSSIBLE":      3,
	"LIKELY":        4,
	"VERY_LIKELY":   5,
}
View Source
var TextAnnotation_DetectedBreak_BreakType_name = map[int32]string{
	0: "UNKNOWN",
	1: "SPACE",
	2: "SURE_SPACE",
	3: "EOL_SURE_SPACE",
	4: "HYPHEN",
	5: "LINE_BREAK",
}
View Source
var TextAnnotation_DetectedBreak_BreakType_value = map[string]int32{
	"UNKNOWN":        0,
	"SPACE":          1,
	"SURE_SPACE":     2,
	"EOL_SURE_SPACE": 3,
	"HYPHEN":         4,
	"LINE_BREAK":     5,
}

Functions

func RegisterImageAnnotatorServer

func RegisterImageAnnotatorServer(s *grpc.Server, srv ImageAnnotatorServer)

Types

type AnnotateImageRequest

type AnnotateImageRequest struct {
	// The image to be processed.
	Image *Image `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"`
	// Requested features.
	Features []*Feature `protobuf:"bytes,2,rep,name=features" json:"features,omitempty"`
	// Additional context that may accompany the image.
	ImageContext *ImageContext `protobuf:"bytes,3,opt,name=image_context,json=imageContext" json:"image_context,omitempty"`
}

Request for performing Google Cloud Vision API tasks over a user-provided image, with user-requested features.

func (*AnnotateImageRequest) Descriptor

func (*AnnotateImageRequest) Descriptor() ([]byte, []int)

func (*AnnotateImageRequest) GetFeatures

func (m *AnnotateImageRequest) GetFeatures() []*Feature

func (*AnnotateImageRequest) GetImage

func (m *AnnotateImageRequest) GetImage() *Image

func (*AnnotateImageRequest) GetImageContext

func (m *AnnotateImageRequest) GetImageContext() *ImageContext

func (*AnnotateImageRequest) ProtoMessage

func (*AnnotateImageRequest) ProtoMessage()

func (*AnnotateImageRequest) Reset

func (m *AnnotateImageRequest) Reset()

func (*AnnotateImageRequest) String

func (m *AnnotateImageRequest) String() string

type AnnotateImageResponse

type AnnotateImageResponse struct {
	// If present, face detection has completed successfully.
	FaceAnnotations []*FaceAnnotation `protobuf:"bytes,1,rep,name=face_annotations,json=faceAnnotations" json:"face_annotations,omitempty"`
	// If present, landmark detection has completed successfully.
	LandmarkAnnotations []*EntityAnnotation `protobuf:"bytes,2,rep,name=landmark_annotations,json=landmarkAnnotations" json:"landmark_annotations,omitempty"`
	// If present, logo detection has completed successfully.
	LogoAnnotations []*EntityAnnotation `protobuf:"bytes,3,rep,name=logo_annotations,json=logoAnnotations" json:"logo_annotations,omitempty"`
	// If present, label detection has completed successfully.
	LabelAnnotations []*EntityAnnotation `protobuf:"bytes,4,rep,name=label_annotations,json=labelAnnotations" json:"label_annotations,omitempty"`
	// If present, text (OCR) detection has completed successfully.
	TextAnnotations []*EntityAnnotation `protobuf:"bytes,5,rep,name=text_annotations,json=textAnnotations" json:"text_annotations,omitempty"`
	// If present, text (OCR) detection or document (OCR) text detection has
	// completed successfully.
	// This annotation provides the structural hierarchy for the OCR detected
	// text.
	FullTextAnnotation *TextAnnotation `protobuf:"bytes,12,opt,name=full_text_annotation,json=fullTextAnnotation" json:"full_text_annotation,omitempty"`
	// If present, safe-search annotation has completed successfully.
	SafeSearchAnnotation *SafeSearchAnnotation `protobuf:"bytes,6,opt,name=safe_search_annotation,json=safeSearchAnnotation" json:"safe_search_annotation,omitempty"`
	// If present, image properties were extracted successfully.
	ImagePropertiesAnnotation *ImageProperties `` /* 131-byte string literal not displayed */
	// If present, crop hints have completed successfully.
	CropHintsAnnotation *CropHintsAnnotation `protobuf:"bytes,11,opt,name=crop_hints_annotation,json=cropHintsAnnotation" json:"crop_hints_annotation,omitempty"`
	// If present, web detection has completed successfully.
	WebDetection *WebDetection `protobuf:"bytes,13,opt,name=web_detection,json=webDetection" json:"web_detection,omitempty"`
	// If set, represents the error message for the operation.
	// Note that filled-in image annotations are guaranteed to be
	// correct, even when `error` is set.
	Error *google_rpc.Status `protobuf:"bytes,9,opt,name=error" json:"error,omitempty"`
}

Response to an image annotation request.

func (*AnnotateImageResponse) Descriptor

func (*AnnotateImageResponse) Descriptor() ([]byte, []int)

func (*AnnotateImageResponse) GetCropHintsAnnotation

func (m *AnnotateImageResponse) GetCropHintsAnnotation() *CropHintsAnnotation

func (*AnnotateImageResponse) GetError

func (m *AnnotateImageResponse) GetError() *google_rpc.Status

func (*AnnotateImageResponse) GetFaceAnnotations

func (m *AnnotateImageResponse) GetFaceAnnotations() []*FaceAnnotation

func (*AnnotateImageResponse) GetFullTextAnnotation

func (m *AnnotateImageResponse) GetFullTextAnnotation() *TextAnnotation

func (*AnnotateImageResponse) GetImagePropertiesAnnotation

func (m *AnnotateImageResponse) GetImagePropertiesAnnotation() *ImageProperties

func (*AnnotateImageResponse) GetLabelAnnotations

func (m *AnnotateImageResponse) GetLabelAnnotations() []*EntityAnnotation

func (*AnnotateImageResponse) GetLandmarkAnnotations

func (m *AnnotateImageResponse) GetLandmarkAnnotations() []*EntityAnnotation

func (*AnnotateImageResponse) GetLogoAnnotations

func (m *AnnotateImageResponse) GetLogoAnnotations() []*EntityAnnotation

func (*AnnotateImageResponse) GetSafeSearchAnnotation

func (m *AnnotateImageResponse) GetSafeSearchAnnotation() *SafeSearchAnnotation

func (*AnnotateImageResponse) GetTextAnnotations

func (m *AnnotateImageResponse) GetTextAnnotations() []*EntityAnnotation

func (*AnnotateImageResponse) GetWebDetection

func (m *AnnotateImageResponse) GetWebDetection() *WebDetection

func (*AnnotateImageResponse) ProtoMessage

func (*AnnotateImageResponse) ProtoMessage()

func (*AnnotateImageResponse) Reset

func (m *AnnotateImageResponse) Reset()

func (*AnnotateImageResponse) String

func (m *AnnotateImageResponse) String() string

type BatchAnnotateImagesRequest

type BatchAnnotateImagesRequest struct {
	// Individual image annotation requests for this batch.
	Requests []*AnnotateImageRequest `protobuf:"bytes,1,rep,name=requests" json:"requests,omitempty"`
}

Multiple image annotation requests are batched into a single service call.

func (*BatchAnnotateImagesRequest) Descriptor

func (*BatchAnnotateImagesRequest) Descriptor() ([]byte, []int)

func (*BatchAnnotateImagesRequest) GetRequests

func (*BatchAnnotateImagesRequest) ProtoMessage

func (*BatchAnnotateImagesRequest) ProtoMessage()

func (*BatchAnnotateImagesRequest) Reset

func (m *BatchAnnotateImagesRequest) Reset()

func (*BatchAnnotateImagesRequest) String

func (m *BatchAnnotateImagesRequest) String() string

type BatchAnnotateImagesResponse

type BatchAnnotateImagesResponse struct {
	// Individual responses to image annotation requests within the batch.
	Responses []*AnnotateImageResponse `protobuf:"bytes,1,rep,name=responses" json:"responses,omitempty"`
}

Response to a batch image annotation request.

func (*BatchAnnotateImagesResponse) Descriptor

func (*BatchAnnotateImagesResponse) Descriptor() ([]byte, []int)

func (*BatchAnnotateImagesResponse) GetResponses

func (*BatchAnnotateImagesResponse) ProtoMessage

func (*BatchAnnotateImagesResponse) ProtoMessage()

func (*BatchAnnotateImagesResponse) Reset

func (m *BatchAnnotateImagesResponse) Reset()

func (*BatchAnnotateImagesResponse) String

func (m *BatchAnnotateImagesResponse) String() string

type Block

type Block struct {
	// Additional information detected for the block.
	Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property" json:"property,omitempty"`
	// The bounding box for the block.
	// The vertices are in the order of top-left, top-right, bottom-right,
	// bottom-left. When a rotation of the bounding box is detected the rotation
	// is represented as around the top-left corner as defined when the text is
	// read in the 'natural' orientation.
	// For example:
	//
	// * when the text is horizontal it might look like:
	//
	//         0----1
	//         |    |
	//         3----2
	//
	// * when it's rotated 180 degrees around the top-left corner it becomes:
	//
	//         2----3
	//         |    |
	//         1----0
	//
	//   and the vertice order will still be (0, 1, 2, 3).
	BoundingBox *BoundingPoly `protobuf:"bytes,2,opt,name=bounding_box,json=boundingBox" json:"bounding_box,omitempty"`
	// List of paragraphs in this block (if this blocks is of type text).
	Paragraphs []*Paragraph `protobuf:"bytes,3,rep,name=paragraphs" json:"paragraphs,omitempty"`
	// Detected block type (text, image etc) for this block.
	BlockType Block_BlockType `` /* 126-byte string literal not displayed */
	// Confidence of the OCR results on the block. Range [0, 1].
	Confidence float32 `protobuf:"fixed32,5,opt,name=confidence" json:"confidence,omitempty"`
}

Logical element on the page.

func (*Block) Descriptor

func (*Block) Descriptor() ([]byte, []int)

func (*Block) GetBlockType

func (m *Block) GetBlockType() Block_BlockType

func (*Block) GetBoundingBox

func (m *Block) GetBoundingBox() *BoundingPoly

func (*Block) GetConfidence

func (m *Block) GetConfidence() float32

func (*Block) GetParagraphs

func (m *Block) GetParagraphs() []*Paragraph

func (*Block) GetProperty

func (m *Block) GetProperty() *TextAnnotation_TextProperty

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) Reset

func (m *Block) Reset()

func (*Block) String

func (m *Block) String() string

type Block_BlockType

type Block_BlockType int32

Type of a block (text, image etc) as identified by OCR.

const (
	// Unknown block type.
	Block_UNKNOWN Block_BlockType = 0
	// Regular text block.
	Block_TEXT Block_BlockType = 1
	// Table block.
	Block_TABLE Block_BlockType = 2
	// Image block.
	Block_PICTURE Block_BlockType = 3
	// Horizontal/vertical line box.
	Block_RULER Block_BlockType = 4
	// Barcode block.
	Block_BARCODE Block_BlockType = 5
)

func (Block_BlockType) EnumDescriptor

func (Block_BlockType) EnumDescriptor() ([]byte, []int)

func (Block_BlockType) String

func (x Block_BlockType) String() string

type BoundingPoly

type BoundingPoly struct {
	// The bounding polygon vertices.
	Vertices []*Vertex `protobuf:"bytes,1,rep,name=vertices" json:"vertices,omitempty"`
}

A bounding polygon for the detected image annotation.

func (*BoundingPoly) Descriptor

func (*BoundingPoly) Descriptor() ([]byte, []int)

func (*BoundingPoly) GetVertices

func (m *BoundingPoly) GetVertices() []*Vertex

func (*BoundingPoly) ProtoMessage

func (*BoundingPoly) ProtoMessage()

func (*BoundingPoly) Reset

func (m *BoundingPoly) Reset()

func (*BoundingPoly) String

func (m *BoundingPoly) String() string

type ColorInfo

type ColorInfo struct {
	// RGB components of the color.
	Color *google_type.Color `protobuf:"bytes,1,opt,name=color" json:"color,omitempty"`
	// Image-specific score for this color. Value in range [0, 1].
	Score float32 `protobuf:"fixed32,2,opt,name=score" json:"score,omitempty"`
	// The fraction of pixels the color occupies in the image.
	// Value in range [0, 1].
	PixelFraction float32 `protobuf:"fixed32,3,opt,name=pixel_fraction,json=pixelFraction" json:"pixel_fraction,omitempty"`
}

Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.

func (*ColorInfo) Descriptor

func (*ColorInfo) Descriptor() ([]byte, []int)

func (*ColorInfo) GetColor

func (m *ColorInfo) GetColor() *google_type.Color

func (*ColorInfo) GetPixelFraction

func (m *ColorInfo) GetPixelFraction() float32

func (*ColorInfo) GetScore

func (m *ColorInfo) GetScore() float32

func (*ColorInfo) ProtoMessage

func (*ColorInfo) ProtoMessage()

func (*ColorInfo) Reset

func (m *ColorInfo) Reset()

func (*ColorInfo) String

func (m *ColorInfo) String() string

type CropHint

type CropHint struct {
	// The bounding polygon for the crop region. The coordinates of the bounding
	// box are in the original image's scale, as returned in `ImageParams`.
	BoundingPoly *BoundingPoly `protobuf:"bytes,1,opt,name=bounding_poly,json=boundingPoly" json:"bounding_poly,omitempty"`
	// Confidence of this being a salient region.  Range [0, 1].
	Confidence float32 `protobuf:"fixed32,2,opt,name=confidence" json:"confidence,omitempty"`
	// Fraction of importance of this salient region with respect to the original
	// image.
	ImportanceFraction float32 `protobuf:"fixed32,3,opt,name=importance_fraction,json=importanceFraction" json:"importance_fraction,omitempty"`
}

Single crop hint that is used to generate a new crop when serving an image.

func (*CropHint) Descriptor

func (*CropHint) Descriptor() ([]byte, []int)

func (*CropHint) GetBoundingPoly

func (m *CropHint) GetBoundingPoly() *BoundingPoly

func (*CropHint) GetConfidence

func (m *CropHint) GetConfidence() float32

func (*CropHint) GetImportanceFraction

func (m *CropHint) GetImportanceFraction() float32

func (*CropHint) ProtoMessage

func (*CropHint) ProtoMessage()

func (*CropHint) Reset

func (m *CropHint) Reset()

func (*CropHint) String

func (m *CropHint) String() string

type CropHintsAnnotation

type CropHintsAnnotation struct {
	// Crop hint results.
	CropHints []*CropHint `protobuf:"bytes,1,rep,name=crop_hints,json=cropHints" json:"crop_hints,omitempty"`
}

Set of crop hints that are used to generate new crops when serving images.

func (*CropHintsAnnotation) Descriptor

func (*CropHintsAnnotation) Descriptor() ([]byte, []int)

func (*CropHintsAnnotation) GetCropHints

func (m *CropHintsAnnotation) GetCropHints() []*CropHint

func (*CropHintsAnnotation) ProtoMessage

func (*CropHintsAnnotation) ProtoMessage()

func (*CropHintsAnnotation) Reset

func (m *CropHintsAnnotation) Reset()

func (*CropHintsAnnotation) String

func (m *CropHintsAnnotation) String() string

type CropHintsParams

type CropHintsParams struct {
	// 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.
	AspectRatios []float32 `protobuf:"fixed32,1,rep,packed,name=aspect_ratios,json=aspectRatios" json:"aspect_ratios,omitempty"`
}

Parameters for crop hints annotation request.

func (*CropHintsParams) Descriptor

func (*CropHintsParams) Descriptor() ([]byte, []int)

func (*CropHintsParams) GetAspectRatios

func (m *CropHintsParams) GetAspectRatios() []float32

func (*CropHintsParams) ProtoMessage

func (*CropHintsParams) ProtoMessage()

func (*CropHintsParams) Reset

func (m *CropHintsParams) Reset()

func (*CropHintsParams) String

func (m *CropHintsParams) String() string

type DominantColorsAnnotation

type DominantColorsAnnotation struct {
	// RGB color values with their score and pixel fraction.
	Colors []*ColorInfo `protobuf:"bytes,1,rep,name=colors" json:"colors,omitempty"`
}

Set of dominant colors and their corresponding scores.

func (*DominantColorsAnnotation) Descriptor

func (*DominantColorsAnnotation) Descriptor() ([]byte, []int)

func (*DominantColorsAnnotation) GetColors

func (m *DominantColorsAnnotation) GetColors() []*ColorInfo

func (*DominantColorsAnnotation) ProtoMessage

func (*DominantColorsAnnotation) ProtoMessage()

func (*DominantColorsAnnotation) Reset

func (m *DominantColorsAnnotation) Reset()

func (*DominantColorsAnnotation) String

func (m *DominantColorsAnnotation) String() string

type EntityAnnotation

type EntityAnnotation struct {
	// Opaque entity ID. Some IDs may be available in
	// [Google Knowledge Graph Search
	// API](https://developers.google.com/knowledge-graph/).
	Mid string `protobuf:"bytes,1,opt,name=mid" json:"mid,omitempty"`
	// The language code for the locale in which the entity textual
	// `description` is expressed.
	Locale string `protobuf:"bytes,2,opt,name=locale" json:"locale,omitempty"`
	// Entity textual description, expressed in its `locale` language.
	Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
	// Overall score of the result. Range [0, 1].
	Score float32 `protobuf:"fixed32,4,opt,name=score" json:"score,omitempty"`
	// **Deprecated. Use `score` instead.**
	// The accuracy of the entity detection in an image.
	// For example, for an image in which the "Eiffel Tower" entity is detected,
	// this field represents the confidence that there is a tower in the query
	// image. Range [0, 1].
	Confidence float32 `protobuf:"fixed32,5,opt,name=confidence" json:"confidence,omitempty"`
	// The relevancy of the ICA (Image Content Annotation) label to the
	// image. For example, the relevancy of "tower" is likely higher to an image
	// containing the detected "Eiffel Tower" than to an image containing a
	// detected distant towering building, even though the confidence that
	// there is a tower in each image may be the same. Range [0, 1].
	Topicality float32 `protobuf:"fixed32,6,opt,name=topicality" json:"topicality,omitempty"`
	// Image region to which this entity belongs. Not produced
	// for `LABEL_DETECTION` features.
	BoundingPoly *BoundingPoly `protobuf:"bytes,7,opt,name=bounding_poly,json=boundingPoly" json:"bounding_poly,omitempty"`
	// The location information for the detected entity. Multiple
	// `LocationInfo` elements can be present because one location may
	// indicate the location of the scene in the image, and another location
	// may indicate the location of the place where the image was taken.
	// Location information is usually present for landmarks.
	Locations []*LocationInfo `protobuf:"bytes,8,rep,name=locations" json:"locations,omitempty"`
	// Some entities may have optional user-supplied `Property` (name/value)
	// fields, such a score or string that qualifies the entity.
	Properties []*Property `protobuf:"bytes,9,rep,name=properties" json:"properties,omitempty"`
}

Set of detected entity features.

func (*EntityAnnotation) Descriptor

func (*EntityAnnotation) Descriptor() ([]byte, []int)

func (*EntityAnnotation) GetBoundingPoly

func (m *EntityAnnotation) GetBoundingPoly() *BoundingPoly

func (*EntityAnnotation) GetConfidence

func (m *EntityAnnotation) GetConfidence() float32

func (*EntityAnnotation) GetDescription

func (m *EntityAnnotation) GetDescription() string

func (*EntityAnnotation) GetLocale

func (m *EntityAnnotation) GetLocale() string

func (*EntityAnnotation) GetLocations

func (m *EntityAnnotation) GetLocations() []*LocationInfo

func (*EntityAnnotation) GetMid

func (m *EntityAnnotation) GetMid() string

func (*EntityAnnotation) GetProperties

func (m *EntityAnnotation) GetProperties() []*Property

func (*EntityAnnotation) GetScore

func (m *EntityAnnotation) GetScore() float32

func (*EntityAnnotation) GetTopicality

func (m *EntityAnnotation) GetTopicality() float32

func (*EntityAnnotation) ProtoMessage

func (*EntityAnnotation) ProtoMessage()

func (*EntityAnnotation) Reset

func (m *EntityAnnotation) Reset()

func (*EntityAnnotation) String

func (m *EntityAnnotation) String() string

type FaceAnnotation

type FaceAnnotation struct {
	// The bounding polygon around the face. The coordinates of the bounding box
	// are in the original image's scale, as returned in `ImageParams`.
	// The bounding box is computed to "frame" the face in accordance with human
	// expectations. It is based on the landmarker results.
	// Note that one or more x and/or y coordinates may not be generated in the
	// `BoundingPoly` (the polygon will be unbounded) if only a partial face
	// appears in the image to be annotated.
	BoundingPoly *BoundingPoly `protobuf:"bytes,1,opt,name=bounding_poly,json=boundingPoly" json:"bounding_poly,omitempty"`
	// The `fd_bounding_poly` bounding polygon is tighter than the
	// `boundingPoly`, and encloses only the skin part of the face. Typically, it
	// is used to eliminate the face from any image analysis that detects the
	// "amount of skin" visible in an image. It is not based on the
	// landmarker results, only on the initial face detection, hence
	// the <code>fd</code> (face detection) prefix.
	FdBoundingPoly *BoundingPoly `protobuf:"bytes,2,opt,name=fd_bounding_poly,json=fdBoundingPoly" json:"fd_bounding_poly,omitempty"`
	// Detected face landmarks.
	Landmarks []*FaceAnnotation_Landmark `protobuf:"bytes,3,rep,name=landmarks" json:"landmarks,omitempty"`
	// Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
	// of the face relative to the image vertical about the axis perpendicular to
	// the face. Range [-180,180].
	RollAngle float32 `protobuf:"fixed32,4,opt,name=roll_angle,json=rollAngle" json:"roll_angle,omitempty"`
	// Yaw angle, which indicates the leftward/rightward angle that the face is
	// pointing relative to the vertical plane perpendicular to the image. Range
	// [-180,180].
	PanAngle float32 `protobuf:"fixed32,5,opt,name=pan_angle,json=panAngle" json:"pan_angle,omitempty"`
	// Pitch angle, which indicates the upwards/downwards angle that the face is
	// pointing relative to the image's horizontal plane. Range [-180,180].
	TiltAngle float32 `protobuf:"fixed32,6,opt,name=tilt_angle,json=tiltAngle" json:"tilt_angle,omitempty"`
	// Detection confidence. Range [0, 1].
	DetectionConfidence float32 `protobuf:"fixed32,7,opt,name=detection_confidence,json=detectionConfidence" json:"detection_confidence,omitempty"`
	// Face landmarking confidence. Range [0, 1].
	LandmarkingConfidence float32 `protobuf:"fixed32,8,opt,name=landmarking_confidence,json=landmarkingConfidence" json:"landmarking_confidence,omitempty"`
	// Joy likelihood.
	JoyLikelihood Likelihood `` /* 133-byte string literal not displayed */
	// Sorrow likelihood.
	SorrowLikelihood Likelihood `` /* 143-byte string literal not displayed */
	// Anger likelihood.
	AngerLikelihood Likelihood `` /* 140-byte string literal not displayed */
	// Surprise likelihood.
	SurpriseLikelihood Likelihood `` /* 149-byte string literal not displayed */
	// Under-exposed likelihood.
	UnderExposedLikelihood Likelihood `` /* 163-byte string literal not displayed */
	// Blurred likelihood.
	BlurredLikelihood Likelihood `` /* 146-byte string literal not displayed */
	// Headwear likelihood.
	HeadwearLikelihood Likelihood `` /* 149-byte string literal not displayed */
}

A face annotation object contains the results of face detection.

func (*FaceAnnotation) Descriptor

func (*FaceAnnotation) Descriptor() ([]byte, []int)

func (*FaceAnnotation) GetAngerLikelihood

func (m *FaceAnnotation) GetAngerLikelihood() Likelihood

func (*FaceAnnotation) GetBlurredLikelihood

func (m *FaceAnnotation) GetBlurredLikelihood() Likelihood

func (*FaceAnnotation) GetBoundingPoly

func (m *FaceAnnotation) GetBoundingPoly() *BoundingPoly

func (*FaceAnnotation) GetDetectionConfidence

func (m *FaceAnnotation) GetDetectionConfidence() float32

func (*FaceAnnotation) GetFdBoundingPoly

func (m *FaceAnnotation) GetFdBoundingPoly() *BoundingPoly

func (*FaceAnnotation) GetHeadwearLikelihood

func (m *FaceAnnotation) GetHeadwearLikelihood() Likelihood

func (*FaceAnnotation) GetJoyLikelihood

func (m *FaceAnnotation) GetJoyLikelihood() Likelihood

func (*FaceAnnotation) GetLandmarkingConfidence

func (m *FaceAnnotation) GetLandmarkingConfidence() float32

func (*FaceAnnotation) GetLandmarks

func (m *FaceAnnotation) GetLandmarks() []*FaceAnnotation_Landmark

func (*FaceAnnotation) GetPanAngle

func (m *FaceAnnotation) GetPanAngle() float32

func (*FaceAnnotation) GetRollAngle

func (m *FaceAnnotation) GetRollAngle() float32

func (*FaceAnnotation) GetSorrowLikelihood

func (m *FaceAnnotation) GetSorrowLikelihood() Likelihood

func (*FaceAnnotation) GetSurpriseLikelihood

func (m *FaceAnnotation) GetSurpriseLikelihood() Likelihood

func (*FaceAnnotation) GetTiltAngle

func (m *FaceAnnotation) GetTiltAngle() float32

func (*FaceAnnotation) GetUnderExposedLikelihood

func (m *FaceAnnotation) GetUnderExposedLikelihood() Likelihood

func (*FaceAnnotation) ProtoMessage

func (*FaceAnnotation) ProtoMessage()

func (*FaceAnnotation) Reset

func (m *FaceAnnotation) Reset()

func (*FaceAnnotation) String

func (m *FaceAnnotation) String() string

type FaceAnnotation_Landmark

type FaceAnnotation_Landmark struct {
	// Face landmark type.
	Type FaceAnnotation_Landmark_Type `protobuf:"varint,3,opt,name=type,enum=google.cloud.vision.v1.FaceAnnotation_Landmark_Type" json:"type,omitempty"`
	// Face landmark position.
	Position *Position `protobuf:"bytes,4,opt,name=position" json:"position,omitempty"`
}

A face-specific landmark (for example, a face feature).

func (*FaceAnnotation_Landmark) Descriptor

func (*FaceAnnotation_Landmark) Descriptor() ([]byte, []int)

func (*FaceAnnotation_Landmark) GetPosition

func (m *FaceAnnotation_Landmark) GetPosition() *Position

func (*FaceAnnotation_Landmark) GetType

func (*FaceAnnotation_Landmark) ProtoMessage

func (*FaceAnnotation_Landmark) ProtoMessage()

func (*FaceAnnotation_Landmark) Reset

func (m *FaceAnnotation_Landmark) Reset()

func (*FaceAnnotation_Landmark) String

func (m *FaceAnnotation_Landmark) String() string

type FaceAnnotation_Landmark_Type

type FaceAnnotation_Landmark_Type int32

Face landmark (feature) type. Left and right are defined from the vantage of the viewer of the image without considering mirror projections typical of photos. So, `LEFT_EYE`, typically, is the person's right eye.

const (
	// Unknown face landmark detected. Should not be filled.
	FaceAnnotation_Landmark_UNKNOWN_LANDMARK FaceAnnotation_Landmark_Type = 0
	// Left eye.
	FaceAnnotation_Landmark_LEFT_EYE FaceAnnotation_Landmark_Type = 1
	// Right eye.
	FaceAnnotation_Landmark_RIGHT_EYE FaceAnnotation_Landmark_Type = 2
	// Left of left eyebrow.
	FaceAnnotation_Landmark_LEFT_OF_LEFT_EYEBROW FaceAnnotation_Landmark_Type = 3
	// Right of left eyebrow.
	FaceAnnotation_Landmark_RIGHT_OF_LEFT_EYEBROW FaceAnnotation_Landmark_Type = 4
	// Left of right eyebrow.
	FaceAnnotation_Landmark_LEFT_OF_RIGHT_EYEBROW FaceAnnotation_Landmark_Type = 5
	// Right of right eyebrow.
	FaceAnnotation_Landmark_RIGHT_OF_RIGHT_EYEBROW FaceAnnotation_Landmark_Type = 6
	// Midpoint between eyes.
	FaceAnnotation_Landmark_MIDPOINT_BETWEEN_EYES FaceAnnotation_Landmark_Type = 7
	// Nose tip.
	FaceAnnotation_Landmark_NOSE_TIP FaceAnnotation_Landmark_Type = 8
	// Upper lip.
	FaceAnnotation_Landmark_UPPER_LIP FaceAnnotation_Landmark_Type = 9
	// Lower lip.
	FaceAnnotation_Landmark_LOWER_LIP FaceAnnotation_Landmark_Type = 10
	// Mouth left.
	FaceAnnotation_Landmark_MOUTH_LEFT FaceAnnotation_Landmark_Type = 11
	// Mouth right.
	FaceAnnotation_Landmark_MOUTH_RIGHT FaceAnnotation_Landmark_Type = 12
	// Mouth center.
	FaceAnnotation_Landmark_MOUTH_CENTER FaceAnnotation_Landmark_Type = 13
	// Nose, bottom right.
	FaceAnnotation_Landmark_NOSE_BOTTOM_RIGHT FaceAnnotation_Landmark_Type = 14
	// Nose, bottom left.
	FaceAnnotation_Landmark_NOSE_BOTTOM_LEFT FaceAnnotation_Landmark_Type = 15
	// Nose, bottom center.
	FaceAnnotation_Landmark_NOSE_BOTTOM_CENTER FaceAnnotation_Landmark_Type = 16
	// Left eye, top boundary.
	FaceAnnotation_Landmark_LEFT_EYE_TOP_BOUNDARY FaceAnnotation_Landmark_Type = 17
	// Left eye, right corner.
	FaceAnnotation_Landmark_LEFT_EYE_RIGHT_CORNER FaceAnnotation_Landmark_Type = 18
	// Left eye, bottom boundary.
	FaceAnnotation_Landmark_LEFT_EYE_BOTTOM_BOUNDARY FaceAnnotation_Landmark_Type = 19
	// Left eye, left corner.
	FaceAnnotation_Landmark_LEFT_EYE_LEFT_CORNER FaceAnnotation_Landmark_Type = 20
	// Right eye, top boundary.
	FaceAnnotation_Landmark_RIGHT_EYE_TOP_BOUNDARY FaceAnnotation_Landmark_Type = 21
	// Right eye, right corner.
	FaceAnnotation_Landmark_RIGHT_EYE_RIGHT_CORNER FaceAnnotation_Landmark_Type = 22
	// Right eye, bottom boundary.
	FaceAnnotation_Landmark_RIGHT_EYE_BOTTOM_BOUNDARY FaceAnnotation_Landmark_Type = 23
	// Right eye, left corner.
	FaceAnnotation_Landmark_RIGHT_EYE_LEFT_CORNER FaceAnnotation_Landmark_Type = 24
	// Left eyebrow, upper midpoint.
	FaceAnnotation_Landmark_LEFT_EYEBROW_UPPER_MIDPOINT FaceAnnotation_Landmark_Type = 25
	// Right eyebrow, upper midpoint.
	FaceAnnotation_Landmark_RIGHT_EYEBROW_UPPER_MIDPOINT FaceAnnotation_Landmark_Type = 26
	// Left ear tragion.
	FaceAnnotation_Landmark_LEFT_EAR_TRAGION FaceAnnotation_Landmark_Type = 27
	// Right ear tragion.
	FaceAnnotation_Landmark_RIGHT_EAR_TRAGION FaceAnnotation_Landmark_Type = 28
	// Left eye pupil.
	FaceAnnotation_Landmark_LEFT_EYE_PUPIL FaceAnnotation_Landmark_Type = 29
	// Right eye pupil.
	FaceAnnotation_Landmark_RIGHT_EYE_PUPIL FaceAnnotation_Landmark_Type = 30
	// Forehead glabella.
	FaceAnnotation_Landmark_FOREHEAD_GLABELLA FaceAnnotation_Landmark_Type = 31
	// Chin gnathion.
	FaceAnnotation_Landmark_CHIN_GNATHION FaceAnnotation_Landmark_Type = 32
	// Chin left gonion.
	FaceAnnotation_Landmark_CHIN_LEFT_GONION FaceAnnotation_Landmark_Type = 33
	// Chin right gonion.
	FaceAnnotation_Landmark_CHIN_RIGHT_GONION FaceAnnotation_Landmark_Type = 34
)

func (FaceAnnotation_Landmark_Type) EnumDescriptor

func (FaceAnnotation_Landmark_Type) EnumDescriptor() ([]byte, []int)

func (FaceAnnotation_Landmark_Type) String

type Feature

type Feature struct {
	// The feature type.
	Type Feature_Type `protobuf:"varint,1,opt,name=type,enum=google.cloud.vision.v1.Feature_Type" json:"type,omitempty"`
	// Maximum number of results of this type. Does not apply to
	// `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
	MaxResults int32 `protobuf:"varint,2,opt,name=max_results,json=maxResults" json:"max_results,omitempty"`
	// Model to use for the feature.
	// Supported values: "builtin/stable" (the default if unset) and
	// "builtin/latest".
	Model string `protobuf:"bytes,3,opt,name=model" json:"model,omitempty"`
}

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.

func (*Feature) Descriptor

func (*Feature) Descriptor() ([]byte, []int)

func (*Feature) GetMaxResults

func (m *Feature) GetMaxResults() int32

func (*Feature) GetModel

func (m *Feature) GetModel() string

func (*Feature) GetType

func (m *Feature) GetType() Feature_Type

func (*Feature) ProtoMessage

func (*Feature) ProtoMessage()

func (*Feature) Reset

func (m *Feature) Reset()

func (*Feature) String

func (m *Feature) String() string

type Feature_Type

type Feature_Type int32

Type of Google Cloud Vision API feature to be extracted.

const (
	// Unspecified feature type.
	Feature_TYPE_UNSPECIFIED Feature_Type = 0
	// Run face detection.
	Feature_FACE_DETECTION Feature_Type = 1
	// Run landmark detection.
	Feature_LANDMARK_DETECTION Feature_Type = 2
	// Run logo detection.
	Feature_LOGO_DETECTION Feature_Type = 3
	// Run label detection.
	Feature_LABEL_DETECTION Feature_Type = 4
	// Run text detection / optical character recognition (OCR). Text detection
	// is optimized for areas of text within a larger image; if the image is
	// a document, use `DOCUMENT_TEXT_DETECTION` instead.
	Feature_TEXT_DETECTION Feature_Type = 5
	// Run dense text document OCR. Takes precedence when both
	// `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
	Feature_DOCUMENT_TEXT_DETECTION Feature_Type = 11
	// Run Safe Search to detect potentially unsafe
	// or undesirable content.
	Feature_SAFE_SEARCH_DETECTION Feature_Type = 6
	// Compute a set of image properties, such as the
	// image's dominant colors.
	Feature_IMAGE_PROPERTIES Feature_Type = 7
	// Run crop hints.
	Feature_CROP_HINTS Feature_Type = 9
	// Run web detection.
	Feature_WEB_DETECTION Feature_Type = 10
)

func (Feature_Type) EnumDescriptor

func (Feature_Type) EnumDescriptor() ([]byte, []int)

func (Feature_Type) String

func (x Feature_Type) String() string

type Image

type Image struct {
	// Image content, represented as a stream of bytes.
	// Note: As with all `bytes` fields, protobuffers use a pure binary
	// representation, whereas JSON representations use base64.
	Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	// Google Cloud Storage image location, or publicly-accessible image
	// URL. If both `content` and `source` are provided for an image, `content`
	// takes precedence and is used to perform the image annotation request.
	Source *ImageSource `protobuf:"bytes,2,opt,name=source" json:"source,omitempty"`
}

Client image to perform Google Cloud Vision API tasks over.

func (*Image) Descriptor

func (*Image) Descriptor() ([]byte, []int)

func (*Image) GetContent

func (m *Image) GetContent() []byte

func (*Image) GetSource

func (m *Image) GetSource() *ImageSource

func (*Image) ProtoMessage

func (*Image) ProtoMessage()

func (*Image) Reset

func (m *Image) Reset()

func (*Image) String

func (m *Image) String() string

type ImageAnnotatorClient

type ImageAnnotatorClient interface {
	// Run image detection and annotation for a batch of images.
	BatchAnnotateImages(ctx context.Context, in *BatchAnnotateImagesRequest, opts ...grpc.CallOption) (*BatchAnnotateImagesResponse, error)
}

func NewImageAnnotatorClient

func NewImageAnnotatorClient(cc *grpc.ClientConn) ImageAnnotatorClient

type ImageAnnotatorServer

type ImageAnnotatorServer interface {
	// Run image detection and annotation for a batch of images.
	BatchAnnotateImages(context.Context, *BatchAnnotateImagesRequest) (*BatchAnnotateImagesResponse, error)
}

type ImageContext

type ImageContext struct {
	// lat/long rectangle that specifies the location of the image.
	LatLongRect *LatLongRect `protobuf:"bytes,1,opt,name=lat_long_rect,json=latLongRect" json:"lat_long_rect,omitempty"`
	// 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 `language_hints` is not
	// needed. In rare cases, when the language of the text in the image is known,
	// setting a hint will help get better results (although it will be a
	// significant hindrance if the hint is wrong). Text detection returns an
	// error if one or more of the specified languages is not one of the
	// [supported languages](/vision/docs/languages).
	LanguageHints []string `protobuf:"bytes,2,rep,name=language_hints,json=languageHints" json:"language_hints,omitempty"`
	// Parameters for crop hints annotation request.
	CropHintsParams *CropHintsParams `protobuf:"bytes,4,opt,name=crop_hints_params,json=cropHintsParams" json:"crop_hints_params,omitempty"`
	// Parameters for web detection.
	WebDetectionParams *WebDetectionParams `protobuf:"bytes,6,opt,name=web_detection_params,json=webDetectionParams" json:"web_detection_params,omitempty"`
}

Image context and/or feature-specific parameters.

func (*ImageContext) Descriptor

func (*ImageContext) Descriptor() ([]byte, []int)

func (*ImageContext) GetCropHintsParams

func (m *ImageContext) GetCropHintsParams() *CropHintsParams

func (*ImageContext) GetLanguageHints

func (m *ImageContext) GetLanguageHints() []string

func (*ImageContext) GetLatLongRect

func (m *ImageContext) GetLatLongRect() *LatLongRect

func (*ImageContext) GetWebDetectionParams

func (m *ImageContext) GetWebDetectionParams() *WebDetectionParams

func (*ImageContext) ProtoMessage

func (*ImageContext) ProtoMessage()

func (*ImageContext) Reset

func (m *ImageContext) Reset()

func (*ImageContext) String

func (m *ImageContext) String() string

type ImageProperties

type ImageProperties struct {
	// If present, dominant colors completed successfully.
	DominantColors *DominantColorsAnnotation `protobuf:"bytes,1,opt,name=dominant_colors,json=dominantColors" json:"dominant_colors,omitempty"`
}

Stores image properties, such as dominant colors.

func (*ImageProperties) Descriptor

func (*ImageProperties) Descriptor() ([]byte, []int)

func (*ImageProperties) GetDominantColors

func (m *ImageProperties) GetDominantColors() *DominantColorsAnnotation

func (*ImageProperties) ProtoMessage

func (*ImageProperties) ProtoMessage()

func (*ImageProperties) Reset

func (m *ImageProperties) Reset()

func (*ImageProperties) String

func (m *ImageProperties) String() string

type ImageSource

type ImageSource struct {
	// **Use `image_uri` instead.**
	//
	// The Google Cloud Storage  URI of the form
	// `gs://bucket_name/object_name`. Object versioning is not supported. See
	// [Google Cloud Storage Request
	// URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
	GcsImageUri string `protobuf:"bytes,1,opt,name=gcs_image_uri,json=gcsImageUri" json:"gcs_image_uri,omitempty"`
	// The URI of the source image. Can be either:
	//
	// 1. A Google Cloud Storage URI of the form
	//    `gs://bucket_name/object_name`. Object versioning is not supported. See
	//    [Google Cloud Storage Request
	//    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
	//    info.
	//
	// 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
	//    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
	//    completed. Your request may fail if the specified host denies the
	//    request (e.g. due to request throttling or DOS prevention), or if Google
	//    throttles requests to the site for abuse prevention. You should not
	//    depend on externally-hosted images for production applications.
	//
	// When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
	// precedence.
	ImageUri string `protobuf:"bytes,2,opt,name=image_uri,json=imageUri" json:"image_uri,omitempty"`
}

External image source (Google Cloud Storage or web URL image location).

func (*ImageSource) Descriptor

func (*ImageSource) Descriptor() ([]byte, []int)

func (*ImageSource) GetGcsImageUri

func (m *ImageSource) GetGcsImageUri() string

func (*ImageSource) GetImageUri

func (m *ImageSource) GetImageUri() string

func (*ImageSource) ProtoMessage

func (*ImageSource) ProtoMessage()

func (*ImageSource) Reset

func (m *ImageSource) Reset()

func (*ImageSource) String

func (m *ImageSource) String() string

type LatLongRect

type LatLongRect struct {
	// Min lat/long pair.
	MinLatLng *google_type1.LatLng `protobuf:"bytes,1,opt,name=min_lat_lng,json=minLatLng" json:"min_lat_lng,omitempty"`
	// Max lat/long pair.
	MaxLatLng *google_type1.LatLng `protobuf:"bytes,2,opt,name=max_lat_lng,json=maxLatLng" json:"max_lat_lng,omitempty"`
}

Rectangle determined by min and max `LatLng` pairs.

func (*LatLongRect) Descriptor

func (*LatLongRect) Descriptor() ([]byte, []int)

func (*LatLongRect) GetMaxLatLng

func (m *LatLongRect) GetMaxLatLng() *google_type1.LatLng

func (*LatLongRect) GetMinLatLng

func (m *LatLongRect) GetMinLatLng() *google_type1.LatLng

func (*LatLongRect) ProtoMessage

func (*LatLongRect) ProtoMessage()

func (*LatLongRect) Reset

func (m *LatLongRect) Reset()

func (*LatLongRect) String

func (m *LatLongRect) String() string

type Likelihood

type Likelihood int32

A bucketized representation of likelihood, which is intended to give clients highly stable results across model upgrades.

const (
	// Unknown likelihood.
	Likelihood_UNKNOWN Likelihood = 0
	// It is very unlikely that the image belongs to the specified vertical.
	Likelihood_VERY_UNLIKELY Likelihood = 1
	// It is unlikely that the image belongs to the specified vertical.
	Likelihood_UNLIKELY Likelihood = 2
	// It is possible that the image belongs to the specified vertical.
	Likelihood_POSSIBLE Likelihood = 3
	// It is likely that the image belongs to the specified vertical.
	Likelihood_LIKELY Likelihood = 4
	// It is very likely that the image belongs to the specified vertical.
	Likelihood_VERY_LIKELY Likelihood = 5
)

func (Likelihood) EnumDescriptor

func (Likelihood) EnumDescriptor() ([]byte, []int)

func (Likelihood) String

func (x Likelihood) String() string

type LocationInfo

type LocationInfo struct {
	// lat/long location coordinates.
	LatLng *google_type1.LatLng `protobuf:"bytes,1,opt,name=lat_lng,json=latLng" json:"lat_lng,omitempty"`
}

Detected entity location information.

func (*LocationInfo) Descriptor

func (*LocationInfo) Descriptor() ([]byte, []int)

func (*LocationInfo) GetLatLng

func (m *LocationInfo) GetLatLng() *google_type1.LatLng

func (*LocationInfo) ProtoMessage

func (*LocationInfo) ProtoMessage()

func (*LocationInfo) Reset

func (m *LocationInfo) Reset()

func (*LocationInfo) String

func (m *LocationInfo) String() string

type Page

type Page struct {
	// Additional information detected on the page.
	Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property" json:"property,omitempty"`
	// Page width in pixels.
	Width int32 `protobuf:"varint,2,opt,name=width" json:"width,omitempty"`
	// Page height in pixels.
	Height int32 `protobuf:"varint,3,opt,name=height" json:"height,omitempty"`
	// List of blocks of text, images etc on this page.
	Blocks []*Block `protobuf:"bytes,4,rep,name=blocks" json:"blocks,omitempty"`
	// Confidence of the OCR results on the page. Range [0, 1].
	Confidence float32 `protobuf:"fixed32,5,opt,name=confidence" json:"confidence,omitempty"`
}

Detected page from OCR.

func (*Page) Descriptor

func (*Page) Descriptor() ([]byte, []int)

func (*Page) GetBlocks

func (m *Page) GetBlocks() []*Block

func (*Page) GetConfidence

func (m *Page) GetConfidence() float32

func (*Page) GetHeight

func (m *Page) GetHeight() int32

func (*Page) GetProperty

func (m *Page) GetProperty() *TextAnnotation_TextProperty

func (*Page) GetWidth

func (m *Page) GetWidth() int32

func (*Page) ProtoMessage

func (*Page) ProtoMessage()

func (*Page) Reset

func (m *Page) Reset()

func (*Page) String

func (m *Page) String() string

type Paragraph

type Paragraph struct {
	// Additional information detected for the paragraph.
	Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property" json:"property,omitempty"`
	// The bounding box for the paragraph.
	// The vertices are in the order of top-left, top-right, bottom-right,
	// bottom-left. When a rotation of the bounding box is detected the rotation
	// is represented as around the top-left corner as defined when the text is
	// read in the 'natural' orientation.
	// For example:
	//   * when the text is horizontal it might look like:
	//      0----1
	//      |    |
	//      3----2
	//   * when it's rotated 180 degrees around the top-left corner it becomes:
	//      2----3
	//      |    |
	//      1----0
	//   and the vertice order will still be (0, 1, 2, 3).
	BoundingBox *BoundingPoly `protobuf:"bytes,2,opt,name=bounding_box,json=boundingBox" json:"bounding_box,omitempty"`
	// List of words in this paragraph.
	Words []*Word `protobuf:"bytes,3,rep,name=words" json:"words,omitempty"`
	// Confidence of the OCR results for the paragraph. Range [0, 1].
	Confidence float32 `protobuf:"fixed32,4,opt,name=confidence" json:"confidence,omitempty"`
}

Structural unit of text representing a number of words in certain order.

func (*Paragraph) Descriptor

func (*Paragraph) Descriptor() ([]byte, []int)

func (*Paragraph) GetBoundingBox

func (m *Paragraph) GetBoundingBox() *BoundingPoly

func (*Paragraph) GetConfidence

func (m *Paragraph) GetConfidence() float32

func (*Paragraph) GetProperty

func (m *Paragraph) GetProperty() *TextAnnotation_TextProperty

func (*Paragraph) GetWords

func (m *Paragraph) GetWords() []*Word

func (*Paragraph) ProtoMessage

func (*Paragraph) ProtoMessage()

func (*Paragraph) Reset

func (m *Paragraph) Reset()

func (*Paragraph) String

func (m *Paragraph) String() string

type Position

type Position struct {
	// X coordinate.
	X float32 `protobuf:"fixed32,1,opt,name=x" json:"x,omitempty"`
	// Y coordinate.
	Y float32 `protobuf:"fixed32,2,opt,name=y" json:"y,omitempty"`
	// Z coordinate (or depth).
	Z float32 `protobuf:"fixed32,3,opt,name=z" json:"z,omitempty"`
}

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.

func (*Position) Descriptor

func (*Position) Descriptor() ([]byte, []int)

func (*Position) GetX

func (m *Position) GetX() float32

func (*Position) GetY

func (m *Position) GetY() float32

func (*Position) GetZ

func (m *Position) GetZ() float32

func (*Position) ProtoMessage

func (*Position) ProtoMessage()

func (*Position) Reset

func (m *Position) Reset()

func (*Position) String

func (m *Position) String() string

type Property

type Property struct {
	// Name of the property.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// Value of the property.
	Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
	// Value of numeric properties.
	Uint64Value uint64 `protobuf:"varint,3,opt,name=uint64_value,json=uint64Value" json:"uint64_value,omitempty"`
}

A `Property` consists of a user-supplied name/value pair.

func (*Property) Descriptor

func (*Property) Descriptor() ([]byte, []int)

func (*Property) GetName

func (m *Property) GetName() string

func (*Property) GetUint64Value

func (m *Property) GetUint64Value() uint64

func (*Property) GetValue

func (m *Property) GetValue() string

func (*Property) ProtoMessage

func (*Property) ProtoMessage()

func (*Property) Reset

func (m *Property) Reset()

func (*Property) String

func (m *Property) String() string

type SafeSearchAnnotation

type SafeSearchAnnotation struct {
	// Represents the adult content likelihood for the image. Adult content may
	// contain elements such as nudity, pornographic images or cartoons, or
	// sexual activities.
	Adult Likelihood `protobuf:"varint,1,opt,name=adult,enum=google.cloud.vision.v1.Likelihood" json:"adult,omitempty"`
	// Spoof likelihood. The likelihood that an modification
	// was made to the image's canonical version to make it appear
	// funny or offensive.
	Spoof Likelihood `protobuf:"varint,2,opt,name=spoof,enum=google.cloud.vision.v1.Likelihood" json:"spoof,omitempty"`
	// Likelihood that this is a medical image.
	Medical Likelihood `protobuf:"varint,3,opt,name=medical,enum=google.cloud.vision.v1.Likelihood" json:"medical,omitempty"`
	// Likelihood that this image contains violent content.
	Violence Likelihood `protobuf:"varint,4,opt,name=violence,enum=google.cloud.vision.v1.Likelihood" json:"violence,omitempty"`
	// Likelihood that the request image contains racy content. Racy content may
	// include (but is not limited to) skimpy or sheer clothing, strategically
	// covered nudity, lewd or provocative poses, or close-ups of sensitive
	// body areas.
	Racy Likelihood `protobuf:"varint,9,opt,name=racy,enum=google.cloud.vision.v1.Likelihood" json:"racy,omitempty"`
}

Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).

func (*SafeSearchAnnotation) Descriptor

func (*SafeSearchAnnotation) Descriptor() ([]byte, []int)

func (*SafeSearchAnnotation) GetAdult

func (m *SafeSearchAnnotation) GetAdult() Likelihood

func (*SafeSearchAnnotation) GetMedical

func (m *SafeSearchAnnotation) GetMedical() Likelihood

func (*SafeSearchAnnotation) GetRacy

func (m *SafeSearchAnnotation) GetRacy() Likelihood

func (*SafeSearchAnnotation) GetSpoof

func (m *SafeSearchAnnotation) GetSpoof() Likelihood

func (*SafeSearchAnnotation) GetViolence

func (m *SafeSearchAnnotation) GetViolence() Likelihood

func (*SafeSearchAnnotation) ProtoMessage

func (*SafeSearchAnnotation) ProtoMessage()

func (*SafeSearchAnnotation) Reset

func (m *SafeSearchAnnotation) Reset()

func (*SafeSearchAnnotation) String

func (m *SafeSearchAnnotation) String() string

type Symbol

type Symbol struct {
	// Additional information detected for the symbol.
	Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property" json:"property,omitempty"`
	// The bounding box for the symbol.
	// The vertices are in the order of top-left, top-right, bottom-right,
	// bottom-left. When a rotation of the bounding box is detected the rotation
	// is represented as around the top-left corner as defined when the text is
	// read in the 'natural' orientation.
	// For example:
	//   * when the text is horizontal it might look like:
	//      0----1
	//      |    |
	//      3----2
	//   * when it's rotated 180 degrees around the top-left corner it becomes:
	//      2----3
	//      |    |
	//      1----0
	//   and the vertice order will still be (0, 1, 2, 3).
	BoundingBox *BoundingPoly `protobuf:"bytes,2,opt,name=bounding_box,json=boundingBox" json:"bounding_box,omitempty"`
	// The actual UTF-8 representation of the symbol.
	Text string `protobuf:"bytes,3,opt,name=text" json:"text,omitempty"`
	// Confidence of the OCR results for the symbol. Range [0, 1].
	Confidence float32 `protobuf:"fixed32,4,opt,name=confidence" json:"confidence,omitempty"`
}

A single symbol representation.

func (*Symbol) Descriptor

func (*Symbol) Descriptor() ([]byte, []int)

func (*Symbol) GetBoundingBox

func (m *Symbol) GetBoundingBox() *BoundingPoly

func (*Symbol) GetConfidence

func (m *Symbol) GetConfidence() float32

func (*Symbol) GetProperty

func (m *Symbol) GetProperty() *TextAnnotation_TextProperty

func (*Symbol) GetText

func (m *Symbol) GetText() string

func (*Symbol) ProtoMessage

func (*Symbol) ProtoMessage()

func (*Symbol) Reset

func (m *Symbol) Reset()

func (*Symbol) String

func (m *Symbol) String() string

type TextAnnotation

type TextAnnotation struct {
	// List of pages detected by OCR.
	Pages []*Page `protobuf:"bytes,1,rep,name=pages" json:"pages,omitempty"`
	// UTF-8 text detected on the pages.
	Text string `protobuf:"bytes,2,opt,name=text" json:"text,omitempty"`
}

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][google.cloud.vision.v1.TextAnnotation.TextProperty] message definition below for more detail.

func (*TextAnnotation) Descriptor

func (*TextAnnotation) Descriptor() ([]byte, []int)

func (*TextAnnotation) GetPages

func (m *TextAnnotation) GetPages() []*Page

func (*TextAnnotation) GetText

func (m *TextAnnotation) GetText() string

func (*TextAnnotation) ProtoMessage

func (*TextAnnotation) ProtoMessage()

func (*TextAnnotation) Reset

func (m *TextAnnotation) Reset()

func (*TextAnnotation) String

func (m *TextAnnotation) String() string

type TextAnnotation_DetectedBreak

type TextAnnotation_DetectedBreak struct {
	// Detected break type.
	Type TextAnnotation_DetectedBreak_BreakType `protobuf:"varint,1,opt,name=type,enum=google.cloud.vision.v1.TextAnnotation_DetectedBreak_BreakType" json:"type,omitempty"`
	// True if break prepends the element.
	IsPrefix bool `protobuf:"varint,2,opt,name=is_prefix,json=isPrefix" json:"is_prefix,omitempty"`
}

Detected start or end of a structural component.

func (*TextAnnotation_DetectedBreak) Descriptor

func (*TextAnnotation_DetectedBreak) Descriptor() ([]byte, []int)

func (*TextAnnotation_DetectedBreak) GetIsPrefix

func (m *TextAnnotation_DetectedBreak) GetIsPrefix() bool

func (*TextAnnotation_DetectedBreak) GetType

func (*TextAnnotation_DetectedBreak) ProtoMessage

func (*TextAnnotation_DetectedBreak) ProtoMessage()

func (*TextAnnotation_DetectedBreak) Reset

func (m *TextAnnotation_DetectedBreak) Reset()

func (*TextAnnotation_DetectedBreak) String

type TextAnnotation_DetectedBreak_BreakType

type TextAnnotation_DetectedBreak_BreakType int32

Enum to denote the type of break found. New line, space etc.

const (
	// Unknown break label type.
	TextAnnotation_DetectedBreak_UNKNOWN TextAnnotation_DetectedBreak_BreakType = 0
	// Regular space.
	TextAnnotation_DetectedBreak_SPACE TextAnnotation_DetectedBreak_BreakType = 1
	// Sure space (very wide).
	TextAnnotation_DetectedBreak_SURE_SPACE TextAnnotation_DetectedBreak_BreakType = 2
	// Line-wrapping break.
	TextAnnotation_DetectedBreak_EOL_SURE_SPACE TextAnnotation_DetectedBreak_BreakType = 3
	// End-line hyphen that is not present in text; does not co-occur with
	// `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
	TextAnnotation_DetectedBreak_HYPHEN TextAnnotation_DetectedBreak_BreakType = 4
	// Line break that ends a paragraph.
	TextAnnotation_DetectedBreak_LINE_BREAK TextAnnotation_DetectedBreak_BreakType = 5
)

func (TextAnnotation_DetectedBreak_BreakType) EnumDescriptor

func (TextAnnotation_DetectedBreak_BreakType) EnumDescriptor() ([]byte, []int)

func (TextAnnotation_DetectedBreak_BreakType) String

type TextAnnotation_DetectedLanguage

type TextAnnotation_DetectedLanguage struct {
	// The BCP-47 language code, such as "en-US" or "sr-Latn". For more
	// information, see
	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
	LanguageCode string `protobuf:"bytes,1,opt,name=language_code,json=languageCode" json:"language_code,omitempty"`
	// Confidence of detected language. Range [0, 1].
	Confidence float32 `protobuf:"fixed32,2,opt,name=confidence" json:"confidence,omitempty"`
}

Detected language for a structural component.

func (*TextAnnotation_DetectedLanguage) Descriptor

func (*TextAnnotation_DetectedLanguage) Descriptor() ([]byte, []int)

func (*TextAnnotation_DetectedLanguage) GetConfidence

func (m *TextAnnotation_DetectedLanguage) GetConfidence() float32

func (*TextAnnotation_DetectedLanguage) GetLanguageCode

func (m *TextAnnotation_DetectedLanguage) GetLanguageCode() string

func (*TextAnnotation_DetectedLanguage) ProtoMessage

func (*TextAnnotation_DetectedLanguage) ProtoMessage()

func (*TextAnnotation_DetectedLanguage) Reset

func (*TextAnnotation_DetectedLanguage) String

type TextAnnotation_TextProperty

type TextAnnotation_TextProperty struct {
	// A list of detected languages together with confidence.
	DetectedLanguages []*TextAnnotation_DetectedLanguage `protobuf:"bytes,1,rep,name=detected_languages,json=detectedLanguages" json:"detected_languages,omitempty"`
	// Detected start or end of a text segment.
	DetectedBreak *TextAnnotation_DetectedBreak `protobuf:"bytes,2,opt,name=detected_break,json=detectedBreak" json:"detected_break,omitempty"`
}

Additional information detected on the structural component.

func (*TextAnnotation_TextProperty) Descriptor

func (*TextAnnotation_TextProperty) Descriptor() ([]byte, []int)

func (*TextAnnotation_TextProperty) GetDetectedBreak

func (*TextAnnotation_TextProperty) GetDetectedLanguages

func (m *TextAnnotation_TextProperty) GetDetectedLanguages() []*TextAnnotation_DetectedLanguage

func (*TextAnnotation_TextProperty) ProtoMessage

func (*TextAnnotation_TextProperty) ProtoMessage()

func (*TextAnnotation_TextProperty) Reset

func (m *TextAnnotation_TextProperty) Reset()

func (*TextAnnotation_TextProperty) String

func (m *TextAnnotation_TextProperty) String() string

type Vertex

type Vertex struct {
	// X coordinate.
	X int32 `protobuf:"varint,1,opt,name=x" json:"x,omitempty"`
	// Y coordinate.
	Y int32 `protobuf:"varint,2,opt,name=y" json:"y,omitempty"`
}

A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.

func (*Vertex) Descriptor

func (*Vertex) Descriptor() ([]byte, []int)

func (*Vertex) GetX

func (m *Vertex) GetX() int32

func (*Vertex) GetY

func (m *Vertex) GetY() int32

func (*Vertex) ProtoMessage

func (*Vertex) ProtoMessage()

func (*Vertex) Reset

func (m *Vertex) Reset()

func (*Vertex) String

func (m *Vertex) String() string

type WebDetection

type WebDetection struct {
	// Deduced entities from similar images on the Internet.
	WebEntities []*WebDetection_WebEntity `protobuf:"bytes,1,rep,name=web_entities,json=webEntities" json:"web_entities,omitempty"`
	// Fully matching images from the Internet.
	// Can include resized copies of the query image.
	FullMatchingImages []*WebDetection_WebImage `protobuf:"bytes,2,rep,name=full_matching_images,json=fullMatchingImages" json:"full_matching_images,omitempty"`
	// Partial matching images from the Internet.
	// Those images are similar enough to share some key-point features. For
	// example an original image will likely have partial matching for its crops.
	PartialMatchingImages []*WebDetection_WebImage `protobuf:"bytes,3,rep,name=partial_matching_images,json=partialMatchingImages" json:"partial_matching_images,omitempty"`
	// Web pages containing the matching images from the Internet.
	PagesWithMatchingImages []*WebDetection_WebPage `` /* 127-byte string literal not displayed */
	// The visually similar image results.
	VisuallySimilarImages []*WebDetection_WebImage `protobuf:"bytes,6,rep,name=visually_similar_images,json=visuallySimilarImages" json:"visually_similar_images,omitempty"`
	// Best guess text labels for the request image.
	BestGuessLabels []*WebDetection_WebLabel `protobuf:"bytes,8,rep,name=best_guess_labels,json=bestGuessLabels" json:"best_guess_labels,omitempty"`
}

Relevant information for the image from the Internet.

func (*WebDetection) Descriptor

func (*WebDetection) Descriptor() ([]byte, []int)

func (*WebDetection) GetBestGuessLabels

func (m *WebDetection) GetBestGuessLabels() []*WebDetection_WebLabel

func (*WebDetection) GetFullMatchingImages

func (m *WebDetection) GetFullMatchingImages() []*WebDetection_WebImage

func (*WebDetection) GetPagesWithMatchingImages

func (m *WebDetection) GetPagesWithMatchingImages() []*WebDetection_WebPage

func (*WebDetection) GetPartialMatchingImages

func (m *WebDetection) GetPartialMatchingImages() []*WebDetection_WebImage

func (*WebDetection) GetVisuallySimilarImages

func (m *WebDetection) GetVisuallySimilarImages() []*WebDetection_WebImage

func (*WebDetection) GetWebEntities

func (m *WebDetection) GetWebEntities() []*WebDetection_WebEntity

func (*WebDetection) ProtoMessage

func (*WebDetection) ProtoMessage()

func (*WebDetection) Reset

func (m *WebDetection) Reset()

func (*WebDetection) String

func (m *WebDetection) String() string

type WebDetectionParams

type WebDetectionParams struct {
	// Whether to include results derived from the geo information in the image.
	IncludeGeoResults bool `protobuf:"varint,2,opt,name=include_geo_results,json=includeGeoResults" json:"include_geo_results,omitempty"`
}

Parameters for web detection request.

func (*WebDetectionParams) Descriptor

func (*WebDetectionParams) Descriptor() ([]byte, []int)

func (*WebDetectionParams) GetIncludeGeoResults

func (m *WebDetectionParams) GetIncludeGeoResults() bool

func (*WebDetectionParams) ProtoMessage

func (*WebDetectionParams) ProtoMessage()

func (*WebDetectionParams) Reset

func (m *WebDetectionParams) Reset()

func (*WebDetectionParams) String

func (m *WebDetectionParams) String() string

type WebDetection_WebEntity

type WebDetection_WebEntity struct {
	// Opaque entity ID.
	EntityId string `protobuf:"bytes,1,opt,name=entity_id,json=entityId" json:"entity_id,omitempty"`
	// Overall relevancy score for the entity.
	// Not normalized and not comparable across different image queries.
	Score float32 `protobuf:"fixed32,2,opt,name=score" json:"score,omitempty"`
	// Canonical description of the entity, in English.
	Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
}

Entity deduced from similar images on the Internet.

func (*WebDetection_WebEntity) Descriptor

func (*WebDetection_WebEntity) Descriptor() ([]byte, []int)

func (*WebDetection_WebEntity) GetDescription

func (m *WebDetection_WebEntity) GetDescription() string

func (*WebDetection_WebEntity) GetEntityId

func (m *WebDetection_WebEntity) GetEntityId() string

func (*WebDetection_WebEntity) GetScore

func (m *WebDetection_WebEntity) GetScore() float32

func (*WebDetection_WebEntity) ProtoMessage

func (*WebDetection_WebEntity) ProtoMessage()

func (*WebDetection_WebEntity) Reset

func (m *WebDetection_WebEntity) Reset()

func (*WebDetection_WebEntity) String

func (m *WebDetection_WebEntity) String() string

type WebDetection_WebImage

type WebDetection_WebImage struct {
	// The result image URL.
	Url string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
	// (Deprecated) Overall relevancy score for the image.
	Score float32 `protobuf:"fixed32,2,opt,name=score" json:"score,omitempty"`
}

Metadata for online images.

func (*WebDetection_WebImage) Descriptor

func (*WebDetection_WebImage) Descriptor() ([]byte, []int)

func (*WebDetection_WebImage) GetScore

func (m *WebDetection_WebImage) GetScore() float32

func (*WebDetection_WebImage) GetUrl

func (m *WebDetection_WebImage) GetUrl() string

func (*WebDetection_WebImage) ProtoMessage

func (*WebDetection_WebImage) ProtoMessage()

func (*WebDetection_WebImage) Reset

func (m *WebDetection_WebImage) Reset()

func (*WebDetection_WebImage) String

func (m *WebDetection_WebImage) String() string

type WebDetection_WebLabel

type WebDetection_WebLabel struct {
	// Label for extra metadata.
	Label string `protobuf:"bytes,1,opt,name=label" json:"label,omitempty"`
	// The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
	// For more information, see
	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
	LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode" json:"language_code,omitempty"`
}

Label to provide extra metadata for the web detection.

func (*WebDetection_WebLabel) Descriptor

func (*WebDetection_WebLabel) Descriptor() ([]byte, []int)

func (*WebDetection_WebLabel) GetLabel

func (m *WebDetection_WebLabel) GetLabel() string

func (*WebDetection_WebLabel) GetLanguageCode

func (m *WebDetection_WebLabel) GetLanguageCode() string

func (*WebDetection_WebLabel) ProtoMessage

func (*WebDetection_WebLabel) ProtoMessage()

func (*WebDetection_WebLabel) Reset

func (m *WebDetection_WebLabel) Reset()

func (*WebDetection_WebLabel) String

func (m *WebDetection_WebLabel) String() string

type WebDetection_WebPage

type WebDetection_WebPage struct {
	// The result web page URL.
	Url string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
	// (Deprecated) Overall relevancy score for the web page.
	Score float32 `protobuf:"fixed32,2,opt,name=score" json:"score,omitempty"`
	// Title for the web page, may contain HTML markups.
	PageTitle string `protobuf:"bytes,3,opt,name=page_title,json=pageTitle" json:"page_title,omitempty"`
	// Fully matching images on the page.
	// Can include resized copies of the query image.
	FullMatchingImages []*WebDetection_WebImage `protobuf:"bytes,4,rep,name=full_matching_images,json=fullMatchingImages" json:"full_matching_images,omitempty"`
	// Partial matching images on the page.
	// Those images are similar enough to share some key-point features. For
	// example an original image will likely have partial matching for its
	// crops.
	PartialMatchingImages []*WebDetection_WebImage `protobuf:"bytes,5,rep,name=partial_matching_images,json=partialMatchingImages" json:"partial_matching_images,omitempty"`
}

Metadata for web pages.

func (*WebDetection_WebPage) Descriptor

func (*WebDetection_WebPage) Descriptor() ([]byte, []int)

func (*WebDetection_WebPage) GetFullMatchingImages

func (m *WebDetection_WebPage) GetFullMatchingImages() []*WebDetection_WebImage

func (*WebDetection_WebPage) GetPageTitle

func (m *WebDetection_WebPage) GetPageTitle() string

func (*WebDetection_WebPage) GetPartialMatchingImages

func (m *WebDetection_WebPage) GetPartialMatchingImages() []*WebDetection_WebImage

func (*WebDetection_WebPage) GetScore

func (m *WebDetection_WebPage) GetScore() float32

func (*WebDetection_WebPage) GetUrl

func (m *WebDetection_WebPage) GetUrl() string

func (*WebDetection_WebPage) ProtoMessage

func (*WebDetection_WebPage) ProtoMessage()

func (*WebDetection_WebPage) Reset

func (m *WebDetection_WebPage) Reset()

func (*WebDetection_WebPage) String

func (m *WebDetection_WebPage) String() string

type Word

type Word struct {
	// Additional information detected for the word.
	Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property" json:"property,omitempty"`
	// The bounding box for the word.
	// The vertices are in the order of top-left, top-right, bottom-right,
	// bottom-left. When a rotation of the bounding box is detected the rotation
	// is represented as around the top-left corner as defined when the text is
	// read in the 'natural' orientation.
	// For example:
	//   * when the text is horizontal it might look like:
	//      0----1
	//      |    |
	//      3----2
	//   * when it's rotated 180 degrees around the top-left corner it becomes:
	//      2----3
	//      |    |
	//      1----0
	//   and the vertice order will still be (0, 1, 2, 3).
	BoundingBox *BoundingPoly `protobuf:"bytes,2,opt,name=bounding_box,json=boundingBox" json:"bounding_box,omitempty"`
	// List of symbols in the word.
	// The order of the symbols follows the natural reading order.
	Symbols []*Symbol `protobuf:"bytes,3,rep,name=symbols" json:"symbols,omitempty"`
	// Confidence of the OCR results for the word. Range [0, 1].
	Confidence float32 `protobuf:"fixed32,4,opt,name=confidence" json:"confidence,omitempty"`
}

A word representation.

func (*Word) Descriptor

func (*Word) Descriptor() ([]byte, []int)

func (*Word) GetBoundingBox

func (m *Word) GetBoundingBox() *BoundingPoly

func (*Word) GetConfidence

func (m *Word) GetConfidence() float32

func (*Word) GetProperty

func (m *Word) GetProperty() *TextAnnotation_TextProperty

func (*Word) GetSymbols

func (m *Word) GetSymbols() []*Symbol

func (*Word) ProtoMessage

func (*Word) ProtoMessage()

func (*Word) Reset

func (m *Word) Reset()

func (*Word) String

func (m *Word) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL