detector

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DetectionBuffer

type DetectionBuffer interface {
	// Insert new a frame represented by the index and the detection status.
	Append(index int, detected bool)

	// Convert the detections collection into a ascending sorted slice of frames indexes.
	Resolve() []int
}

A data structure that stores the detections and allows for automatic correction of missed detections thanks to a candidate buffer.

func CreateDetectionBuffer

func CreateDetectionBuffer() DetectionBuffer

Create a new detection buffer instance with the candidate buffer size set to four.

type Detector

type Detector interface {
	Run(inputVideoPath, outputDirectoryPath string) error
}

Detector instance that is able to perform a search after ligntning strikes on a video file.

func CreateDetector

func CreateDetector(renderer render.Renderer, options DetectorOptions) (Detector, error)

Create a new video lightning detector instance with the specified options.

type DetectorOptions

type DetectorOptions struct {
	AutoThresholds                              bool
	BrightnessDetectionThreshold                float64
	ColorDifferenceDetectionThreshold           float64
	BinaryThresholdDifferenceDetectionThreshold float64
	MovingMeanResolution                        int32
	ExportCsvReport                             bool
	ExportJsonReport                            bool
	ExportChartReport                           bool
	SkipFramesExport                            bool
	Denoise                                     bool
	FrameScalingFactor                          float64
}

Structure representing the options for the detector.

func GetDefaultDetectorOptions

func GetDefaultDetectorOptions() DetectorOptions

Return the default detector options.

func (*DetectorOptions) AreValid

func (options *DetectorOptions) AreValid() (bool, string)

Return a boolean value representing if the detector options are valid. If any validation errors occured a message will be stored in the string return value. TODO: MovingMeanResolution validation >1

Jump to

Keyboard shortcuts

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