Documentation ¶
Index ¶
- func BinaryThreshold(c color.Color, t float64) color.Color
- func BlurImage(src image.Image, dst *image.RGBA, radius int) error
- func ColorToGrayscale(c color.Color) float64
- func ColorToRgba(c color.Color) color.RGBA
- func CreateFileWithTree(path string) (*os.File, error)
- func ExportImageAsPng(path string, img image.Image) error
- func GetColorBrightness(c color.Color) float64
- func GetColorDifference(a, b color.Color) float64
- func Max(x []float64) float64
- func Mean(x []float64) float64
- func MinInt(x, y int) int
- func MovingMean(x []float64, position, bias int) float64
- func ScaleImage(src, dst *image.RGBA, factor float64) error
- func StandardDeviation(x []float64) float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinaryThreshold ¶
Perform a binary threshold on a given color with specfied cutoff threshold and returna black or white color.
func BlurImage ¶
Perform a "stackblur" blurring on the source image with a specified radius parameter and store the result to the destination image pointer.
func ColorToGrayscale ¶
Convert a color to grayscale represented as a value from zero to one.
func ColorToRgba ¶
Convert the provided color represented by the color.Color interface to the color.RGBA struct instance.
func CreateFileWithTree ¶
Create the whole path directory tree and the final file.
func ExportImageAsPng ¶
Create a new png file at the given path and encode the specified image into it.
func GetColorBrightness ¶
Calculate the brightness of the color represented as a value from zero to one.
func GetColorDifference ¶
Calculate the difference between two colors represented as a value from zero to one using the mean of RGB components difference.
func MinInt ¶
Return the smaller value of x or y. This functions does not support the edge cases like math.Min
func MovingMean ¶
Calculate the moving mean value of the provided set. The position paramter is the index of the central subset element and the bias is the amount of "left" and "right" neighbours. Elements out of index are not taken under account.
func ScaleImage ¶
Perform a scaling process by a given factor on the RGBA image provided by the src pointer and store the result to the RGBA image specified by the dst pointer.
func StandardDeviation ¶
Calculate the population standard deviation value of the provided set. Panic if the value set is empty.
Types ¶
This section is empty.