sgrad

package
v0.0.0-...-1b03cc8 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package sgrad provides facilities for the computation of a finite-difference gradient image from a source SippImage and a 2x2 kernel. There are two versions, one using float64s and complex128s, and another using int32s. The latter makes it easier to guarantee bit accuracy and numerical stability. It is not intended as a performance optimisation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fdgrad

func Fdgrad(src SippImage) (grad *ComplexImage)

Use a default SippGradKernel to compute a finite-differences gradient. See FdgradKernel for details.

func FdgradInt32

func FdgradInt32(src SippImage) (grad *ComplexInt32Image)

Use a default SippGradInt32Kernel to compute a finite-differences gradient. See FdgradInt32Kernel for details.

func FdgradInt32Kernel

func FdgradInt32Kernel(src SippImage,
	kern SippGradInt32Kernel) (grad *ComplexInt32Image)

Use a SippGradInt32Kernel to create a finite-differences ComplexInt32 gradient image, one pixel narrower and shorter than the original. We'd rather reduce the size of the output image than arbitrarily wrap around or extend the source image, as any such procedure could introduce errors into the statistics.

func FdgradKernel

func FdgradKernel(src SippImage, kern SippGradKernel) (grad *ComplexImage)

Use a SippGradKernel to create a finite-differences complex gradient image, one pixel narrower and shorter than the original. We'd rather reduce the size of the output image than arbitrarily wrap around or extend the source image, as any such procedure could introduce errors into the statistics.

Types

type SippGradInt32Kernel

type SippGradInt32Kernel [2][2]ComplexInt32

type SippGradKernel

type SippGradKernel [2][2]complex128

SippGradKernels are 2x2 arrays of complex numbers, defined in the same way as images are stored in memory, i.e. in row-major order from the top-left corner down.

Jump to

Keyboard shortcuts

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