public class FactoryKernel extends Object
Factory used to create standard convolution kernels for floating point and integer images. The size of a kernel is specified by its radius. The number of elements in a kernel (or its width) is equal to 2*radius+1.
Types of kernels include; Gaussian.
| Constructor and Description |
|---|
FactoryKernel() |
| Modifier and Type | Method and Description |
|---|---|
static <K1 extends Kernel1D,K2 extends Kernel2D> |
get1DType(Class<K2> kernelType) |
static <K extends KernelBase,T extends ImageSingleBand> |
getKernelType(Class<T> imageType,
int DOF) |
static <T extends KernelBase> |
random(Class<?> type,
int radius,
int min,
int max,
Random rand)
Creates a random kernel of the specified type where each element is drawn from an uniform
distribution.
|
static Kernel1D_F32 |
random1D_F32(int radius,
float min,
float max,
Random rand)
Creates a random 1D kernel drawn from a uniform distribution.
|
static Kernel1D_F64 |
random1D_F64(int radius,
double min,
double max,
Random rand) |
static Kernel1D_I32 |
random1D_I32(int radius,
int min,
int max,
Random rand)
Creates a random 1D kernel drawn from a uniform distribution.
|
static Kernel2D_F32 |
random2D_F32(int radius,
float min,
float max,
Random rand)
Creates a random 2D kernel drawn from a uniform distribution.
|
static Kernel2D_F64 |
random2D_F64(int radius,
double min,
double max,
Random rand)
Creates a random 2D kernel drawn from a uniform distribution.
|
static Kernel2D_I32 |
random2D_I32(int radius,
int min,
int max,
Random rand)
Creates a random 2D kernel drawn from a uniform distribution.
|
static Kernel1D_F32 |
table1D_F32(int radius,
boolean normalized)
Create an floating point table convolution kernel.
|
static Kernel1D_F64 |
table1D_F64(int radius,
boolean normalized) |
static Kernel1D_I32 |
table1D_I32(int radius)
Create an integer table convolution kernel.
|
public static Kernel1D_I32 table1D_I32(int radius)
Create an integer table convolution kernel. All the elements are equal to one.
See ConvolveImageBox for faster ways to convolve these kernels.
radius - kernel's radius.public static Kernel1D_F32 table1D_F32(int radius, boolean normalized)
Create an floating point table convolution kernel. If un-normalized then all the elements are equal to one, otherwise they are equal to one over the width.
See ConvolveImageBox or ConvolveImageMean for faster ways to convolve these kernels.
radius - kernel's radius.public static Kernel1D_F64 table1D_F64(int radius, boolean normalized)
public static <T extends KernelBase> T random(Class<?> type, int radius, int min, int max, Random rand)
type - Class of the kernel which is to be created.radius - The kernel's radius.min - Min value.max - Max value.rand - Random number generator.public static Kernel1D_I32 random1D_I32(int radius, int min, int max, Random rand)
radius - Kernel's radius.min - minimum value.max - maximum value.rand - Random number generator.public static Kernel1D_F32 random1D_F32(int radius, float min, float max, Random rand)
radius - Kernel's radius.min - minimum value.max - maximum value.rand - Random number generator.public static Kernel1D_F64 random1D_F64(int radius, double min, double max, Random rand)
public static Kernel2D_I32 random2D_I32(int radius, int min, int max, Random rand)
radius - Kernel's radius.min - minimum value.max - maximum value.rand - Random number generator.public static Kernel2D_F32 random2D_F32(int radius, float min, float max, Random rand)
radius - Kernel's radius.min - minimum value.max - maximum value.rand - Random number generator.public static Kernel2D_F64 random2D_F64(int radius, double min, double max, Random rand)
radius - Kernel's radius.min - minimum value.max - maximum value.rand - Random number generator.public static <K1 extends Kernel1D,K2 extends Kernel2D> Class<K1> get1DType(Class<K2> kernelType)
public static <K extends KernelBase,T extends ImageSingleBand> Class<K> getKernelType(Class<T> imageType, int DOF)
Copyright © 2013. All Rights Reserved.