detect

package
v0.0.0-...-72f9927 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAnnotation

func GetAnnotation(img *image.RGBA) (*pb.TextAnnotation, error)

GetAnnotation gets text (TextAnnotation) from the Vision API for an image at the given file path.

func ReaderFromImage

func ReaderFromImage(img *image.RGBA) *bytes.Reader

Types

type TextBlock

type TextBlock struct {
	Text       string
	Translated string
	Vertices   []*pb.Vertex
	Color      color.NRGBA
}

func OrganizeAnnotation

func OrganizeAnnotation(annotation *pb.TextAnnotation) []TextBlock

OrganizeAnnotation converts a TextAnnotation object to a slice of TextBlocks for easier manipulation.

Jump to

Keyboard shortcuts

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