filter

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2017 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BesselJ1

func BesselJ1(x float64) float64

BesselJ1 implements the Bessel function of first kind and order. I realise this is actually implemented in the std lib too! www.atnf.csiro.au/computing/software/gipsy/sub/bessel.c ------------------------------------------------------------

PURPOSE: Evaluate Bessel function of first kind and order
         1 at input x

------------------------------------------------------------

Types

type AiryFilter

type AiryFilter struct {
	NodeDef  core.NodeDef `node:"-"`
	NodeName string       `node:"Name"`
	Width    float32      `node:",opt"`
	Res      int          `node:",opt"`
	Peak     float32      `node:",opt"`
	// contains filtered or unexported fields
}

AiryFilter implements the Airy filter model.

func (*AiryFilter) Def

func (f *AiryFilter) Def() core.NodeDef

Def is a core.Node method.

func (*AiryFilter) Name

func (f *AiryFilter) Name() string

Name is a core.Node method.

func (*AiryFilter) PostRender

func (f *AiryFilter) PostRender() error

PostRender is a core.Node method.

func (*AiryFilter) PreRender

func (f *AiryFilter) PreRender() error

PreRender is a core.Node method.

func (*AiryFilter) WarpSample

func (f *AiryFilter) WarpSample(r0, r1 float64) (u float64, v float64)

WarpSample implements core.PixelFilter.

type GaussianFilter

type GaussianFilter struct {
	NodeDef  core.NodeDef
	NodeName string `node:"Name"`
	Width    float32
	Res      int
	// contains filtered or unexported fields
}

GaussianFilter implements the Gaussian pixel filter.

func (*GaussianFilter) Def

func (f *GaussianFilter) Def() core.NodeDef

Def is a core.Node method.

func (*GaussianFilter) Name

func (f *GaussianFilter) Name() string

Name is a core.Node method.

func (*GaussianFilter) PostRender

func (f *GaussianFilter) PostRender() error

PostRender is a core.Node method.

func (*GaussianFilter) PreRender

func (f *GaussianFilter) PreRender() error

PreRender is a core.Node method.

func (*GaussianFilter) WarpSample

func (f *GaussianFilter) WarpSample(r0, r1 float64) (u float64, v float64)

WarpSample implements core.PixelFilter.

type Sampler

type Sampler struct {
	// contains filtered or unexported fields
}

Sampler implements 2D sampling using a filter function as PDF.

func CreateSampler

func CreateSampler(n int, w float64, f func(x, y float64) float64) (fil *Sampler)

CreateSampler will return a sampled version of the filter function given by f. w is the width of the filter (i.e. x in [-w/2,w/2]) n is the resolution of the sampling. The Sampler thus returned can be used to sample locations using the filter values as PDF.

func (*Sampler) WarpSample

func (fil *Sampler) WarpSample(r0, r1 float64) (u float64, v float64)

WarpSample warps the given sample in [0,1]x[0,1] by the filter PDF.

Jump to

Keyboard shortcuts

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