function

package
v0.0.0-...-65088b8 Latest Latest
Warning

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

Go to latest
Published: May 2, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(req []byte) string

Handle a serverless request

Types

type DetectionResult

type DetectionResult struct {
	Faces       []image.Rectangle
	ImageBase64 string
}

DetectionResult contains the coordinates of the detected faces and the base64 converted image.

type FaceDetector

type FaceDetector struct {
	// contains filtered or unexported fields
}

FaceDetector struct contains Pigo face detector general settings.

func NewFaceDetector

func NewFaceDetector(cf string, minSize, maxSize int, shf, scf, iou float64) *FaceDetector

NewFaceDetector initialises the constructor function.

func (*FaceDetector) DetectFaces

func (fd *FaceDetector) DetectFaces(source string) ([]pigo.Detection, error)

DetectFaces run the detection algorithm over the provided source image.

func (*FaceDetector) DrawFaces

func (fd *FaceDetector) DrawFaces(faces []pigo.Detection, isCircle bool) ([]image.Rectangle, []byte, error)

DrawFaces marks the detected faces with a circle in case isCircle is true, otherwise marks with a rectangle.

Jump to

Keyboard shortcuts

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