Package com.recognition.software.jdeskew
Class ImageUtil
- java.lang.Object
-
- com.recognition.software.jdeskew.ImageUtil
-
public class ImageUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ImageUtil()
-
Method Summary
Modifier and Type Method Description static boolean
isBlack(java.awt.image.BufferedImage image, int x, int y)
Whether the pixel is black.static boolean
isBlack(java.awt.image.BufferedImage image, int x, int y, int luminanceCutOff)
Whether the pixel is black.static java.awt.image.BufferedImage
rotate(java.awt.image.BufferedImage image, double angle, int cx, int cy)
Rotates image.
-
-
-
Method Detail
-
isBlack
public static boolean isBlack(java.awt.image.BufferedImage image, int x, int y)
Whether the pixel is black.- Parameters:
image
- source imagex
-y
-- Returns:
-
isBlack
public static boolean isBlack(java.awt.image.BufferedImage image, int x, int y, int luminanceCutOff)
Whether the pixel is black.- Parameters:
image
- source imagex
-y
-luminanceCutOff
-- Returns:
-
rotate
public static java.awt.image.BufferedImage rotate(java.awt.image.BufferedImage image, double angle, int cx, int cy)
Rotates image.- Parameters:
image
- source imageangle
- by degreescx
- x-coordinate of pivot pointcy
- y-coordinate of pivot point- Returns:
- rotated image
-
-