convolution

package
v0.0.0-...-ed1255c Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorAccumulator

func ColorAccumulator(acc, add, sub drawgl.FloatColor, coeff drawgl.ColorValue, channel drawgl.Channel) drawgl.FloatColor

func NewBoxBlurLinker

func NewBoxBlurLinker(opts BoxBlurOptions) (graph.Linker, error)

func NewConvolutionLinker

func NewConvolutionLinker(opts ConvolutionOptions) (graph.Linker, error)

func NormalizeData

func NormalizeData(data []float32) (normalized []drawgl.ColorValue, offset drawgl.ColorValue)

Types

type BoxBlur

type BoxBlur struct {
	base.Node
	// contains filtered or unexported fields
}

func (BoxBlur) Process

func (n BoxBlur) Process(wd graph.WalkData, buffers map[graph.ConnectorName]drawgl.Result, output chan<- drawgl.Result)

type BoxBlurOptions

type BoxBlurOptions struct {
	Radius  int
	Channel drawgl.Channel
	Mask    drawgl.Mask
	Linear  bool
}

type Convolution

type Convolution struct {
	base.Node
	// contains filtered or unexported fields
}

func (Convolution) Process

func (n Convolution) Process(wd graph.WalkData, buffers map[graph.ConnectorName]drawgl.Result, output chan<- drawgl.Result)

type ConvolutionOptions

type ConvolutionOptions struct {
	Kernel    Kernel
	Channel   drawgl.Channel
	Normalize bool
	Mask      drawgl.Mask
	Linear    bool
}

type HVKernel

type HVKernel interface {
	HWeights() []drawgl.ColorValue
	VWeights() []drawgl.ColorValue
	HNormalized() ([]drawgl.ColorValue, drawgl.ColorValue)
	VNormalized() ([]drawgl.ColorValue, drawgl.ColorValue)
}

func NewHVKernel

func NewHVKernel(h, v []float32) (k HVKernel, err error)

type Kernel

type Kernel interface {
	Weights() []drawgl.ColorValue
	Normalized() ([]drawgl.ColorValue, drawgl.ColorValue)
}

func NewKernel

func NewKernel(data []float32) (k Kernel, err error)

Jump to

Keyboard shortcuts

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