Documentation
¶
Overview ¶
Package imgdiff provides image comparison using simple and perceptual diff algorithms.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSize = errors.New("images have different sizes")
ErrSize is used when the two images under comparison have different sizes.
Functions ¶
This section is empty.
Types ¶
type Differ ¶
type Differ interface { // Compare compares images a and b, returning the resulting // difference image and the number of pixels that are different // according to an algorithm. // // It returns ErrSize if images have their width or height // do not match. Compare(a, b image.Image) (image.Image, int, error) }
Differ is the image comparison interface. All supported algorithms implement it.
func NewBinary ¶
func NewBinary() Differ
NewBinary creates a new Differ based on simple binary algorithm.
func NewDefaultPerceptual ¶
func NewDefaultPerceptual() Differ
NewDefaultPerceptual returns the result of calling NewPerceptual with:
gamma = 2.2 luminance = 100.0 fov = 45.0 cf = 1.0 nocolor = false
func NewPerceptual ¶
NewPerceptual creates a new Differ based on perceptual diff algorithm.
Click to show internal directories.
Click to hide internal directories.