public class LaplacianEdge
extends java.lang.Object
The Laplacian is convolved across an image to find second derivative of the image. It is often a faster way to compute the intensity of an edge than first derivative algorithms.
This implementation of the laplacian has a 3 by 3 kernel.
partial^2 f partial^2 f
f(x,y) = ~~~~~~~~~~~ + ~~~~~~~~~~~
partial x^2 partial x^2
[ 0 1 0 ]
kernel = [ 1 -4 1 ]
[ 0 1 0 ]
This formulation is derived by using the [-1 1 0] and [0 -1 1] difference kernels for the image derivative. Alternative formulations can be found using other kernels.
DEVELOPER NOTE: This is still a strong candidate for further optimizations due to redundant array accesses.
| Modifier and Type | Field and Description |
|---|---|
static Kernel2D_F32 |
kernel_F32 |
static Kernel2D_I32 |
kernel_I32 |
| Constructor and Description |
|---|
LaplacianEdge() |
| Modifier and Type | Method and Description |
|---|---|
static void |
process(ImageFloat32 orig,
ImageFloat32 deriv)
Computes the Laplacian of 'orig'.
|
static void |
process(ImageUInt8 orig,
ImageFloat32 deriv) |
static void |
process(ImageUInt8 orig,
ImageSInt16 deriv)
Computes the Laplacian of input image.
|
public static Kernel2D_I32 kernel_I32
public static Kernel2D_F32 kernel_F32
public static void process(ImageUInt8 orig, ImageSInt16 deriv)
orig - Input image. Not modified.deriv - Where the Laplacian is written to. Modified.public static void process(ImageUInt8 orig, ImageFloat32 deriv)
public static void process(ImageFloat32 orig, ImageFloat32 deriv)
orig - Input image. Not modified.deriv - Where the Laplacian is written to. Modified.