Documentation ¶
Overview ¶
Package blur provides functions for blurring images.
Index ¶
- func Box(in image.Image, radius int, style Style) image.Image
- func Convolve(in image.Image, weights Kernel, style Style) image.Image
- func Convolve2(in image.Image, a, b Kernel, style Style) image.Image
- func Gaussian(in image.Image, radius int, sigma float64, style Style) image.Image
- type Kernel
- type Style
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Kernel ¶
type Kernel [][]float64
A Kernel is a 2-dimensional array of ratios. A 1-dimensional, horizontal or vertical, kernel can easily be defined by a 2-dimensional array in the obvious manner. The weights are taken as row by column, so kernel[0] references the first row and kernel[i][0] (for all i) is the first column.
func NewKernel ¶
NewKernel creates a new Kernel of the dimensions given, it is populated by the given function which itself is passed the signed x and y offsets from the mid point.
func (Kernel) Normalised ¶
Normalised returns a copy of the Kernel where the sum of all entries is 1.
Click to show internal directories.
Click to hide internal directories.