detector

package
v0.0.0-...-9b06675 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2021 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (

	// NotSensitive represents a large mimumum diff contour area of an image
	// for a minimum sensitivity (not very sensitive) motion detector
	NotSensitive = 9000

	// DefaultSensitive represents a medium minimum diff contour area of an image
	// for a medium sensitivity (default sensitive) motion detector
	DefaultSensitive = 6000

	// VerySensitive represents a small minimum diff contour area of an image
	// for a maximum sensitivity (very sensitive) motion detector
	VerySensitive = 3000

	// DetectorStatusReady is the status of the detector when it
	// has completed initialization
	DetectorStatusReady = "Ready"

	// DetectorStatusMotionDetected is the status of the detector when
	// it detects a difference between two consecurive frames on the recording
	// device (i.e. motion is detected)
	DetectorStatusMotionDetected = "Motion Detected"

	// DetectorStatusClosed is the status of the detector when it is no
	// longer being closed, once it is closed, it cannot be re-initialized
	DetectorStatusClosed = "Closed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Detector

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

Detector is an abstraction for a motion detector

func NewMotionDetector

func NewMotionDetector(camID int, winTitle string, onDetect func()) (*Detector, error)

NewMotionDetector is the constructor for a Detector

func (*Detector) Close

func (d *Detector) Close()

Close handles closing gocv resources

func (*Detector) SnapshotJPG

func (d *Detector) SnapshotJPG() ([]byte, error)

SnapshotJPG returns a jpg encoded byte slice containing the latest image taken from the video capture device

func (*Detector) Start

func (d *Detector) Start() error

Start initializes the motion detector

func (*Detector) Status

func (d *Detector) Status() string

Status returns the status of the detector

Jump to

Keyboard shortcuts

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