Package com.recognition.software.jdeskew
Class ImageUtil
java.lang.Object
com.recognition.software.jdeskew.ImageUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isBlack
(BufferedImage image, int x, int y) Whether the pixel is black.static boolean
isBlack
(BufferedImage image, int x, int y, int luminanceCutOff) Whether the pixel is black.static BufferedImage
rotate
(BufferedImage image, double angle, int cx, int cy) Rotates image.
-
Constructor Details
-
ImageUtil
public ImageUtil()
-
-
Method Details
-
isBlack
Whether the pixel is black.- Parameters:
image
- source imagex
- x-coordinatey
- y-coordinate- Returns:
- true if pixel is black; false, otherwise
-
isBlack
Whether the pixel is black.- Parameters:
image
- source imagex
- x-coordinatey
- y-coordinateluminanceCutOff
- luminance threshold- Returns:
- true if pixel is black; false, otherwise
-
rotate
Rotates image.- Parameters:
image
- source imageangle
- by degreescx
- x-coordinate of pivot pointcy
- y-coordinate of pivot point- Returns:
- rotated image
-