Class ImageUtil

java.lang.Object
com.recognition.software.jdeskew.ImageUtil

public class ImageUtil extends Object
  • Constructor Details

    • ImageUtil

      public ImageUtil()
  • Method Details

    • isBlack

      public static boolean isBlack(BufferedImage image, int x, int y)
      Whether the pixel is black.
      Parameters:
      image - source image
      x - x-coordinate
      y - y-coordinate
      Returns:
      true if pixel is black; false, otherwise
    • isBlack

      public static boolean isBlack(BufferedImage image, int x, int y, int luminanceCutOff)
      Whether the pixel is black.
      Parameters:
      image - source image
      x - x-coordinate
      y - y-coordinate
      luminanceCutOff - luminance threshold
      Returns:
      true if pixel is black; false, otherwise
    • rotate

      public static BufferedImage rotate(BufferedImage image, double angle, int cx, int cy)
      Rotates image.
      Parameters:
      image - source image
      angle - by degrees
      cx - x-coordinate of pivot point
      cy - y-coordinate of pivot point
      Returns:
      rotated image