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 ¶
GaussDenSig returns gaussian density for given value and sigma
Types ¶
type Filter ¶
type Filter struct { // is this filter active? On bool `desc:"is this filter active?"` // [viewif: On] how much relative weight does this filter have when combined with other filters Wt float32 `viewif:"On" desc:"how much relative weight does this filter have when combined with other filters"` // [def: 8] [viewif: On] overall gain multiplier applied after dog filtering -- only relevant if not using renormalization (otherwize it just gets renormed away) Gain float32 `` /* 163-byte string literal not displayed */ // [def: 1] [viewif: On] gain for the on component of filter, only relevant for color-opponent DoG's OnGain float32 `viewif:"On" def:"1" desc:"gain for the on component of filter, only relevant for color-opponent DoG's"` // [viewif: On] size of the overall filter -- number of pixels wide and tall for a square matrix used to encode the filter -- filter is centered within this square -- typically an even number, min effective size ~6 Size int `` /* 217-byte string literal not displayed */ // [viewif: On] how far apart to space the centers of the dog filters -- 1 = every pixel, 2 = every other pixel, etc -- high-res should be 1 or 2, lower res can be increments therefrom Spacing int `` /* 187-byte string literal not displayed */ // [def: 0.125] [viewif: On] gaussian sigma for the narrower On gaussian, in normalized units relative to Size OnSig float32 `viewif:"On" def:"0.125" desc:"gaussian sigma for the narrower On gaussian, in normalized units relative to Size"` // [def: 0.25] [viewif: On] gaussian sigma for the wider Off 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"` // [def: true] [viewif: On] cut off the filter (to zero) outside a circle of diameter = Size -- makes the filter more radially symmetric CircleEdge bool `` /* 138-byte string literal not displayed */ }
dog.Filter specifies a DoG Difference of Gaussians filter function.
func (*Filter) FilterTensor ¶
FilterTensor extracts the given filter subspace from set of 3 filters in input tensor 0 = On, 1 = Off, 2 = Net
func (*Filter) SetSize ¶
SetSize sets the size and spacing -- these are the main params that need to be varied for standard V1 dogs.
func (*Filter) ToTable ¶
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.