Package com.logicaldoc.core.imaging
Class ImageDeskew
- java.lang.Object
-
- com.logicaldoc.core.imaging.ImageDeskew
-
public class ImageDeskew extends Object
A simple class for calculating the skew degree of an image- Since:
- 8.7.3
- Author:
- Marco Meschieri - LogicalDOC
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ImageDeskew.HoughLine
Representation of a line in the image.
-
Constructor Summary
Constructors Constructor Description ImageDeskew(BufferedImage image)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BufferedImage
deskew()
Deskews the imagedouble
getAlpha(int index)
BufferedImage
getImage()
double
getMinimumDeskewThreshold()
double
getSkewAngle()
Calculates the skew angle of the image.void
setMinimumDeskewThreshold(double minimumDeskewThreshold)
-
-
-
Constructor Detail
-
ImageDeskew
public ImageDeskew(BufferedImage image)
Constructor.- Parameters:
image
- the image to deskew
-
-
Method Detail
-
getSkewAngle
public double getSkewAngle()
Calculates the skew angle of the image.- Returns:
- the calculated skew angle
-
getAlpha
public double getAlpha(int index)
-
getMinimumDeskewThreshold
public double getMinimumDeskewThreshold()
-
setMinimumDeskewThreshold
public void setMinimumDeskewThreshold(double minimumDeskewThreshold)
-
deskew
public BufferedImage deskew()
Deskews the image- Returns:
- the deskwed version of the image(also stored as image attribute)
-
getImage
public BufferedImage getImage()
-
-