processor

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Copyright © 2024 Alexander L. Belikoff <alexander@belikoff.net>

Index

Constants

View Source
const (
	ScoreSimilar   float32 = 1 // score to assign for similar images
	ScoreDifferent float32 = 0 // score to assign for different images
)
View Source
const (
	DefaultChrominanceTolerance = 0.3
	DefaultProportionTolerance  = 10.0
	DefaultSimilarityThreshold  = 0.7
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Processor

type Processor struct {
	QuietMode              bool          // be really quiet (only show warnings and errors)
	ExternalFramegenTool   string        // Program to use for frame generation
	ExternalComparisonTool string        // Program to use for image comparison
	OutputWriter           *bufio.Writer // where to write the report (nil means stdout)
	SimilarityThreshold    float32       // images with similarity score above the threshold are considered a match

	ScorePrefix          string // Prefix to use for score records
	UseAbsolutePaths     bool   // When true filenames will be stored in the state with absolute paths
	IgnoreFalsePositives bool   // Treat false positives as matches
	DebugMode            bool   // Enable debug mode

	ChrTolerance  float64 // Luma and Chrominance tolerance
	PropTolerance float64 // proportion tolerance
	// contains filtered or unexported fields
}

func MakeProcessor

func MakeProcessor(numWorkers int, stateDirectory string, clusteringMode state.ClusteringMethod, logger *logrus.Logger) *Processor

func (*Processor) CompactState added in v1.1.0

func (proc *Processor) CompactState() error

func (*Processor) DebugDump

func (proc *Processor) DebugDump()

func (*Processor) DumpState added in v1.3.0

func (proc *Processor) DumpState() error

func (*Processor) GenerateReport

func (proc *Processor) GenerateReport()

func (*Processor) Process

func (proc *Processor) Process(directories []string) error

func (*Processor) SetExclusionPattern

func (proc *Processor) SetExclusionPattern(pattern string) error

func (*Processor) ShowSummary

func (proc *Processor) ShowSummary()

func (*Processor) Unmatch

func (proc *Processor) Unmatch(files []string) error

type StatsCollector

type StatsCollector struct {
	NumFilesToProcess   int
	NumFramesToGenerate int
	NumFramesGenerated  int
	NumTotalComparisons int
	NumComparisonsMade  int
	NumCacheHits        int
	NumMatches          int
	NumFalsePositives   int

	QuietMode bool // don't show progress
	// contains filtered or unexported fields
}

func (*StatsCollector) EstimateCompletionETA

func (stats *StatsCollector) EstimateCompletionETA() (int, error)

func (*StatsCollector) IncNumComparisonsMade

func (stats *StatsCollector) IncNumComparisonsMade()

func (*StatsCollector) IncNumFilesGenerated

func (stats *StatsCollector) IncNumFilesGenerated()

func (*StatsCollector) ShowSummary

func (stats *StatsCollector) ShowSummary()

Jump to

Keyboard shortcuts

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