This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public double doIt(BufferedImage image) { | |
final double skewRadians; | |
BufferedImage black = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_BYTE_BINARY); | |
final Graphics2D g = black.createGraphics(); | |
g.drawImage(image, 0, 0, null); | |
g.dispose(); | |
skewRadians = findSkew(black); | |
System.out.println(-57.295779513082320876798154814105 * skewRadians); | |
return skewRadians; |