Class GIntegralImageOps


  • public class GIntegralImageOps
    extends java.lang.Object
    Provides a mechanism to call IntegralImageOps with unknown types at compile time.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T extends boofcv.struct.image.ImageGray<T>>
      double
      block_unsafe​(T integral, int x0, int y0, int x1, int y1)
      Computes the value of a block inside an integral image without bounds checking.
      static <T extends boofcv.struct.image.ImageGray<T>>
      double
      block_zero​(T integral, int x0, int y0, int x1, int y1)
      Computes the value of a block inside an integral image and treats pixels outside of the image as zero.
      static <T extends boofcv.struct.image.ImageGray<T>>
      T
      convolve​(T integral, IntegralKernel kernel, T output)
      General code for convolving a box filter across an image using the integral image.
      static <T extends boofcv.struct.image.ImageGray<T>>
      T
      convolveBorder​(T integral, IntegralKernel kernel, T output, int borderX, int borderY)
      Convolves the kernel only across the image's border.
      static <T extends boofcv.struct.image.ImageGray<T>>
      double
      convolveSparse​(T integral, IntegralKernel kernel, int x, int y)
      Convolves a kernel around a single point in the integral image.
      static <I extends boofcv.struct.image.ImageGray<I>,​II extends boofcv.struct.image.ImageGray<II>>
      java.lang.Class<II>
      getIntegralType​(java.lang.Class<I> inputType)
      Given the input image, return the type of image the integral image should be.
      static <I extends boofcv.struct.image.ImageGray<I>,​T extends boofcv.struct.image.ImageGray>
      T
      transform​(I input, T transformed)
      Converts a regular image into an integral image.
      • Methods inherited from class java.lang.Object

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

      • GIntegralImageOps

        public GIntegralImageOps()
    • Method Detail

      • getIntegralType

        public static <I extends boofcv.struct.image.ImageGray<I>,​II extends boofcv.struct.image.ImageGray<II>> java.lang.Class<II> getIntegralType​(java.lang.Class<I> inputType)
        Given the input image, return the type of image the integral image should be.
      • transform

        public static <I extends boofcv.struct.image.ImageGray<I>,​T extends boofcv.struct.image.ImageGray> T transform​(I input,
                                                                                                                             T transformed)
        Converts a regular image into an integral image.
        Parameters:
        input - Regular image. Not modified.
        transformed - Integral image. If null a new image will be created. Modified.
        Returns:
        Integral image.
      • convolve

        public static <T extends boofcv.struct.image.ImageGray<T>> T convolve​(T integral,
                                                                              IntegralKernel kernel,
                                                                              T output)
        General code for convolving a box filter across an image using the integral image.
        Parameters:
        integral - Integral image.
        kernel - Convolution kernel.
        output - The convolved image. If null a new image will be declared and returned. Modified.
        Returns:
        Convolved image.
      • convolveBorder

        public static <T extends boofcv.struct.image.ImageGray<T>> T convolveBorder​(T integral,
                                                                                    IntegralKernel kernel,
                                                                                    T output,
                                                                                    int borderX,
                                                                                    int borderY)
        Convolves the kernel only across the image's border.
        Parameters:
        integral - Integral image. Not modified.
        kernel - Convolution kernel.
        output - The convolved image. If null a new image will be created. Modified.
        borderX - Size of the image border along the horizontal axis.
        borderY - size of the image border along the vertical axis.
      • convolveSparse

        public static <T extends boofcv.struct.image.ImageGray<T>> double convolveSparse​(T integral,
                                                                                         IntegralKernel kernel,
                                                                                         int x,
                                                                                         int y)
        Convolves a kernel around a single point in the integral image.
        Parameters:
        integral - Input integral image. Not modified.
        kernel - Convolution kernel.
        x - Pixel the convolution is performed at.
        y - Pixel the convolution is performed at.
        Returns:
        Value of the convolution
      • block_zero

        public static <T extends boofcv.struct.image.ImageGray<T>> double block_zero​(T integral,
                                                                                     int x0,
                                                                                     int y0,
                                                                                     int x1,
                                                                                     int y1)

        Computes the value of a block inside an integral image and treats pixels outside of the image as zero. The block is defined as follows: x0 < x ≤ x1 and y0 < y ≤ y1.

        Parameters:
        integral - Integral image.
        x0 - Lower bound of the block. Exclusive.
        y0 - Lower bound of the block. Exclusive.
        x1 - Upper bound of the block. Inclusive.
        y1 - Upper bound of the block. Inclusive.
        Returns:
        Value inside the block.
      • block_unsafe

        public static <T extends boofcv.struct.image.ImageGray<T>> double block_unsafe​(T integral,
                                                                                       int x0,
                                                                                       int y0,
                                                                                       int x1,
                                                                                       int y1)

        Computes the value of a block inside an integral image without bounds checking. The block is defined as follows: x0 < x ≤ x1 and y0 < y ≤ y1.

        Parameters:
        integral - Integral image.
        x0 - Lower bound of the block. Exclusive.
        y0 - Lower bound of the block. Exclusive.
        x1 - Upper bound of the block. Inclusive.
        y1 - Upper bound of the block. Inclusive.
        Returns:
        Value inside the block.