median

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GatherAndMedian

func GatherAndMedian(data []float32, index int32, mask []int32, buffer []float32) float32

Applies an element-wise Median filter to the sparse data points provided by the indices, with the local neighborhood defined by the mask, and stores the result in data

func MedianFilter3x3

func MedianFilter3x3(output, data []float32, width int32)

Applies 3x3 median filter to input data, assumed to be a 2D array with given line width, and stores results in output. Copies over the outermost rows and columns unchanged.

func MedianFilterLine3x3PureGo

func MedianFilterLine3x3PureGo(output, data []float32, width int32)

Input data is three lines of given width. Applies a 3x3 median filter to these. Stores results in the middle row of the output, which must have the same shape as the input. Does not touch first and last column

func MedianFloat32

func MedianFloat32(a []float32) float32

Calculates the median of a float32 slice Modifies the elements in place Array must not contain IEEE NaN

func MedianFloat32Slice9

func MedianFloat32Slice9(a []float32) float32

Calculates the median of a float32 slice of length nine Modifies the elements in place From https://stackoverflow.com/questions/45453537/optimal-9-element-sorting-network-that-reduces-to-an-optimal-median-of-9-network See also http://ndevilla.free.fr/median/median/src/optmed.c for other sizes Array must not contain IEEE NaN

Types

This section is empty.

Jump to

Keyboard shortcuts

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