AnylineDocumentModuleView Class Reference

Inherits from AnylineAbstractModuleView : UIView
Declared in AnylineDocumentModuleView.h

Overview

The AnylineDocumentModuleView class declares the programmatic interface for an object that manages easy access to Anylines document detection. All its capabilities are bundled into this AnylineAbstractModuleView subclass. Management of the scanning process happens within the view object. It is configurable via interface builder.

Communication with the host application is managed with a delegate that conforms to AnylineDocumentModuleDelegate.

  documentScanViewPlugin

@property (nullable, nonatomic, strong) ALDocumentScanViewPlugin *documentScanViewPlugin

  documentScanPlugin

@property (nullable, nonatomic, strong) ALDocumentScanPlugin *documentScanPlugin

– setupWithLicenseKey:delegate:error:

Sets the license key and delegate.

- (BOOL)setupWithLicenseKey:(NSString *_Nonnull)licenseKey delegate:(id<AnylineDocumentModuleDelegate> _Nonnull)delegate error:(NSError *_Nullable *_Nullable)error

Parameters

licenseKey

The Anyline license key for this application bundle

delegate

The delegate that will receive the Anyline results (hast to conform to AnylineDocumentModuleDelegate)

error

The error that occured

Return Value

Boolean indicating the success / failure of the call.

Declared In

AnylineDocumentModuleView.h

– setupAsyncWithLicenseKey:delegate:finished:

Sets the license key and delegate. Async method with return block when done.

- (void)setupAsyncWithLicenseKey:(NSString *_Nonnull)licenseKey delegate:(id<AnylineDocumentModuleDelegate> _Nonnull)delegate finished:(void ( ^ _Nonnull ) ( BOOL success , NSError *_Nullable error ))finished

Parameters

licenseKey

The Anyline license key for this application bundle

delegate

The delegate that will receive the Anyline results (hast to conform to AnylineDocumentModuleDelegate)

finished

Inidicating if setup is finished with an error object when setup failed.

Declared In

AnylineDocumentModuleView.h

  maxDocumentRatioDeviation

Maximum deviation for the ratio. 0.15 is the default

@property (nullable, nonatomic, strong) NSNumber *maxDocumentRatioDeviation

Availability

3.8

Discussion

Warning: Parameter can only be changed when the scanning is not running.

Declared In

AnylineDocumentModuleView.h

  maxOutputResolution

Maximum resolution of the output image (transformedImage)

@property (nonatomic, assign) CGSize maxOutputResolution

Availability

3.19

Discussion

Warning: Parameter can only be changed when the scanning is not running.

Declared In

AnylineDocumentModuleView.h

  postProcessingEnabled

If enabled, starts post processing after a full document snap. (Default: false) At the moment improves white balance and contrast

@property (nonatomic, assign) BOOL postProcessingEnabled

Availability

3.24

Declared In

AnylineDocumentModuleView.h

– setDocumentRatios:

Sets custom document ratios (NSNumbers) that should be supported (or null to set back to all supported types).

- (void)setDocumentRatios:(NSArray<NSNumber*> *_Nonnull)ratios

Parameters

ratios

all supported formats

Availability

3.8

Discussion

Warning: Parameter can only be changed when the scanning is not running.

Declared In

AnylineDocumentModuleView.h

– triggerPictureCornerDetectionAndReturnError:

- (BOOL)triggerPictureCornerDetectionAndReturnError:(NSError *_Nullable *_Nullable)error

– transformImageWithSquare:image:error:

Crops an arbitrary rectangle (e.g. trapezoid) of the input image and perspectively transforms it to a rectangle (e.g. square). After the transformation is complete the result delegate anylineDocumentScanPlugin:hasResult:fullImage:documentCorners will be triggered. In any case call [AnylineDocumentModuleView cancelScanningAndReturnError:] before using this method.

- (BOOL)transformImageWithSquare:(ALSquare *_Nullable)square image:(UIImage *_Nullable)image error:(NSError *_Nullable *_Nullable)error

Parameters

square

The input image will be transformed to this square

image

The UIImage which will be processed and transformed

error

The error that occured

Return Value

Boolean indicating the success / failure of the call.

Declared In

AnylineDocumentModuleView.h

– transformALImageWithSquare:image:error:

Crops an arbitrary rectangle (e.g. trapezoid) of the input image and perspectively transforms it to a rectangle (e.g. square). After the transformation is complete the result delegate anylineDocumentScanPlugin:hasResult:fullImage:documentCorners will be triggered. In any case call [AnylineDocumentModuleView cancelScanningAndReturnError:] before using this method.

- (BOOL)transformALImageWithSquare:(ALSquare *_Nullable)square image:(ALImage *_Nullable)image error:(NSError *_Nullable *_Nullable)error

Parameters

square

The input image will be transformed to this square

image

The ALImage which will be processed and transformed

error

The error that occured

Return Value

Boolean indicating the success / failure of the call.

Declared In

AnylineDocumentModuleView.h