rekognition

package
v1.0.3 Latest Latest
Warning

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

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

Documentation

Overview

Package rekognition handles interactions with aws-sdk-go/service/rekognition

Index

Constants

View Source
const (

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

	// ErrBadSimilarityParameter is used when similarity parameter is 0
	ErrBadSimilarityParameter = "BadSimilarityParameter"

	// ErrNoPointerParameter is used when a parameter was expected to be a pointer
	ErrNoPointerParameter = "NoPointerParameter"

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

	// Image represent the parameter named image
	Image = "image"

	// Input represent the parameter named input
	Input = "input"

	// Output represent the parameter named output
	Output = "output"

	// Map represent the parameter named map
	Map = "map"

	// Source represent the parameter named source
	Source = "source"

	// Target represent the parameter named target
	Target = "target"

	// Similarity represent the parameter named similarity
	Similarity = "similarity"
)

Variables

This section is empty.

Functions

func NewCompareFacesInput

func NewCompareFacesInput(source, target []byte, similarity float64) (*rekognition.CompareFacesInput, error)

NewCompareFacesInput builds a *rekognition.CompareFacesInput starting from the two images, their bucket and a similarity threshold

func NewDetectFacesInput

func NewDetectFacesInput(source []byte) (*rekognition.DetectFacesInput, error)

NewDetectFacesInput builds a *rekognition.DetectFacesInput starting from the image

func NewDetectTextInput

func NewDetectTextInput(source []byte) (*rekognition.DetectTextInput, error)

NewDetectTextInput builds a *rekognition.DetectTextInput starting from the image

func UnmarshalCompareFacesOutput added in v1.0.1

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

UnmarshalCompareFacesOutput unmarshals a *rekognition.CompareFacesOutput to *CompareFacesOutput

func UnmarshalDetectFacesOutput added in v1.0.1

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

UnmarshalDetectFacesOutput unmarshals a *rekognition.DetectFacesOutput to *DetectFacesOutput

func UnmarshalDetectTextOutput added in v1.0.1

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

UnmarshalDetectTextOutput unmarshals a *rekognition.DetectTextOutput to *DetectTextOutput

Types

type AgeRange added in v1.0.1

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

AgeRange describes a low and max age

type BoolAttribute added in v1.0.1

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 added in v1.0.1

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

Face describes a face analysis output

type FaceDetails added in v1.0.1

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 added in v1.0.1

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

FaceMatches contains CompareFaces Face Matches

type Quality added in v1.0.1

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 to be used to call New

func New

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

New returns a new *Rekognition embedding *rekognition.Rekognition

func (*Rekognition) RekognitionCompareFaces

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

RekognitionCompareFaces compares two faces returning their similarity

func (*Rekognition) RekognitionDetectFaces

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

RekognitionDetectFaces detects faces in an image

func (*Rekognition) RekognitionDetectText

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

RekognitionDetectText extracts text from an image

type StringAttribute added in v1.0.1

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

StringAttribute is used to represent a rekognition string attribute

type TextDetection added in v1.0.1

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