Class WeightPixelKernel_F32

java.lang.Object
boofcv.alg.weights.WeightPixelKernel_F32
All Implemented Interfaces:
WeightPixel_F32
Direct Known Subclasses:
WeightPixelGaussian_F32

public abstract class WeightPixelKernel_F32 extends Object implements WeightPixel_F32
Weight which uses the values contained in a Kernel2D_F32. For performance reasons no checks are done to see if a request has been made outside the kernel's radius. Those values should be zero.
  • Field Details

  • Constructor Details

    • WeightPixelKernel_F32

      public WeightPixelKernel_F32()
  • Method Details

    • weightIndex

      public float weightIndex(int index)
      Description copied from interface: WeightPixel_F32

      Faster way to access the weight. Refers to the index in a row major matrix.

      x = (index % widthX) - radiusX
      y = (index / widthX) - radiusY

      Specified by:
      weightIndex in interface WeightPixel_F32
      Parameters:
      index - index of grid element
      Returns:
      the weight
    • weight

      public float weight(int x, int y)
      Description copied from interface: WeightPixel_F32
      Access the weight using coordinates.
      Specified by:
      weight in interface WeightPixel_F32
      Parameters:
      x - x-coordinate: range = -radius to radius, inclusive
      y - y-coordinate: range = -radius to radius, inclusive
      Returns:
      the weight
    • getRadiusX

      public int getRadiusX()
      Description copied from interface: WeightPixel_F32
      Returns the kernel's radius along the x-axis
      Specified by:
      getRadiusX in interface WeightPixel_F32
      Returns:
      Radius of kernel
    • getRadiusY

      public int getRadiusY()
      Description copied from interface: WeightPixel_F32
      Returns the kernel's radius along the y-axis
      Specified by:
      getRadiusY in interface WeightPixel_F32
      Returns:
      Radius of kernel