kernels

package
v0.0.0-...-80e4855 Latest Latest
Warning

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

Go to latest
Published: May 9, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Laplacian = [][]float32{
	{-1, -1, -1, -1, -1},
	{-1, -1, -1, -1, -1},
	{-1, -1, 24, -1, -1},
	{-1, -1, -1, -1, -1},
	{-1, -1, -1, -1, -1},
}
View Source
var SepSobelXPt1 = [][]float32{
	{1},
	{2},
	{1},
}
View Source
var SepSobelXPt2 = [][]float32{
	{-1, 0, 1},
}
View Source
var SepSobelYPt1 = [][]float32{
	{1, 2, 1},
}
View Source
var SepSobelYPt2 = [][]float32{
	{-1},
	{0},
	{1},
}
View Source
var SobelX = [][]float32{
	{-1, 0, 1},
	{-2, 0, 2},
	{-1, 0, 1},
}
View Source
var SobelY = [][]float32{
	{-1, -2, -1},
	{0, 0, 0},
	{1, 2, 1},
}

Functions

func BinaryErosionDilationStructuringElement

func BinaryErosionDilationStructuringElement(size int) [][]float32

* Generates a structuring element for use in binary morphological operations * (It's just a load of 1s in a matrix of a given size)

func Gaussian

func Gaussian(size int, sigma float32) [][]float32

* Generates a Gaussian kernel of a given size and standard deviation

func NormaliseKernel

func NormaliseKernel(kernel [][]float32) [][]float32

* Nornalises a kernel by ensuring that all of its elements sum to 1

Types

This section is empty.

Jump to

Keyboard shortcuts

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