Documentation
¶
Index ¶
- Constants
- Variables
- func Binarize(in, out *Matrix)
- func Convolute(k Kernel, in, out *Matrix)
- func DeferredConvolution(k Kernel, in, out *Matrix) *sync.WaitGroup
- func NewDirectionalKernel(gx, gy *Matrix) *directionalKernel
- func NewFilteredDirectional(gx, gy *Matrix, offset int) *filteredDirectional
- func NewKernelMatrixMul(a, b *Matrix, offset int) *matrixMulKernel
- func NewVarianceKernel(directional *Matrix, offset int) *varianceKernel
- func Normalize(in, out *Matrix)
- func ParallelConvolution(k Kernel, in, out *Matrix) *sync.WaitGroup
- func Skeletonize(in *Matrix)
- type Condition
- type ConditionBottomBorder
- type ConditionLeftBorder
- type ConditionRightBorder
- type ConditionTopBorder
- type Kernel
- type Matrix
- type Sqrt
Constants ¶
View Source
const BLACK = 0
View Source
const WHITE = 255
Variables ¶
View Source
var ( SobelDx = &sobel{mat: [3][3]float64{{-1, 0, 1}, {-2, 0, 2}, {-1, 0, 1}}} SobelDy = &sobel{mat: [3][3]float64{{-1, -2, -1}, {0, 0, 0}, {1, 2, 1}}} )
Functions ¶
func NewDirectionalKernel ¶
func NewDirectionalKernel(gx, gy *Matrix) *directionalKernel
func NewFilteredDirectional ¶
func NewKernelMatrixMul ¶
func NewVarianceKernel ¶
func Skeletonize ¶
func Skeletonize(in *Matrix)
Types ¶
type ConditionBottomBorder ¶
type ConditionBottomBorder int
func (*ConditionBottomBorder) Holds ¶
func (c *ConditionBottomBorder) Holds(p0, p1, p2, p3, p4, p5, p6, p7 bool) bool
type ConditionLeftBorder ¶
type ConditionLeftBorder int
func (*ConditionLeftBorder) Holds ¶
func (c *ConditionLeftBorder) Holds(p0, p1, p2, p3, p4, p5, p6, p7 bool) bool
type ConditionRightBorder ¶
type ConditionRightBorder int
func (*ConditionRightBorder) Holds ¶
func (c *ConditionRightBorder) Holds(p0, p1, p2, p3, p4, p5, p6, p7 bool) bool
type ConditionTopBorder ¶
type ConditionTopBorder int
func (*ConditionTopBorder) Holds ¶
func (c *ConditionTopBorder) Holds(p0, p1, p2, p3, p4, p5, p6, p7 bool) bool
type Matrix ¶
type Matrix struct {
// contains filtered or unexported fields
}
func BinarizeEnhancement ¶
func NewMatrixFromGray ¶
Click to show internal directories.
Click to hide internal directories.