类 ImageUtil


  • public class ImageUtil
    extends Object
    作者:
    Chan Chung Kwong
    • 构造器概要

      构造器 
      构造器 说明
      ImageUtil()  
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static int averageX​(long[][] intImg, int width, int height, int i, int j, int dl, int dr)
      Compute the average x coordinate of nonzero pixels
      static int averageY​(long[][] intImg, int width, int height, int i, int j, int dl, int dr)
      Compute the average y coordinate of nonzero pixels
      static long[][] getIntegralImage​(byte[] pixels, int width, int height)
      Create a integral image
      static long[][] getSquaredIntegralImage​(byte[] pixels, int width, int height)
      Create a squared integral image
      static long windowValue​(long[][] intImg, int width, int height, int i, int j, int dl, int dr)
      Compute the sum of pixels in a window
    • 构造器详细资料

      • ImageUtil

        public ImageUtil()
    • 方法详细资料

      • getIntegralImage

        public static final long[][] getIntegralImage​(byte[] pixels,
                                                      int width,
                                                      int height)
        Create a integral image
        参数:
        pixels - the input grayscale picture
        width - the width of the picture
        height - the height of the picture
        返回:
        integral image
      • getSquaredIntegralImage

        public static final long[][] getSquaredIntegralImage​(byte[] pixels,
                                                             int width,
                                                             int height)
        Create a squared integral image
        参数:
        pixels - the input grayscale picture
        width - the width of the picture
        height - the height of the picture
        返回:
        squared integral image
      • windowValue

        public static final long windowValue​(long[][] intImg,
                                             int width,
                                             int height,
                                             int i,
                                             int j,
                                             int dl,
                                             int dr)
        Compute the sum of pixels in a window
        参数:
        intImg - the integral image
        width - the width of the picture
        height - the height of the picture
        i - the x coordinate
        j - the y coordinate
        dl - left offset
        dr - right offset
        返回:
        the sum
      • averageX

        public static final int averageX​(long[][] intImg,
                                         int width,
                                         int height,
                                         int i,
                                         int j,
                                         int dl,
                                         int dr)
        Compute the average x coordinate of nonzero pixels
        参数:
        intImg - the integral image
        width - the width of the picture
        height - the height of the picture
        i - the x coordinate
        j - the y coordinate
        dl - left offset
        dr - right offset
        返回:
        the sum
      • averageY

        public static final int averageY​(long[][] intImg,
                                         int width,
                                         int height,
                                         int i,
                                         int j,
                                         int dl,
                                         int dr)
        Compute the average y coordinate of nonzero pixels
        参数:
        intImg - the integral image
        width - the width of the picture
        height - the height of the picture
        i - the x coordinate
        j - the y coordinate
        dl - left offset
        dr - right offset
        返回:
        the sum