engine

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetImageSize

func GetImageSize(imgPath string) (width, height int, err error)

Types

type Config

type Config interface{}

type Engine

type Engine interface {
	Init(conf Config) error
	String() string
	Detect(imgPath string) (FaceResult, error)
}

type FaceData

type FaceData struct {
	X             int     `json:"x"`
	Y             int     `json:"y"`
	Width         int     `json:"width"`
	Height        int     `json:"height"`
	PercentWidth  float64 `json:"width_per"`
	PercentHeight float64 `json:"height_per"`
	Confidence    float64 `json:"confidence"`
}

func (FaceData) MaxX

func (d FaceData) MaxX() int

func (FaceData) MaxY

func (d FaceData) MaxY() int

func (FaceData) PercentString

func (d FaceData) PercentString() string

func (FaceData) SizeString

func (d FaceData) SizeString() string

func (FaceData) String

func (d FaceData) String() string

func (FaceData) ToJson

func (d FaceData) ToJson() string

type FaceResult

type FaceResult struct {
	EngineName string     `json:"engine"`
	Faces      []FaceData `json:"faces"`
}

func (FaceResult) HasFaces

func (r FaceResult) HasFaces() bool

func (FaceResult) ShowOutput

func (r FaceResult) ShowOutput() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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