motion

package
v1.55.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Skip                bool   `yaml:"skip,omitempty"`
	Padding             int    `yaml:"padding,omitempty"`
	ScaleWidth          int    `yaml:"scaleWidth,omitempty"`
	MinimumPercentage   int    `yaml:"minPercentage,omitempty"`
	MaximumPercentage   int    `yaml:"maxPercentage,omitempty"`
	MaxMotions          int    `yaml:"maxMotions,omitempty"`
	OverloadPercent     int    `yaml:"overloadPercent,omitempty"`
	ThresholdPercent    int    `yaml:"thresholdPercent,omitempty"`
	NoiseReduction      int    `yaml:"noiseReduction,omitempty"`
	HighlightColor      string `yaml:"highlightColor,omitempty"`
	HighlightThickness  int    `yaml:"highlightThickness,omitempty"`
	BackgroundHistory   int    `yaml:"backgroundHistory,omitempty"`
	BackgroundThreshold int    `yaml:"backgroundThreshold,omitempty"`
	DetectShadows       *bool  `yaml:"detectShadows,omitempty"`
	ClosingSize         int    `yaml:"closingSize,omitempty"`
	MinMotionFrames     int    `yaml:"minMotionFrames,omitempty"`
	MergeOverlapPercent int    `yaml:"mergeOverlapPercent,omitempty"`
	GridSize            int    `yaml:"gridSize,omitempty"`
	MergeDistance       int    `yaml:"mergeDistance,omitempty"`
}

Config contains the parameters for Motion detection

func NewConfig

func NewConfig(configPath string) *Config

NewConfig creates a new Config

type Motion

type Motion struct {
	Name string
	Skip bool
	// contains filtered or unexported fields
}

Motion detects motion within images

func NewMotion

func NewMotion(name string) *Motion

NewMotion creates a new Motion

func (*Motion) Run

func (m *Motion) Run(input <-chan videosource.Image) <-chan videosource.ProcessedImage

Run starts the motion detection process

func (*Motion) SetConfig

func (m *Motion) SetConfig(config *Config)

SetConfig on motion

Jump to

Keyboard shortcuts

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