Package io.scanbot.sdk.documentscanner
Class DocumentStraighteningParameters
- java.lang.Object
-
- io.scanbot.sdk.documentscanner.DocumentStraighteningParameters
-
public class DocumentStraighteningParameters extends java.lang.ObjectConfiguration for document straightening.
-
-
Constructor Summary
Constructors Constructor Description DocumentStraighteningParameters()Constructs DocumentStraighteningParameters with default parameters.DocumentStraighteningParameters(DocumentStraighteningMode straighteningMode, java.util.List<AspectRatio> aspectRatios)Constructs DocumentStraighteningParameters with the given params.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<AspectRatio>getAspectRatios()Getter for aspectRatios field.DocumentStraighteningModegetStraighteningMode()Getter for straighteningMode field.voidsetAspectRatios(java.util.List<AspectRatio> aspectRatios)Setter for aspectRatios field.voidsetStraighteningMode(DocumentStraighteningMode straighteningMode)Setter for straighteningMode field.
-
-
-
Constructor Detail
-
DocumentStraighteningParameters
public DocumentStraighteningParameters(DocumentStraighteningMode straighteningMode, java.util.List<AspectRatio> aspectRatios)
Constructs DocumentStraighteningParameters with the given params.- Parameters:
straighteningMode- Type of document straightening to apply. Default is STRAIGHTENaspectRatios- By default, aspect ratio of the straightened document is automatically determined based on the detected document corners. If the document is significantly deformed, the estimated aspect ratio may be inaccurate. In such cases, providing a list of expected aspect ratios may help improve the accuracy of the straightening. The closest matching aspect ratio from the list will be used. Note, that if for a given paper format you want to support both portrait and landscape orientations, you need to provide both aspect ratios (e.g. 1:√2 and √2:1 for A series papers).
-
DocumentStraighteningParameters
public DocumentStraighteningParameters()
Constructs DocumentStraighteningParameters with default parameters.
-
-
Method Detail
-
getStraighteningMode
public DocumentStraighteningMode getStraighteningMode()
Getter for straighteningMode field. See constructor documentation for more information about the field.- Returns:
- straighteningMode
-
setStraighteningMode
public void setStraighteningMode(DocumentStraighteningMode straighteningMode)
Setter for straighteningMode field. See constructor documentation for more information about the field.- Parameters:
straighteningMode- Value to set.
-
getAspectRatios
public java.util.List<AspectRatio> getAspectRatios()
Getter for aspectRatios field. See constructor documentation for more information about the field.- Returns:
- aspectRatios
-
setAspectRatios
public void setAspectRatios(java.util.List<AspectRatio> aspectRatios)
Setter for aspectRatios field. See constructor documentation for more information about the field.- Parameters:
aspectRatios- Value to set.
-
-