public class GradientTwo1
extends java.lang.Object
Computes the image's first derivative along the x and y axises using [-1 1] kernel, where the "center" of the kernel is on the 1.
The 1-D kernel allows the image's gradient to be computed efficiently but is more sensitive to local noise.
For example in an integer image:
derivX(x,y) = img(x,y) - img(x-1,y)
derivY(x,y) = img(x,y) - img(x,y-1)
| Modifier and Type | Field and Description |
|---|---|
static Kernel1D_F32 |
kernelDeriv_F32 |
static Kernel1D_I32 |
kernelDeriv_I32 |
| Constructor and Description |
|---|
GradientTwo1() |
| Modifier and Type | Method and Description |
|---|---|
static Kernel1D |
getKernelX(boolean isInteger)
Returns the kernel for computing the derivative along the x-axis.
|
static void |
process(ImageFloat32 orig,
ImageFloat32 derivX,
ImageFloat32 derivY,
ImageBorder_F32 border)
Computes the derivative of an
ImageFloat32 along the x and y axes. |
static void |
process(ImageSInt16 orig,
ImageSInt16 derivX,
ImageSInt16 derivY,
ImageBorder_S32 border)
Computes the derivative of an
ImageSInt16 along the x and y axes. |
static void |
process(ImageUInt8 orig,
ImageSInt16 derivX,
ImageSInt16 derivY,
ImageBorder_S32 border)
Computes the derivative of an
ImageUInt8 along the x and y axes. |
public static Kernel1D_I32 kernelDeriv_I32
public static Kernel1D_F32 kernelDeriv_F32
public static Kernel1D getKernelX(boolean isInteger)
public static void process(ImageUInt8 orig, ImageSInt16 derivX, ImageSInt16 derivY, ImageBorder_S32 border)
ImageUInt8 along the x and y axes.orig - Which which is to be differentiated. Not Modified.derivX - Derivative along the x-axis. Modified.derivY - Derivative along the y-axis. Modified.border - Specifies how the image border is handled. If null the border is not processed.public static void process(ImageSInt16 orig, ImageSInt16 derivX, ImageSInt16 derivY, ImageBorder_S32 border)
ImageSInt16 along the x and y axes.orig - Which which is to be differentiated. Not Modified.derivX - Derivative along the x-axis. Modified.derivY - Derivative along the y-axis. Modified.border - Specifies how the image border is handled. If null the border is not processed.public static void process(ImageFloat32 orig, ImageFloat32 derivX, ImageFloat32 derivY, ImageBorder_F32 border)
ImageFloat32 along the x and y axes.orig - Which which is to be differentiated. Not Modified.derivX - Derivative along the x-axis. Modified.derivY - Derivative along the y-axis. Modified.border - Specifies how the image border is handled. If null the border is not processed.