public class FactoryKernelGaussian extends 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(Class<T> imageType,
int order,
double sigma,
int radius) |
static <T extends Kernel1D> |
derivativeK(Class<T> kernelType,
int order,
double sigma,
int radius) |
static <T extends KernelBase> |
gaussian(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 normalize)
Creates a floating point Gaussian kernel with the sigma and radius.
|
protected static Kernel1D_F64 |
gaussian1D_F64(double sigma,
int radius,
boolean normalize) |
static <T extends ImageSingleBand,K extends Kernel1D> |
gaussian1D(Class<T> imageType,
double sigma,
int radius)
Creates a 1D Gaussian kernel of the specified type.
|
protected static Kernel2D_F32 |
gaussian2D_F32(double sigma,
int radius,
boolean normalize)
Creates a kernel for a 2D convolution.
|
protected static Kernel2D_F64 |
gaussian2D_F64(double sigma,
int radius,
boolean normalize) |
static <T extends ImageSingleBand,K extends Kernel2D> |
gaussian2D(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)
NOTE: If trying to determine radius for gaussian derivative +1 to returned value..
|
static double |
sigmaForRadius(double radius,
int order)
Given the the radius of a Gaussian distribution, choose an appropriate sigma.
|
public static <T extends KernelBase> T gaussian(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(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(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(Class<T> imageType, int order, double sigma, int radius)
public static <T extends Kernel1D> T derivativeK(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 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.normalize - If the kernel should be normalized to one or not.protected static Kernel1D_F64 gaussian1D_F64(double sigma, int radius, boolean normalize)
protected static Kernel2D_F32 gaussian2D_F32(double sigma, int radius, boolean normalize)
sigma - Distributions standard deviation.radius - Kernel's radius.normalize - If the kernel should be normalized to one or not.protected static Kernel2D_F64 gaussian2D_F64(double sigma, int radius, 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, choose an appropriate sigma.
NOTE: If trying to determine sigma for gaussian derivative -1 from radius.
radius - public static int radiusForSigma(double sigma,
int order)
sigma - public 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.Copyright © 2013. All Rights Reserved.