Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectText ¶
func DetectText(file string) ([]*visionpb.EntityAnnotation, []*visionpb.LocalizedObjectAnnotation, error)
DetectText sends image to GCP Cloud Vision for processing and annotating
func RequestImageAnnotation ¶
func RequestImageAnnotation(file string) (*visionpb.AnnotateImageResponse, error)
RequestImageAnnotation sends several options to GCP Cloud Vision for processing and annotating
Types ¶
type Annotation ¶
type Annotation struct { Description string `json:"description"` BoundingPoly BoundingPoly `json:"boundingPoly"` }
Annotation stores Description and BoundingPoly of Description as 'text'
type BoundingPoly ¶
type BoundingPoly struct { //using google's generated protobuf.. probably should do this for the other structs if this works Vertices []*visionpb.Vertex `json:"vertices"` }
BoundingPoly stores array of 4 XY coordinates that make up a polygon
type ImageAnnotation ¶
type ImageAnnotation struct { DirPath string `json:"dirPath"` FileName string `json:"filename"` FileExtension string `json:"fileExtension"` TextAnnotations []*Annotation `json:"text"` ObjectAnnotations []*Annotation `json:"object"` }
ImageAnnotation stores data returned from Cloud Vision along with image file metadata
func NewImageAnnotation ¶
func NewImageAnnotation(filename string) *ImageAnnotation
NewImageAnnotation creates a new ImageAnnotation from filename and extension
Click to show internal directories.
Click to hide internal directories.