Documentation ¶
Overview ¶
Package effect provides the functionality to manipulate images to achieve various looks.
Index ¶
- func Dilate(img image.Image, radius float64) *image.RGBA
- func EdgeDetection(src image.Image, radius float64) *image.RGBA
- func Emboss(src image.Image) *image.RGBA
- func Erode(img image.Image, radius float64) *image.RGBA
- func Grayscale(img image.Image) *image.Gray
- func Invert(src image.Image) *image.RGBA
- func Median(img image.Image, radius float64) *image.RGBA
- func Sepia(img image.Image) *image.RGBA
- func Sharpen(src image.Image) *image.RGBA
- func Sobel(src image.Image) *image.RGBA
- func UnsharpMask(img image.Image, radius, amount float64) *image.RGBA
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dilate ¶ added in v0.7.0
Dilate picks the local maxima from the neighbors of each pixel and returns the resulting image. The parameter radius corresponds to the radius of the neighbor area to be searched, for example a radius of R will result in a search window length of 2R+1 for each dimension.
func EdgeDetection ¶
EdgeDetection returns a copy of the image with its edges highlighted.
func Emboss ¶
Emboss returns a copy of the image in which each pixel has been replaced either by a highlight or a shadow representation.
func Erode ¶ added in v0.7.0
Erode picks the local minima from the neighbors of each pixel and returns the resulting image. The parameter radius corresponds to the radius of the neighbor area to be searched, for example a radius of R will result in a search window length of 2R+1 for each dimension.
func Grayscale ¶
Grayscale returns a copy of the image in Grayscale using the weights 0.3R + 0.6G + 0.1B as a heuristic.
func Median ¶
Median returns a new image in which each pixel is the median of its neighbors. The parameter radius corresponds to the radius of the neighbor area to be searched, for example a radius of R will result in a search window length of 2R+1 for each dimension.
func Sharpen ¶
Sharpen returns a sharpened copy of the image by detecting its edges and adding it to the original.
func Sobel ¶
Sobel returns an image emphasising edges using an approximation to the Sobel–Feldman operator.
func UnsharpMask ¶ added in v0.10.0
UnsharpMask returns a copy of the image with its high-frecuency components amplified. Parameter radius corresponds to the radius to be samples per pixel. Parameter amount is the normalized strength of the effect. A value of 0.0 will leave the image untouched and a value of 1.0 will fully apply the unsharp mask.
Types ¶
This section is empty.