rekognition

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package rekognition interacts with pkg/aws/rekognition methods and types

Index

Constants

View Source
const (

	// ErrEmptyBytes is used when an empty []byte is passed to a method
	// that requires a full one
	ErrEmptyBytes = "EmptyBytes"

	// ErrBadSimilarity is used when 0 is passed as similarity parameter
	ErrBadSimilarity = "BadSimilarity"

	// ErrEmptyParameter is used when a parameter is empty
	ErrEmptyParameter = "EmptyParameter"

	// ErrEmptyMap is used when structs.Map() returns an empty map
	ErrEmptyMap = "EmptyMap"
)

Variables

This section is empty.

Functions

func UnmarshalCompareFacesOutput

func UnmarshalCompareFacesOutput(input rekognition.CompareFacesOutput, output *CompareFacesOutput) error

UnmarshalCompareFacesOutput unmarshals a rekognition.CompareFacesOutput to *CompareFacesOutput

func UnmarshalDetectFacesOutput

func UnmarshalDetectFacesOutput(input rekognition.DetectFacesOutput, output *DetectFacesOutput) error

UnmarshalDetectFacesOutput unmarshals a rekognition.DetectFacesOutput to *DetectFacesOutput

func UnmarshalDetectTextOutput

func UnmarshalDetectTextOutput(input rekognition.DetectTextOutput, output *DetectTextOutput) error

UnmarshalDetectTextOutput unmarshals a rekognition.DetectTextOutput to *DetectTextOutput

Types

type AgeRange

type AgeRange struct {
	High int64 `json:"High,omitempty"`
	Low  int64 `json:"Low,omitempty"`
}

AgeRange describes a low and max age

type BoolAttribute

type BoolAttribute struct {
	Confidence float64 `json:"Confidence,omitempty"`
	Value      bool    `json:"Value,omitempty"`
}

BoolAttribute is used to represent a rekognition boolean attribute

type CompareFacesInput

type CompareFacesInput struct {
	SourceImage []byte
	TargetImage []byte
	Similarity  float64
}

CompareFacesInput contains parameters to be sent to CompareFaces

type CompareFacesOutput

type CompareFacesOutput struct {
	FaceMatches    []FaceMatches `json:"FaceMatches"`
	UnmatchedFaces []FaceMatches `json:"UnmatchedFaces"`
}

CompareFacesOutput CompareFaces response

type DetectFacesInput

type DetectFacesInput struct {
	SourceImage []byte
}

DetectFacesInput contains parameters to be sent to DetectFaces

type DetectFacesOutput

type DetectFacesOutput struct {
	FaceDetails []FaceDetails `json:"FaceDetails"`
}

DetectFacesOutput contains DetectFaces response

type DetectTextInput

type DetectTextInput struct {
	SourceImage []byte
}

DetectTextInput contains parameters to be sent to DetectText

type DetectTextOutput

type DetectTextOutput struct {
	TextDetections []TextDetection `json:"TextDetections"`
}

DetectTextOutput contains DetectText response

type Face

type Face struct {
	Confidence float64 `json:"Confidence,omitempty"`
	Quality    Quality `json:"Quality,omitempty"`
}

Face describes a face analysis output

type FaceDetails

type FaceDetails struct {
	AgeRange   AgeRange        `json:"AgeRange,omitempty"`
	Beard      BoolAttribute   `json:"Beard,omitempty"`
	EyeGlasses BoolAttribute   `json:"EyeGlasses,omitempty"`
	EyesOpen   BoolAttribute   `json:"EyesOpen,omitempty"`
	Gender     StringAttribute `json:"Gender,omitempty"`
	MouthOpen  BoolAttribute   `json:"MouthOpen,omitempty"`
	Mustache   BoolAttribute   `json:"Mustache,omitempty"`
	Confidence float64         `json:"Confidence,omitempty"`
	Quality    Quality         `json:"Quality,omitempty"`
	Sunglasses BoolAttribute   `json:"Sunglasses,omitempty"`
}

FaceDetails contains Face Details

type FaceMatches

type FaceMatches struct {
	Face       Face `json:"Face,omitempty"`
	Similarity int  `json:"Similarity,omitempty"`
}

FaceMatches contains CompareFaces Face Matches

type Quality

type Quality struct {
	Brightness float64 `json:"Brightness,omitempty"`
	Sharpness  float64 `json:"Sharpness,omitempty"`
}

Quality describes the quality of an analyzed picture

type Rekognition

type Rekognition struct {
	*rekognition.Rekognition
}

Rekognition embeds *rekognition.Rekognition and is used to call rekognition methods on high level

func New

func New(svc *aws.Session, region string) (*Rekognition, error)

New returns a *Rekognition given a *aws.Session. Region is optional.

func (*Rekognition) CompareFaces

func (svc *Rekognition) CompareFaces(sourceImage, targetImage []byte, similarity float64) (*CompareFacesOutput, error)

CompareFaces returns a *CompareFacesOutput

func (*Rekognition) DetectFaces

func (svc *Rekognition) DetectFaces(sourceImage []byte) (*DetectFacesOutput, error)

DetectFaces returns a *DetectFacesOutput

func (*Rekognition) DetectText

func (svc *Rekognition) DetectText(sourceImage []byte) (*DetectTextOutput, error)

DetectText returns a *DetectTextOutput

type StringAttribute

type StringAttribute struct {
	Confidence float64 `json:"Confidence,omitempty"`
	Value      string  `json:"Value,omitempty"`
}

StringAttribute is used to represent a rekognition string attribute

type TextDetection

type TextDetection struct {
	Confidence   float64 `json:"Confidence,omitempty"`
	DetectedText string  `json:"DetectedText,omitempty"`
	Id           int64   `json:"Id,omitempty"`
	Type         string  `json:"Type,omitempty"`
}

TextDetection contains Text Detection output

Jump to

Keyboard shortcuts

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