Package boofcv.factory.filter.kernel
Class FactoryKernelGaussian
- java.lang.Object
-
- boofcv.factory.filter.kernel.FactoryKernelGaussian
-
public class FactoryKernelGaussian extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description FactoryKernelGaussian()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends boofcv.struct.convolve.Kernel1D>
Tderivative(int order, boolean isFloat, double sigma, int radius)Creates a 1D Gaussian kernel with the specified properties.protected static boofcv.struct.convolve.Kernel1D_F32derivative1D_F32(int order, double sigma, int radius, boolean normalize)Computes the derivative of a Gaussian kernel.static <T extends boofcv.struct.image.ImageGray<T>,K extends boofcv.struct.convolve.Kernel1D>
KderivativeI(java.lang.Class<T> imageType, int order, double sigma, int radius)static <T extends boofcv.struct.convolve.Kernel1D>
TderivativeK(java.lang.Class<T> kernelType, int order, double sigma, int radius)static <T extends boofcv.struct.convolve.KernelBase>
Tgaussian(int DOF, boolean isFloat, int numBits, double sigma, int radius)Creates a Gaussian kernel with the specified properties.static <T extends boofcv.struct.convolve.KernelBase>
Tgaussian(java.lang.Class<T> kernelType, double sigma, int radius)Creates a Gaussian kernel of the specified type.static <T extends boofcv.struct.image.ImageGray<T>,K extends boofcv.struct.convolve.Kernel1D>
Kgaussian1D(java.lang.Class<T> imageType, double sigma, int radius)Creates a 1D Gaussian kernel of the specified type.protected static boofcv.struct.convolve.Kernel1D_F32gaussian1D_F32(double sigma, int radius, boolean odd, boolean normalize)Creates a floating point Gaussian kernel with the sigma and radius.protected static boofcv.struct.convolve.Kernel1D_F64gaussian1D_F64(double sigma, int radius, boolean odd, boolean normalize)static <T extends boofcv.struct.image.ImageGray<T>,K extends boofcv.struct.convolve.Kernel2D>
Kgaussian2D(boofcv.struct.image.ImageDataType imageType, double sigma, int radius)static <T extends boofcv.struct.image.ImageGray<T>,K extends boofcv.struct.convolve.Kernel2D>
Kgaussian2D(java.lang.Class<T> imageType, double sigma, int radius)Creates a 2D Gaussian kernel of the specified type.static boofcv.struct.convolve.Kernel2D_F32gaussian2D_F32(double sigma, int radius, boolean odd, boolean normalize)Creates a kernel for a 2D convolution.static boofcv.struct.convolve.Kernel2D_F32gaussian2D_F32(double sigmaX, int radiusX, boolean oddX, double sigmaY, int radiusY, boolean oddY, boolean normalize)static boofcv.struct.convolve.Kernel2D_F64gaussian2D_F64(double sigma, int radius, boolean odd, boolean normalize)static boofcv.struct.convolve.Kernel2D_F64gaussian2D_F64(double sigmaX, int radiusX, boolean oddX, double sigmaY, int radiusY, boolean oddY, boolean normalize)static boofcv.struct.convolve.Kernel2D_F64gaussianWidth(double sigma, int width)Create a gaussian kernel based on its width.static intradiusForSigma(double sigma, int order)Given the the sigma of a Gaussian distribution and the order of its derivative, choose an appropriate radius.static doublesigmaForRadius(double radius, int order)Given the the radius of a Gaussian distribution and the order of its derivative, choose an appropriate sigma.
-
-
-
Method Detail
-
gaussian
public static <T extends boofcv.struct.convolve.KernelBase> T gaussian(java.lang.Class<T> kernelType, double sigma, int radius)Creates a Gaussian kernel of the specified type.- Parameters:
kernelType- The type of kernel which is to be created.sigma- The distributions stdev. If ≤ 0 then the sigma will be computed from the radius.radius- Number of pixels in the kernel's radius. If ≤ 0 then the sigma will be computed from the sigma.- Returns:
- The computed Gaussian kernel.
-
gaussian1D
public static <T extends boofcv.struct.image.ImageGray<T>,K extends boofcv.struct.convolve.Kernel1D> K gaussian1D(java.lang.Class<T> imageType, double sigma, int radius)Creates a 1D Gaussian kernel of the specified type.- Parameters:
imageType- The type of image which is to be convolved by this kernel.sigma- The distributions stdev. If ≤ 0 then the sigma will be computed from the radius.radius- Number of pixels in the kernel's radius. If ≤ 0 then the sigma will be computed from the sigma.- Returns:
- The computed Gaussian kernel.
-
gaussian2D
public static <T extends boofcv.struct.image.ImageGray<T>,K extends boofcv.struct.convolve.Kernel2D> K gaussian2D(java.lang.Class<T> imageType, double sigma, int radius)Creates a 2D Gaussian kernel of the specified type.- Parameters:
imageType- The type of image which is to be convolved by this kernel.sigma- The distributions stdev. If ≤ 0 then the sigma will be computed from the radius.radius- Number of pixels in the kernel's radius. If ≤ 0 then the sigma will be computed from the sigma.- Returns:
- The computed Gaussian kernel.
-
gaussian2D
public static <T extends boofcv.struct.image.ImageGray<T>,K extends boofcv.struct.convolve.Kernel2D> K gaussian2D(boofcv.struct.image.ImageDataType imageType, double sigma, int radius)
-
gaussian
public static <T extends boofcv.struct.convolve.KernelBase> T gaussian(int DOF, boolean isFloat, int numBits, double sigma, int radius)Creates a Gaussian kernel with the specified properties.- Parameters:
DOF- 1 for 1D kernel and 2 for 2D kernel.isFloat- True for F32 kernel and false for I32.numBits- Number of bits in each data element. 32 or 64sigma- The distributions stdev. If ≤ 0 then the sigma will be computed from the radius.radius- Number of pixels in the kernel's radius. If ≤ 0 then the sigma will be computed from the sigma. @return The computed Gaussian kernel.
-
derivativeI
public static <T extends boofcv.struct.image.ImageGray<T>,K extends boofcv.struct.convolve.Kernel1D> K derivativeI(java.lang.Class<T> imageType, int order, double sigma, int radius)
-
derivativeK
public static <T extends boofcv.struct.convolve.Kernel1D> T derivativeK(java.lang.Class<T> kernelType, int order, double sigma, int radius)
-
derivative
public static <T extends boofcv.struct.convolve.Kernel1D> T derivative(int order, boolean isFloat, double sigma, int radius)Creates a 1D Gaussian kernel with the specified properties.- Parameters:
order- The order of the gaussian derivative.isFloat- True for F32 kernel and false for I32.sigma- The distributions stdev. If ≤ 0 then the sigma will be computed from the radius.radius- Number of pixels in the kernel's radius. If ≤ 0 then the sigma will be computed from the sigma.- Returns:
- The computed Gaussian kernel.
-
gaussian1D_F32
protected static boofcv.struct.convolve.Kernel1D_F32 gaussian1D_F32(double sigma, int radius, boolean odd, boolean normalize)Creates a floating point Gaussian kernel with the sigma and radius. If normalized is set to true then the elements in the kernel will sum up to one.
- Parameters:
sigma- Distributions standard deviation.radius- Kernel's radius.odd- Does the kernel have an even or add widthnormalize- If the kernel should be normalized to one or not.
-
gaussian1D_F64
protected static boofcv.struct.convolve.Kernel1D_F64 gaussian1D_F64(double sigma, int radius, boolean odd, boolean normalize)
-
gaussian2D_F32
public static boofcv.struct.convolve.Kernel2D_F32 gaussian2D_F32(double sigma, int radius, boolean odd, boolean normalize)Creates a kernel for a 2D convolution. This should only be used for validation purposes.- Parameters:
sigma- Distributions standard deviation.radius- Kernel's radius.odd- Does the kernel have an even or add widthnormalize- If the kernel should be normalized to one or not.
-
gaussian2D_F32
public static boofcv.struct.convolve.Kernel2D_F32 gaussian2D_F32(double sigmaX, int radiusX, boolean oddX, double sigmaY, int radiusY, boolean oddY, boolean normalize)
-
gaussian2D_F64
public static boofcv.struct.convolve.Kernel2D_F64 gaussian2D_F64(double sigma, int radius, boolean odd, boolean normalize)
-
gaussian2D_F64
public static boofcv.struct.convolve.Kernel2D_F64 gaussian2D_F64(double sigmaX, int radiusX, boolean oddX, double sigmaY, int radiusY, boolean oddY, boolean normalize)
-
derivative1D_F32
protected static boofcv.struct.convolve.Kernel1D_F32 derivative1D_F32(int order, double sigma, int radius, boolean normalize)Computes the derivative of a Gaussian kernel.- Parameters:
sigma- Distributions standard deviation.radius- Kernel's radius.normalize-- Returns:
- The derivative of the gaussian
-
sigmaForRadius
public static double sigmaForRadius(double radius, int order)Given the the radius of a Gaussian distribution and the order of its derivative, choose an appropriate sigma.
- Parameters:
radius- Kernel's radiusorder- Order of the derivative. 0 original distribution- Returns:
- Default sigma
-
radiusForSigma
public static int radiusForSigma(double sigma, int order)Given the the sigma of a Gaussian distribution and the order of its derivative, choose an appropriate radius.
- Parameters:
sigma- Distribution's sigmaorder- Order of the derivative. 0 original distribution- Returns:
- Default sigma
-
gaussianWidth
public static boofcv.struct.convolve.Kernel2D_F64 gaussianWidth(double sigma, int width)Create a gaussian kernel based on its width. Supports kernels of even or odd widths .- Parameters:
sigma- Sigma of the Gaussian distribution. If ≤ 0 then the width will be used.width- How wide the kernel is. Can be even or odd.- Returns:
- Gaussian convolution kernel.
-
-