Documentation ¶
Overview ¶
Package images allows image comparison by perceptual similarity. Supported image types are those default to the Go image package https://golang.org/pkg/image/ (which are GIF, JPEG and PNG in October 2018).
Index ¶
- func Gif(img *image.RGBA, path string)
- func Hash(img image.Image) (h []float32, imgSize image.Point)
- func Jpg(img *image.RGBA, path string, quality int)
- func Open(path string) (img image.Image, err error)
- func Png(img *image.RGBA, path string)
- func ResampleByNearest(inImg image.Image, outImgSize image.Point) (outImg image.RGBA, inImgSize image.Point)
- func Similar(hA, hB []float32, imgSizeA, imgSizeB image.Point) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Hash ¶
Hash calculates a slice of average color values of an image at the position of white pixels of a mask. One average value corresponds to one mask. The function also returns the original image width and height.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.