gblur

package
v0.0.0-...-27d64f3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoundReflection

func BoundReflection(idx, min, max int) int

BoundReflection returns a reflected index on the interval [min, max)

func Convolve

func Convolve(img image.NRGBA, filter [][]float64) *image.NRGBA

Convolve apply the specified filter to the image with a 2D convolution (One gouroutine per CPU)

func ConvolvePixel

func ConvolvePixel(img image.NRGBA, x, y int, filter [][]float64) color.NRGBA

ConvolvePixel apply the specified filter to the pixel at coordinates (x, y) (sequential)

func GaussianKernel

func GaussianKernel(sz int, sigma float64) [][]float64

GaussianKernel returns a gaussian filter of size sz x sz with sigma standard deviation

func ToNRGBA

func ToNRGBA(img image.Image) *image.NRGBA

ToNRGBA creates a copy of img converting its format in NRGBA (non-alpha-premultiplied 32-bit color)

Types

This section is empty.

Jump to

Keyboard shortcuts

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