DocumentStraighteningParameters

data class DocumentStraighteningParameters(var straighteningMode: DocumentStraighteningMode = DocumentStraighteningMode.STRAIGHTEN, var aspectRatios: List<AspectRatio> = listOf( )) : Parcelable

Configuration for document straightening.

Constructors

Link copied to clipboard
constructor(source: Map<String, Any?>)
constructor(json: JSONObject)
constructor(straighteningMode: DocumentStraighteningMode = DocumentStraighteningMode.STRAIGHTEN, aspectRatios: List<AspectRatio> = listOf( ))

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

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).

Link copied to clipboard

Type of document straightening to apply.

Functions

Link copied to clipboard
Link copied to clipboard
fun toJson(config: ToJsonConfiguration = ToJsonConfiguration.default()): JSONObject