dog

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: BSD-3-Clause Imports: 3 Imported by: 4

Documentation

Overview

package dog provides the Difference-of-Gaussians (DoG) filter for visual and other forms of signal processing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GaussDenSig

func GaussDenSig(x, sig float32) float32

GaussDenSig returns gaussian density for given value and sigma

Types

type Filter

type Filter struct {
	On         bool    `desc:"is this filter active?"`
	Wt         float32 `viewif:"On" desc:"how much relative weight does this filter have when combined with other filters"`
	Gain       float32 `` /* 163-byte string literal not displayed */
	OnGain     float32 `viewif:"On" def:"1" desc:"gain for the on component of filter, only relevant for color-opponent DoG's"`
	Size       int     `` /* 217-byte string literal not displayed */
	Spacing    int     `` /* 187-byte string literal not displayed */
	OnSig      float32 `viewif:"On" def:"0.125" desc:"gaussian sigma for the narrower On gaussian, in normalized units relative to Size"`
	OffSig     float32 `viewif:"On" def:"0.25" desc:"gaussian sigma for the wider Off gaussian, in normalized units relative to Size"`
	CircleEdge bool    `` /* 138-byte string literal not displayed */
}

dog.Filter specifies a DoG Difference of Gaussians filter function.

func (*Filter) Defaults

func (gf *Filter) Defaults()

func (*Filter) FilterTensor

func (gf *Filter) FilterTensor(tsr *etensor.Float32, filt Filters) *etensor.Float32

FilterTensor extracts the given filter subspace from set of 3 filters in input tensor 0 = On, 1 = Off, 2 = Net

func (*Filter) SetSize

func (gf *Filter) SetSize(sz, spc int)

SetSize sets the size and spacing -- these are the main params that need to be varied for standard V1 dogs.

func (*Filter) ToTable

func (gf *Filter) ToTable(tab *etable.Table)

ToTable renders filters into the given etable.Table setting a column named Version and a column named Filter to the filter for that version (on, off, net) This is useful for display and validation purposes.

func (*Filter) ToTensor

func (gf *Filter) ToTensor(tsr *etensor.Float32)

ToTensor renders dog filters into the given etable etensor.Tensor, setting dimensions to [3][Y][X] where Y = X = Size, and first one is On-filter, second is Off-filter, and third is Net On - Off

func (*Filter) Update

func (gf *Filter) Update()

type Filters

type Filters int

Filters is the type of filter

const (
	On Filters = iota
	Off
	Net
	FiltersN
)

Jump to

Keyboard shortcuts

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