Documentation ¶
Overview ¶
Package transforms provides the transformations for imagehash
Index ¶
- func DCT1D(input []float64) []float64
- func DCT2D(input [][]float64, w int, h int) [][]float64
- func DCT2DHash256(input *[]float64) [256]float64
- func DCT2DHash64(input *[]float64) [64]float64
- func FlattenPixels(pixels [][]float64, x int, y int) []float64
- func LinearTosRGB(value float64) int
- func MeanOfPixels(pixels []float64) float64
- func MedianOfPixels(pixels []float64) float64
- func MedianOfPixels256(pixels []float64) float64
- func MedianOfPixels64(pixels []float64) float64
- func OldYCbCR2Gray(colorImg *image.YCbCr, pixels []float64, s int)
- func PixelYCnCRGray(img *image.YCbCr, pixels []float64)
- func Rgb2Gray(colorImg image.Image) [][]float64
- func Rgb2GrayFast(colorImg image.Image, pixels *[]float64)
- func SRGBToLinear(value int) float64
- func SignPow(value, exp float64) float64
- func YCbCR2Gray(colorImg *image.YCbCr, 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 DCT2DHash256 ¶ added in v0.2.0
DCT2DHash256 function returns a result of DCT2D by using the seperable property. DCT type II, unscaled. Algorithm by Byeong Gi Lee, 1984. Cusstom built for Hash256. Returns flattened pixels
func DCT2DHash64 ¶ added in v0.2.0
DCT2DHash64 function returns a result of DCT2D by using the seperable property. DCT type II, unscaled. Algorithm by Byeong Gi Lee, 1984. Cusstom built for Hash64. Returns flattened pixels
func FlattenPixels ¶
FlattenPixels function flattens 2d array into 1d array.
func LinearTosRGB ¶ added in v0.2.0
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 MedianOfPixels256 ¶ added in v0.2.0
MedianOfPixels256 function returns a median value of pixels. It uses quick selection algorithm.
func MedianOfPixels64 ¶ added in v0.2.0
MedianOfPixels64 function returns a median value of pixels. It uses quick selection algorithm.
func OldYCbCR2Gray ¶ added in v0.2.0
OldYCbCR2Gray uses *image.YCbCr which is signifiantly faster than the image.Image interface.
func PixelYCnCRGray ¶ added in v0.2.0
func Rgb2GrayFast ¶
Rgb2GrayFast function converts RGB to a gray scale array.
func SRGBToLinear ¶ added in v0.2.0
func YCbCR2Gray ¶ added in v0.2.0
YCbCR2Gray uses *image.YCbCr which is signifiantly faster than the image.Image interface.
Types ¶
This section is empty.