Documentation
¶
Overview ¶
Package imgstat inspects extracted screenshots and reports whether they carry any usable content. It implements the Analyzer port of package clipper without depending on it, so the domain stays free of image handling.
Index ¶
Constants ¶
View Source
const ( DefaultMaxMean = 0.02 DefaultMaxStdDev = 0.02 )
Default thresholds for the blank frame heuristic. A frame counts as blank when it is nearly uniform (nothing to see) or nearly black (a fade or a leader).
Variables ¶
View Source
var ErrDecode = errors.New("cannot decode image")
ErrDecode reports an image that cannot be decoded.
Functions ¶
This section is empty.
Types ¶
type Detector ¶
type Detector struct {
// MaxMean is the highest average luminance still considered black.
MaxMean float64
// MaxStdDev is the highest luminance spread still considered uniform.
MaxStdDev float64
}
Detector decides whether an image is blank. The zero value only rejects perfectly uniform images; use NewDetector for the defaults.
func NewDetector ¶
func NewDetector() Detector
NewDetector returns a Detector with the default thresholds.
Click to show internal directories.
Click to hide internal directories.