public class FactoryKernelGaussian
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static float |
MIN_FRAC |
static double |
MIN_FRACD |
| Constructor and Description |
|---|
FactoryKernelGaussian() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Kernel1D> |
derivative(int order,
boolean isFloat,
double sigma,
int radius)
Creates a 1D Gaussian kernel with the specified properties.
|
protected static Kernel1D_F32 |
derivative1D_F32(int order,
double sigma,
int radius,
boolean normalize)
Computes the derivative of a Gaussian kernel.
|
static <T extends ImageSingleBand,K extends Kernel1D> |
derivativeI(java.lang.Class<T> imageType,
int order,
double sigma,
int radius) |
static <T extends Kernel1D> |
derivativeK(java.lang.Class<T> kernelType,
int order,
double sigma,
int radius) |
static <T extends KernelBase> |
gaussian(java.lang.Class<T> kernelType,
double sigma,
int radius)
Creates a Gaussian kernel of the specified type.
|
static <T extends KernelBase> |
gaussian(int DOF,
boolean isFloat,
int numBits,
double sigma,
int radius)
Creates a Gaussian kernel with the specified properties.
|
protected static Kernel1D_F32 |
gaussian1D_F32(double sigma,
int radius,
boolean odd,
boolean normalize)
Creates a floating point Gaussian kernel with the sigma and radius.
|
protected static Kernel1D_F64 |
gaussian1D_F64(double sigma,
int radius,
boolean odd,
boolean normalize) |
static <T extends ImageSingleBand,K extends Kernel1D> |
gaussian1D(java.lang.Class<T> imageType,
double sigma,
int radius)
Creates a 1D Gaussian kernel of the specified type.
|
static Kernel2D_F32 |
gaussian2D_F32(double sigma,
int radius,
boolean odd,
boolean normalize)
Creates a kernel for a 2D convolution.
|
static Kernel2D_F64 |
gaussian2D_F64(double sigma,
int radius,
boolean odd,
boolean normalize) |
static <T extends ImageSingleBand,K extends Kernel2D> |
gaussian2D(java.lang.Class<T> imageType,
double sigma,
int radius)
Creates a 2D Gaussian kernel of the specified type.
|
static Kernel2D_F64 |
gaussianWidth(double sigma,
int width)
Create a gaussian kernel based on its width.
|
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.
|
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.
|
public static <T extends KernelBase> T gaussian(java.lang.Class<T> kernelType, double sigma, int radius)
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.public static <T extends ImageSingleBand,K extends Kernel1D> K gaussian1D(java.lang.Class<T> imageType, double sigma, int radius)
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.public static <T extends ImageSingleBand,K extends Kernel2D> K gaussian2D(java.lang.Class<T> imageType, double sigma, int radius)
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.public static <T extends KernelBase> T gaussian(int DOF, boolean isFloat, int numBits, double sigma, int radius)
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.public static <T extends ImageSingleBand,K extends Kernel1D> K derivativeI(java.lang.Class<T> imageType, int order, double sigma, int radius)
public static <T extends Kernel1D> T derivativeK(java.lang.Class<T> kernelType, int order, double sigma, int radius)
public static <T extends Kernel1D> T derivative(int order, boolean isFloat, double sigma, int radius)
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.protected static 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.
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.protected static Kernel1D_F64 gaussian1D_F64(double sigma, int radius, boolean odd, boolean normalize)
public static Kernel2D_F32 gaussian2D_F32(double sigma, int radius, boolean odd, boolean normalize)
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.public static Kernel2D_F64 gaussian2D_F64(double sigma, int radius, boolean odd, boolean normalize)
protected static Kernel1D_F32 derivative1D_F32(int order, double sigma, int radius, boolean normalize)
sigma - Distributions standard deviation.radius - Kernel's radius.normalize - 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.
radius - Kernel's radiusorder - Order of the derivative. 0 original distributionpublic 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.
sigma - Distribution's sigmaorder - Order of the derivative. 0 original distributionpublic static Kernel2D_F64 gaussianWidth(double sigma, int width)
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.