Documentation ¶
Index ¶
- func AbsoluteError(a [][]float32, b [][]float32) (float32, float32, float32)
- func Acos(image [][]float32) [][]float32
- func AddImage(a [][]float32, b [][]float32, normalise bool) ([][]float32, error)
- func AddScalar(a [][]float32, b float32, normalise bool) ([][]float32, error)
- func Asin(image [][]float32) [][]float32
- func Atan(image [][]float32) [][]float32
- func BinaryClosing(image [][]float32, size int) [][]float32
- func BinaryDilation(image [][]float32, size int) [][]float32
- func BinaryErosion(image [][]float32, size int) [][]float32
- func BinaryOpening(image [][]float32, size int) [][]float32
- func Convolution(image [][]float32, kernel [][]float32, normalise bool) [][]float32
- func Cos(image [][]float32) [][]float32
- func CrossCorrelation(a [][]float32, b [][]float32) float32
- func Dimensions(image [][]float32) (int, int)
- func DivideImage(a [][]float32, b [][]float32, normalise bool) ([][]float32, error)
- func DivideScalar(a [][]float32, b float32, normalise bool) ([][]float32, error)
- func DualThreshold(image [][]float32, thresholdA float32, thresholdB float32) [][]float32
- func GradientMagnitude(image [][]float32) [][]float32
- func HysteresisThreshold(image [][]float32, thresholdA float32, thresholdB float32) [][]float32
- func Image2Slice(img image.Image) [][]float32
- func Invert(image [][]float32) [][]float32
- func L2Norm(signature []int) float32
- func LoadImage(path string) ([][]float32, error)
- func Mask(image [][]float32, mask [][]float32) ([][]float32, error)
- func MeanStd(image [][]float32) (float32, float32)
- func MinMax(image [][]float32) (float32, float32)
- func MultiplyImage(a [][]float32, b [][]float32, normalise bool) ([][]float32, error)
- func MultiplyScalar(a [][]float32, b float32, normalise bool) ([][]float32, error)
- func Normalise(image [][]float32) [][]float32
- func PixelOrientation(image [][]float32) [][]float32
- func RGBA2Gray16(img image.Image) image.Image
- func SaveImage(path string, image [][]float32) error
- func SepConvolution(image [][]float32, kernelA [][]float32, kernelB [][]float32, normalise bool) [][]float32
- func SignatureDifference(sigA []int, sigB []int) float32
- func SignatureVector(image [][]float32) []int
- func Sin(image [][]float32) [][]float32
- func SingleThreshold(image [][]float32, threshold float32) [][]float32
- func Slice2Image(slice [][]float32) (image.Image, error)
- func Sqrt(image [][]float32, normalise bool) [][]float32
- func SquareError(a [][]float32, b [][]float32) (float32, float32, float32)
- func SubImage(image [][]float32, topLeftX int, topLeftY int, width int, height int) [][]float32
- func SubtractImage(a [][]float32, b [][]float32, normalise bool) ([][]float32, error)
- func SubtractScalar(a [][]float32, b float32, normalise bool) ([][]float32, error)
- func Tan(image [][]float32) [][]float32
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbsoluteError ¶
* Calculates the Root Mean Absolute Error (RMAE), Mean Absolute Error (MAE), Sum Absolute Error (SAE) of two images * These metrics are combined into one function for computational efficiency
func Acos ¶
* Calculates the pixelwise arccosine of an image * The output is normalised in the range 0-1 (inclusive), while preserving dynamic range
func AddImage ¶
* Calculates the pixelwise sum of two images * The output is normalised in the range 0-1 (inclusive), while preserving dynamic range
func AddScalar ¶
* Calculates the sum of an image and a scalar * The output is normalised in the range 0-1 (inclusive), while preserving dynamic range, if the normalise arg is true
func Asin ¶
* Calculates the pixelwise arcsine of an image * The output is normalised in the range 0-1 (inclusive), while preserving dynamic range
func Atan ¶
* Calculates the pixelwise arctangent of an image * The output is normalised in the range 0-1 (inclusive), while preserving dynamic range
func BinaryClosing ¶
* Performs morphological closing of a binarised image
func BinaryDilation ¶
* Performs morphological dilation of a binarised image
func BinaryErosion ¶
* Performs morphological erosion of a binarised image
func BinaryOpening ¶
* Performs morphological opening of a binarised image
func Convolution ¶
* Applies a kernel convolution to an image
func Cos ¶
* Calculates the pixelwise cosine of an image * The output is normalised in the range 0-1 (inclusive), while preserving dynamic range
func CrossCorrelation ¶
* Calculates the Zero-Normalised CrossCorrelation (ZNCC) of two images
func Dimensions ¶
* Returns the width and height of an image
func DivideImage ¶
* Calculates the pixelwise quotient of two images * The output is normalised in the range 0-1 (inclusive), while preserving dynamic range
func DivideScalar ¶
* Calculates the quotient of an image and a scalar * The output is normalised in the range 0-1 (inclusive), while preserving dynamic range, if the normalise arg is true
func DualThreshold ¶
* Thresholds an image with 2 thresholds * White pixel if it's between the thresholds, otherwise black
func GradientMagnitude ¶
* Calculates the gradient magnitude at each pixel in an image
func HysteresisThreshold ¶
func Image2Slice ¶
* Takes an Image and converts it to a 2D slice of 32-bit floating points * Also converts the image to grayscale and normialises all pixels in the range 0-1 (inclusive)
func MeanStd ¶
* Calculates the mean and (population) standard deviation of an image * The two metrics are combined because the mean is needed to calculate the std, so it is more efficient to calculate them both together
func MultiplyImage ¶
* Calculates the pixelwise product of two images * The output is normalised in the range 0-1 (inclusive), while preserving dynamic range
func MultiplyScalar ¶
* Calculates the product of an image and a scalar * The output is normalised in the range 0-1 (inclusive), while preserving dynamic range, if the normalise arg is true
func Normalise ¶
* Normalises all pixel values in the range 0-1 inclusive, while preserving dynamic range
func PixelOrientation ¶
* Calculates the orientation of each pixel in an image
func SepConvolution ¶
func SepConvolution(image [][]float32, kernelA [][]float32, kernelB [][]float32, normalise bool) [][]float32
* Applies a separated kernel convolution to an image
func SignatureDifference ¶
* Calculates the normalised difference between two signature vectors * Distance from A to B is always the same as distance from B to A
func SignatureVector ¶
* Computes a signature of an image using the algorithm described in https://doi.org/10.1109/ICIP.2002.1038047
func Sin ¶
* Calculates the pixelwise sine of an image * The output is normalised in the range 0-1 (inclusive), while preserving dynamic range
func SingleThreshold ¶
* Thresholds an image with a single threshold
func Slice2Image ¶
* Takes a 2D slice of floating points representing a grayscale image and returns an Image * Note that all pixel values are assumed to be normalised in the range 0-1, so they are all multiplied by the maximum pixel value (65536), so the image can be displayed
func Sqrt ¶
* Calculates the pixelwise square root of an image * The output is normalised in the range 0-1 (inclusive), while preserving dynamic range
func SquareError ¶
* Calculates the Root Mean Square Error (RMSE), Mean Square Error (MSE), Sum Square Error (SSE) of two images * These metrics are combined into one function for computational efficiency
func SubImage ¶
* Returns a subset of an image. Sometimes called a region of interest (ROI) * Any pixels in the sub-image that go off the edge of the original are set to 0, so no panic condition is generated
func SubtractImage ¶
* Calculates the pixelwise difference of two images * The output is normalised in the range 0-1 (inclusive), while preserving dynamic range
func SubtractScalar ¶
* Calculates the difference of an image and a scalar * The output is normalised in the range 0-1 (inclusive), while preserving dynamic range, if the normalise arg is true
Types ¶
This section is empty.