face_detector_driver

package
v0.0.0-...-7ca63e3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnexpectedEvent               = errors.New("unexpected event")
	ErrUnsupportedFaceDetectorDriver = errors.New("unsupported face detector driver")
)

Functions

This section is empty.

Types

type DahuaFaceDetector

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

func (*DahuaFaceDetector) Close

func (dfd *DahuaFaceDetector) Close()

func (*DahuaFaceDetector) Detect

func (dfd *DahuaFaceDetector) Detect() <-chan Event

type DahuaFaceDetectorOption

type DahuaFaceDetectorOption struct {
	Path      string
	Watchloop struct {
		Interval time.Duration
	}
	Mainloop struct {
		Timeout time.Duration
	}
	Fsnotifyloop struct {
		Timeout time.Duration
	}
}

func NewDahuaFaceDetectorOption

func NewDahuaFaceDetectorOption() *DahuaFaceDetectorOption

type Event

type Event interface {
	Type() string
	Timestamp() time.Time
}

type FaceDetected

type FaceDetected interface {
	Event

	Face() []byte
	Snapshot() []byte
}

func ToFaceDetected

func ToFaceDetected(evt Event) FaceDetected

func ToFaceDetectedE

func ToFaceDetectedE(evt Event) (FaceDetected, error)

type FaceDetectedImpl

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

func (*FaceDetectedImpl) Face

func (i *FaceDetectedImpl) Face() []byte

func (*FaceDetectedImpl) Snapshot

func (i *FaceDetectedImpl) Snapshot() []byte

func (*FaceDetectedImpl) Timestamp

func (i *FaceDetectedImpl) Timestamp() time.Time

func (*FaceDetectedImpl) Type

func (i *FaceDetectedImpl) Type() string

type FaceDetector

type FaceDetector interface {
	Detect() <-chan Event
	Close()
}

func NewDahuaFaceDetector

func NewDahuaFaceDetector(args ...interface{}) (FaceDetector, error)

func NewFaceDetector

func NewFaceDetector(name string, args ...interface{}) (FaceDetector, error)

func NewHikvisionFaceDetector

func NewHikvisionFaceDetector(args ...interface{}) (FaceDetector, error)

type FaceDetectorFactory

type FaceDetectorFactory func(...interface{}) (FaceDetector, error)

type HikvisionFaceDetector

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

func (*HikvisionFaceDetector) Close

func (hfd *HikvisionFaceDetector) Close()

func (*HikvisionFaceDetector) Detect

func (hfd *HikvisionFaceDetector) Detect() <-chan Event

type HikvisionFaceDetectorOption

type HikvisionFaceDetectorOption struct {
	Path      string
	Watchloop struct {
		Interval time.Duration
	}
	Mainloop struct {
		Timeout time.Duration
	}
	Fsnotifyloop struct {
		Timeout time.Duration
	}
}

func NewHikvisionFaceDetectorOption

func NewHikvisionFaceDetectorOption() *HikvisionFaceDetectorOption

Jump to

Keyboard shortcuts

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