Documentation ¶
Overview ¶
Package transforms provides the transformations for imagehash
Index ¶
- func DCT1D(input []float64) []float64
- func DCT1DFast(input []float64) []float64
- func DCT1DFast64(input []float64)
- func DCT2D(input [][]float64, w int, h int) [][]float64
- func DCT2DFast(input *[]float64)
- func FlattenPixels(pixels [][]float64, x int, y int) []float64
- func FlattenPixelsFast64(pixels []float64, x int, y int) []float64
- func MeanOfPixels(pixels []float64) float64
- func MedianOfPixels(pixels []float64) float64
- func MedianOfPixelsFast(pixels []float64) float64
- func Rgb2Gray(colorImg image.Image) [][]float64
- func Rgb2GrayFast(colorImg image.Image, pixels *[]float64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DCT1D ¶
DCT1D function returns result of DCT-II. DCT type II, unscaled. Algorithm by Byeong Gi Lee, 1984.
func DCT1DFast ¶
DCT1DFast function returns result of DCT-II. DCT type II, unscaled. Algorithm by Byeong Gi Lee, 1984.
func DCT1DFast64 ¶
func DCT1DFast64(input []float64)
func DCT2DFast ¶
func DCT2DFast(input *[]float64)
DCT2DFast function returns a result of DCT2D by using the seperable property. Fast version only works with pHashSize 64 will panic if another since is given.
func FlattenPixels ¶
FlattenPixels function flattens 2d array into 1d array.
func FlattenPixelsFast64 ¶
FlattenPixelsFast64 function flattens pixels array from DCT2D into [64]float array.
func MeanOfPixels ¶
MeanOfPixels function returns a mean of pixels.
func MedianOfPixels ¶
MedianOfPixels function returns a median value of pixels. It uses quick selection algorithm.
func MedianOfPixelsFast ¶
MedianOfPixelsFast function returns a median value of pixels. It uses quick selection algorithm.
func Rgb2GrayFast ¶
Rgb2GrayFast function converts RGB to a gray scale array.
Types ¶
This section is empty.