Class HessianFromGradient

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

public class HessianFromGradient extends Object

These functions compute the image hessian by computing the image gradient twice. While about twice as fast as computing the Hessian directly from a larger kernel, it requires additional storage space.

NOTE: A subtle design flaw in many of these operations is that they add more image blur each time the derivative is computed. For example, with the sobel operator is is derived by convolving a blur kernel with a derivative kernel. So applying it twice to computer the second order x-derivative is the same as blurring it twice then applying the derivative operator twice. Thus it is not th true second order derivative. Having said that, this issue is of little practical importance and is hard to detect..

  • Constructor Details

    • HessianFromGradient

      public HessianFromGradient()
  • Method Details

    • hessianPrewitt

      public static void hessianPrewitt(GrayS16 inputDerivX, GrayS16 inputDerivY, GrayS16 derivXX, GrayS16 derivYY, GrayS16 derivXY, @Nullable @Nullable ImageBorder_S32 border)
      Computes the hessian given an image's gradient using a Prewitt operator.
      Parameters:
      inputDerivX - Already computed image x-derivative.
      inputDerivY - Already computed image y-derivative.
      derivXX - Output second XX partial derivative.
      derivYY - Output second YY partial derivative.
      derivXY - Output second XY partial derivative.
      border - Specifies how the image border is handled. If null the border is not processed.
    • hessianPrewitt

      public static void hessianPrewitt(GrayF32 inputDerivX, GrayF32 inputDerivY, GrayF32 derivXX, GrayF32 derivYY, GrayF32 derivXY, @Nullable @Nullable ImageBorder_F32 border)
      Computes the hessian given an image's gradient using a Prewitt operator.
      Parameters:
      inputDerivX - Already computed image x-derivative.
      inputDerivY - Already computed image y-derivative.
      derivXX - Output second XX partial derivative.
      derivYY - Output second YY partial derivative.
      derivXY - Output second XY partial derivative.
      border - Specifies how the image border is handled. If null the border is not processed.
    • hessianSobel

      public static void hessianSobel(GrayS16 inputDerivX, GrayS16 inputDerivY, GrayS16 derivXX, GrayS16 derivYY, GrayS16 derivXY, @Nullable @Nullable ImageBorder_S32 border)
      Computes the hessian given an image's gradient using a Sobel operator.
      Parameters:
      inputDerivX - Already computed image x-derivative.
      inputDerivY - Already computed image y-derivative.
      derivXX - Output second XX partial derivative.
      derivYY - Output second YY partial derivative.
      derivXY - Output second XY partial derivative.
      border - Specifies how the image border is handled. If null the border is not processed.
    • hessianSobel

      public static void hessianSobel(GrayF32 inputDerivX, GrayF32 inputDerivY, GrayF32 derivXX, GrayF32 derivYY, GrayF32 derivXY, @Nullable @Nullable ImageBorder_F32 border)
      Computes the hessian given an image's gradient using a Sobel operator.
      Parameters:
      inputDerivX - Already computed image x-derivative.
      inputDerivY - Already computed image y-derivative.
      derivXX - Output second XX partial derivative.
      derivYY - Output second YY partial derivative.
      derivXY - Output second XY partial derivative.
      border - Specifies how the image border is handled. If null the border is not processed.
    • hessianThree

      public static void hessianThree(GrayS16 inputDerivX, GrayS16 inputDerivY, GrayS16 derivXX, GrayS16 derivYY, GrayS16 derivXY, @Nullable @Nullable ImageBorder_S32 border)
      Computes the hessian given an image's gradient using a three derivative operator.
      Parameters:
      inputDerivX - Already computed image x-derivative.
      inputDerivY - Already computed image y-derivative.
      derivXX - Output second XX partial derivative.
      derivYY - Output second YY partial derivative.
      derivXY - Output second XY partial derivative.
      border - Specifies how the image border is handled. If null the border is not processed.
    • hessianThree

      public static void hessianThree(GrayF32 inputDerivX, GrayF32 inputDerivY, GrayF32 derivXX, GrayF32 derivYY, GrayF32 derivXY, @Nullable @Nullable ImageBorder_F32 border)
      Computes the hessian given an image's gradient using a three derivative operator.
      Parameters:
      inputDerivX - Already computed image x-derivative.
      inputDerivY - Already computed image y-derivative.
      derivXX - Output second XX partial derivative.
      derivYY - Output second YY partial derivative.
      derivXY - Output second XY partial derivative.
      border - Specifies how the image border is handled. If null the border is not processed.