vision

package
v0.0.0-...-6d3e6ed Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package vision wraps the Cloud Vision API and provides an auth method that allows you to check an input image for an input term.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthResult

type AuthResult struct {
	Result bool                   `json:"result"`
	Raw    []*pb.EntityAnnotation `json:"raw"`
}

AuthResult is the return from auth operations. It allows us to show tbe pure result and the work.

func Auth

func Auth(term, file string) (AuthResult, error)

Auth takes a picture and a term and compares them to each other to see if the an item matching the input term is contained in the image

func AuthFromReader

func AuthFromReader(term string, file io.Reader) (AuthResult, error)

AuthFromReader takes a picture and a term and compares them to each other to see if the an item matching the input term is contained in the image

func (*AuthResult) AuthTerm

func (l *AuthResult) AuthTerm(term string)

AuthTerm does the check to see if the language query worked

Jump to

Keyboard shortcuts

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