Package boofcv.alg.filter.kernel
Class KernelMath
java.lang.Object
boofcv.alg.filter.kernel.KernelMath
Operations for manipulating different convolution kernels.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidconvert(double[] input, int[] output, int size, double minFrac) static voidconvert(float[] input, int[] output, int size, float minFrac) static Kernel1D_S32convert(Kernel1D_F32 original, float minFrac) static Kernel1D_S32convert(Kernel1D_F64 original, double minFrac) static Kernel2D_S32convert(Kernel2D_F32 original, float minFrac) static GrayF32convertToImage(Kernel2D_F32 kernel) static GrayS32convertToImage(Kernel2D_S32 kernel) static Kernel2D_F32convertToKernel(GrayF32 image) static Kernel2D_S32convertToKernel(GrayI image) static Kernel1Dconvolve1D(Kernel1D a, Kernel1D b) static Kernel1D_F32static Kernel1D_S32static Kernel2D_F32Convolve two 1D kernels together to form a 2D kernel.static Kernel2D_F64Convolve two 1D kernels together to form a 2D kernel.static Kernel2D_S32Convolve two 1D kernels together to form a 2D kernel.static Kernel2Dconvolve2D(Kernel1D a, Kernel1D b) Convolve two 1D kernels together to form a 2D kernel.static Kernel2D_F32static Kernel2D_S32static Kernel2Dconvolve2D(Kernel2D a, Kernel2D b) static voidconvolveSmooth(Kernel1D_F32 kernel, float[] src, float[] dst, int length) Applies a smoothing kernel the the array.static voiddivide(Kernel1D_F32 kernel, float value) static voiddivide(Kernel1D_F64 kernel, double value) static voiddivide(Kernel2D_F32 kernel, float value) static voiddivide(Kernel2D_F64 kernel, double value) static voidfill(Kernel2D_F32 kernel, float value) static voidfill(Kernel2D_S32 kernel, int value) static booleanisEquals(float[] expected, float[] found, int size, float tol) static booleanisEquals(int[] expected, int[] found, int size) static booleanisEqualsFrac(float[] expected, float[] found, int size, float fracTol, float zero) static doublemaxAbs(double[] data, int size) static floatmaxAbs(float[] data, int size) static doubleminAbs(double[] data, int size, double minValue) static floatminAbs(float[] data, int size, float minValue) static voidnormalizeAbsSumToOne(Kernel2D_F32 kernel) Normalizes the array such that the absolute value sums up to one.static voidnormalizeF(Kernel2D_F64 kernel) static voidnormalizeMaxOne(Kernel2D_F64 kernel) Normalizes it such that the largest element is equal to onestatic voidnormalizeSumToOne(Kernel1D_F32 kernel) Normalizes the array such that it sums up to one.static voidnormalizeSumToOne(Kernel1D_F64 kernel) static voidnormalizeSumToOne(Kernel2D_F32 kernel) Normalizes the array such that it sums up to one.static voidnormalizeSumToOne(Kernel2D_F64 kernel) static voidscale(Kernel1D_F32 kernel, float value) static voidscale(Kernel1D_F64 kernel, double value) static floatsum(Kernel2D_F32 kernel) static doublesum(Kernel2D_F64 kernel) static Kernel2D_F32static Kernel2D_S32
-
Constructor Details
-
KernelMath
public KernelMath()
-
-
Method Details
-
scale
-
scale
-
divide
-
divide
-
divide
-
divide
-
fill
-
fill
-
transpose
-
transpose
-
convolve1D
-
convolve1D_I32
-
convolve1D_F32
-
convolveSmooth
Applies a smoothing kernel the the array. The kernel must sum to 1. Array borders are handling by normalizing based on the overlap of the kernel with the image at that point- Parameters:
kernel- Smothing kernel that sums to 1src- Input arraydst- Output arraylength- Effective length of the array
-
convolve2D
-
convolve2D
-
convolve2D
-
convolve2D
Convolve two 1D kernels together to form a 2D kernel.- Parameters:
a- Input vertical 1D kernelb- Input horizontal 1D kernel- Returns:
- Resulting 2D kernel
-
convolve2D
Convolve two 1D kernels together to form a 2D kernel.- Parameters:
a- Input vertical 1D kernelb- Input horizontal 1D kernel- Returns:
- Resulting 2D kernel
-
convolve2D
Convolve two 1D kernels together to form a 2D kernel.- Parameters:
a- Input vertical 1D kernelb- Input horizontal 1D kernel- Returns:
- Resulting 2D kernel
-
convolve2D
Convolve two 1D kernels together to form a 2D kernel.- Parameters:
a- Input vertical 1D kernelb- Input horizontal 1D kernel- Returns:
- Resulting 2D kernel
-
normalizeSumToOne
Normalizes the array such that it sums up to one.- Parameters:
kernel- The kernel being normalized.
-
normalizeSumToOne
-
normalizeSumToOne
Normalizes the array such that it sums up to one.- Parameters:
kernel- The kernel being normalized.
-
normalizeSumToOne
-
normalizeAbsSumToOne
Normalizes the array such that the absolute value sums up to one.- Parameters:
kernel- The kernel being normalized.
-
sum
-
sum
-
normalizeF
-
normalizeMaxOne
Normalizes it such that the largest element is equal to one -
convertToImage
-
convertToImage
-
convertToKernel
-
convertToKernel
-
convert
-
convert
-
convert
-
convert
public static void convert(float[] input, int[] output, int size, float minFrac) -
convert
public static void convert(double[] input, int[] output, int size, double minFrac) -
maxAbs
public static float maxAbs(float[] data, int size) -
maxAbs
public static double maxAbs(double[] data, int size) -
minAbs
public static float minAbs(float[] data, int size, float minValue) -
minAbs
public static double minAbs(double[] data, int size, double minValue) -
isEqualsFrac
public static boolean isEqualsFrac(float[] expected, float[] found, int size, float fracTol, float zero) -
isEquals
public static boolean isEquals(float[] expected, float[] found, int size, float tol) -
isEquals
public static boolean isEquals(int[] expected, int[] found, int size)
-