Versions in this module Expand all Collapse all v1 v1.0.2 Feb 10, 2021 Changes in this version + func ToGray(img image.Image) image.Image type Match + func NewFastMatch(target image.Image, template image.Image) (*Match, error) v1.0.1 Feb 9, 2021 Changes in this version + func DecodeBytes(bs []byte) (image.Image, error) v1.0.0 Feb 6, 2021 Changes in this version + var ErrorNotFound = errors.New("没找到") + var ErrorSize = errors.New("目标图片小于模板图片") + var ErrorType = errors.New("不支持的图片类型") + func Abs(i int) int + func Decode(file string) (image.Image, error) + func Distance(a image.Image, b image.Image) (int, error) + func Rect(img draw.Image, r image.Rectangle, c color.Color) + func Save(img image.Image, file string) error + func SubImage(img image.Image, r image.Rectangle) (image.Image, error) + type Dot struct + Distance int + X int + Y int + func (d *Dot) Space(o *Dot) int + func (d *Dot) String() string + type DotSet map[int64]struct + func (d DotSet) Add(x, y int) + func (d DotSet) Has(x, y int) (h bool) + type Dots []*Dot + func (d Dots) Len() int + func (d Dots) Less(i, j int) bool + func (d Dots) Match(size, distance int) Dots + func (d Dots) String() string + func (d Dots) Swap(i, j int) + func (d Dots) Top(size, distance int) Dots + type Match struct + Distance int + FuzzySize int + Ratio int + Size int + func NewMatch(target image.Image, template image.Image) (*Match, error) + func (m *Match) Match() ([]*Dot, error) + type StringSet map[string]struct + func (s StringSet) Add(str string) + func (s StringSet) Has(str string) (h bool)