Class DerivativeLaplacian

java.lang.Object
boofcv.alg.filter.derivative.DerivativeLaplacian

public class DerivativeLaplacian extends 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.

  • Field Details

  • Constructor Details

    • DerivativeLaplacian

      public DerivativeLaplacian()
  • Method Details

    • process

      public static void process(GrayU8 orig, GrayS16 deriv, @Nullable @Nullable ImageBorder_S32<GrayU8> border)
      Computes the Laplacian of input image.
      Parameters:
      orig - Input image. Not modified.
      deriv - Where the Laplacian is written to. Modified.
    • process

      public static void process(GrayU8 orig, GrayF32 deriv)
      Computes Laplacian on an U8 image but outputs derivative in a F32 image. Removes a step when processing images for feature detection
    • process

      public static void process(GrayF32 orig, GrayF32 deriv, @Nullable @Nullable ImageBorder_F32 border)
      Computes the Laplacian of 'orig'.
      Parameters:
      orig - Input image. Not modified.
      deriv - Where the Laplacian is written to. Modified.