effect

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package effect provides the functionality to manipulate images to achieve various looks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dilate added in v0.7.0

func Dilate(img image.Image, radius float64) *image.RGBA

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

func EdgeDetection(src image.Image, radius float64) *image.RGBA

EdgeDetection returns a copy of the image with its edges highlighted.

func Emboss

func Emboss(src image.Image) *image.RGBA

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

func Erode(img image.Image, radius float64) *image.RGBA

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

func Grayscale(img image.Image) *image.Gray

Grayscale returns a copy of the image in Grayscale using the weights 0.3R + 0.6G + 0.1B as a heuristic.

func Invert

func Invert(src image.Image) *image.RGBA

Invert returns a negated version of the image.

func Median

func Median(img image.Image, radius float64) *image.RGBA

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 Sepia added in v0.7.0

func Sepia(img image.Image) *image.RGBA

Sepia returns a copy of the image in Sepia tone.

func Sharpen

func Sharpen(src image.Image) *image.RGBA

Sharpen returns a sharpened copy of the image by detecting its edges and adding it to the original.

func Sobel

func Sobel(src image.Image) *image.RGBA

Sobel returns an image emphasising edges using an approximation to the Sobel–Feldman operator.

func UnsharpMask added in v0.10.0

func UnsharpMask(img image.Image, radius, amount float64) *image.RGBA

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL