Class DerivativeLaplacian


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

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static boofcv.struct.convolve.Kernel2D_F32 kernel_F32  
      static boofcv.struct.convolve.Kernel2D_S32 kernel_I32  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void process​(boofcv.struct.image.GrayF32 orig, boofcv.struct.image.GrayF32 deriv, boofcv.struct.border.ImageBorder_F32 border)
      Computes the Laplacian of 'orig'.
      static void process​(boofcv.struct.image.GrayU8 orig, boofcv.struct.image.GrayF32 deriv)
      Computes Laplacian on an U8 image but outputs derivative in a F32 image.
      static void process​(boofcv.struct.image.GrayU8 orig, boofcv.struct.image.GrayS16 deriv, boofcv.struct.border.ImageBorder_S32<boofcv.struct.image.GrayU8> border)
      Computes the Laplacian of input image.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • kernel_I32

        public static boofcv.struct.convolve.Kernel2D_S32 kernel_I32
      • kernel_F32

        public static boofcv.struct.convolve.Kernel2D_F32 kernel_F32
    • Constructor Detail

      • DerivativeLaplacian

        public DerivativeLaplacian()
    • Method Detail

      • process

        public static void process​(boofcv.struct.image.GrayU8 orig,
                                   boofcv.struct.image.GrayS16 deriv,
                                   @Nullable
                                   boofcv.struct.border.ImageBorder_S32<boofcv.struct.image.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​(boofcv.struct.image.GrayU8 orig,
                                   boofcv.struct.image.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​(boofcv.struct.image.GrayF32 orig,
                                   boofcv.struct.image.GrayF32 deriv,
                                   @Nullable
                                   boofcv.struct.border.ImageBorder_F32 border)
        Computes the Laplacian of 'orig'.
        Parameters:
        orig - Input image. Not modified.
        deriv - Where the Laplacian is written to. Modified.