This is the main entry point that allows you to use the SDK.

Introduction 

The Capture SDK is targeted to developers who want to use the IDEMIA biometric technologies within their mobile apps.

The main features are:

  • Biometric captures
  • Biometric coding
  • Biometric authentication and identification
  • Identity documents reading

Please refer to Release Notes to see the list of improvements and fixed issues.

Prerequisites 

Skills Required 

The integration tasks shall be done by developers with knowledge of:

  • Xcode
  • Objective-C/Swift
  • iOS (min version is 15.0)
  • (optional) cocoapods

Resources Required 

Integration should be performed on a Mac.

The tools required are:

  • Xcode that support iOS 15
  • iOS device (simulator is not supported)

Licenses Required 

Depending of which declination of the library is used the licenses required are:

  • Biometry + Document:

    • MORPHOFACS
    • VERIF
    • IDENT
    • MIMA
    • MSC_CORE
    • MSC_LIVENESS
  • Biometry:

    • MORPHOFACS
    • VERIF
    • IDENT
    • MIMA
    • MSC_CORE
    • MSC_LIVENESS
  • Document:

    • MIMA
    • MSC_CORE

Note: To enable the feature for video dump you will need also:

  • MSC_DUMP

Sample Project 

The sample project is provided along with this documentation.

Getting Started 

Components 

The SDK is composed of six different components:

  • LicenseManager: Object responsible for handling the license.
  • FaceCaptureHandler: Handles the capture of the face biometrics through the camera of the device.
  • FingerCaptureHandler: Handles the capture of the finger biometrics through the camera of the device.
  • BioMatcherHandler: Handles the biometric coding and matching.
  • BioStoreDB: Repository to store biometric templates (This component is optional, just in case you don’t want to implement your own database).
  • DocumentCaptureHandler: Handles the document reading features (Like reading MRZ documents).
  • ImageUtils: Handle the images format conversion, in case the integrator needs to change the image format or import an image.

SDK Variants 

The SDK comes in six different variants.

  1. Full SDK: It contains all the features of the SDK. Includes components: LicenseManager, FaceCaptureHandler, FingerCaptureHandler, BioMatcherHandler, BioStoreDB, DocumentCaptureHandler, ImageUtils. You can integrate it into your project by specifying it in your Podfile: pod 'BiometricSDK'.

  2. Biometry variant: It contains all biometric features including face and finger capture and also biometric coding and matching used for liveness checking. Includes components: LicenseManager, FaceCaptureHandler, FingerCaptureHandler, BioMatcherHandler, BioStoreDB, ImageUtils. You can integrate it into your project by specifying it in your Podfile: pod 'BiometricSDK-biometry'.

  3. Document variant: It contains only document capture features. Includes components: LicenseManager, DocumentCaptureHandler, ImageUtils. You can integrate it into your project by specifying it in your Podfile: pod 'BiometricSDK-document'.

  4. Finger variant: It contains only finger capture features including biometric coding and matching used for finger liveness checking. Includes components: LicenseManager, FingerCaptureHandler, BioMatcherHandler, BioStoreDB, ImageUtils. You can integrate it into your project by specifying it in your Podfile: pod 'BiometricSDK-finger'.

  5. Face variant: It contains only face capture features without biometric coding and matching, so for liveness checking you need to use external server. Offline liveness checking is not available. Includes components: LicenseManager, FaceCaptureHandler, BioStoreDB, ImageUtils. You can integrate it into your project by specifying it in your Podfile: pod 'BiometricSDK-face'.

  6. Face+document variant: It contains only face capture features without biometric coding and matching, so for liveness checking you need to use external server. Offline liveness checking is not available. Additionally it contains also document capture features. Includes components: LicenseManager, FaceCaptureHandler, BioStoreDB, DocumentCaptureHandler, ImageUtils. You can integrate it into your project by specifying it in your Podfile: pod 'BiometricSDK-face_document'.

Analytics 

Capture SDK offers a logging mechanism that collects analytics data about SDK usage and sends this data to IDEMIA's server in the EU. This data helps IDEMIA to improve Capture SDK and the likelihood of integrator success within the app. It is strongly recommended to use the analytics mechanism.

  • Sending analytics data is enabled by default.
  • You can enable or disable sending analytics data.
  • You can choose to send analytics data only when you are connected to a Wi-Fi network, so as not to not use your cellular connection.
  • Analytics data that IDEMIA collects contains only technical data.
  • No sensitive personal data is collected.
  • IDEMIA does not collect any images.

Analytics data that we collect include following information:

  • Application name, bundle id, version
  • Capture SDK and RemoteLogger libraries versions
  • Capture SDK plugins versions
  • Device model and operating system version
  • Technical information about performed face, finger, and document capture (such as: used capture mode; timestamp; reason of error; time needed to perform a capture; quality of captured image; and light condition)
  • Technical information about performed authentication and identification events (such as: used threshold, duration, and obtained score)
  • Other technical information (such as: image compression, occurred errors, and SDK performance) that does not contain personal data

You can disable analytics reporting using the appropriate SDK method.

Analytics are enabled by default and data is sent through Wi-Fi and cellular connections to IDEMIA's server in Europe. You can switch to the server in US by calling:

Objective-C
1[[BIORemoteLogger sharedInstance] setConfiguration:[BIORemoteLoggerConfiguration defaultUS]];

You can switch to Wi-Fi only mode with:

Objective-C
1[BIORemoteLogger sharedInstance].wifiOnly = YES;

You can disable analytics as with:

Objective-C
1[BIORemoteLogger sharedInstance].loggerDisabled = YES;

You should perform above calls before using the SDK, for example, in your app delegate.

Project Configuration 

Before using our SDK you need to add Privacy - Camera Usage Description (NSCameraUsageDescriptionkey) to the Info.plist of your application as it will need to use the camera.

Adding the Biometric Capture SDK Framework 

We serve our artifacts with the artifactory. As an integrator you can choose one the methods of adding our framework to your project:

  • using CocoaPods
  • manually

Use CocoaPods (along with cocoapods-artplugin)

If you don't already have the CocoaPods with the Artifactory tool, install it by running the following command:

Bash
1gem install cocoapods-art
  1. The plugin uses authentication as specified in a standard .netrc file.
Swift
1machine mi-artifactory.otlabs.fr
2login ##USERNAME##
3password ##PASSWORD##
  1. Once set, add our repo to your CocoaPod's dependency management system:
Bash
1pod repo-art add smartsdk "https://mi-artifactory.otlabs.fr/artifactory/api/pods/smartsdk-ios-local"
  1. At the top of your project Podfile add:
Ruby
1plugin 'cocoapods-art', :sources => [
2 'master', # so it could resolve dependencies from master repo (the main one), for newer CocoaPods (1.10+) versions it may not be needed anymore
3 'smartsdk' # so it could resolve BiometricSDK depdendency
4]
  1. Add the Capture SDK in your Podfile in one of its pod's version:
Ruby
1pod 'BiometricSDK' # Full version of the SDK, contains biometrics & documents features
2pod 'BiometricSDK-biometry' # Contains only biometrics (finger+face) features
3
4pod 'BiometricSDK-finger' # Contains only finger features
5
6pod 'BiometricSDK-face' # Contains only face features without internal liveness checking mechanism
7pod 'BiometricSDK-document' # Contains only document features
8pod 'BiometricSDK-face_document' # Contains only face features without internal liveness checking mechanism & documents features

Above configuration installs iOS frameworks. For XCFramework, 'XCFramework' subspec can be used for face, face_document and document variants. Eg.

Ruby
1pod 'BiometricSDK-face_document/XCFramework'
  1. Then you can use install:
Bash
1pod install

Note: If you are already using our repo, and you cannot resolve some dependency, try to update the specs:

Bash
1pod repo-art update smartsdk

Manually

  1. Download the artifact manually from the artifactory:
  1. In the project editor, select the target to which you want to add a library or framework.

  2. Click Build Phases at the top of the project editor.

  3. Open the Embedded Binaries.

  4. Click the Add button (+).

  5. Click the Add Other button below the list.

  6. Add the following items:

    • BiometricSDK.framework
    • (optionally for face capture) BiometricSDKFaceCapturePluginNormal.framework (or other face capturing plugin)
    • (optionally for face capture) BiometricSDKAlgorithmPlugin_F6_5_LOW70.framework (or other matching algorithm plugin)
    • (optionally for finger capture new API) FingerCaptureSDK.framework
    • (optionally for finger capture new API) BiometricSDKUIFinger.framework

Note: XCFrameworks are supported with face, face_document and document variants. XCFrameworks are not yet supported with biometry, biometry_document, fingerprint variants.

SDK Size 

SDK variant                                                
SDK size
Face+Document+Fingerprint (offline liveness + matching)48.58 MB
Face+Document+Fingerprint (offline liveness)           40.35 MB
Face+Document+Fingerprint (backend)                    36.28 MB
Face+Fingerprint (offline liveness + matching)         35.53 MB
Face+Fingerprint (offline liveness)                  27.30 MB
Face+Fingerprint (backend)                           23.23 MB
Face (offline liveness + matching)                   32.65 MB
Face (offline liveness)                                24.42 MB
Document                                             11.11 MB
Face (backend)                                         20.35 MB
Document+Face (offline liveness + matching)          45.72 MB
Document+Face (offline liveness)                     37.49 MB
Document+Face (backend)                                33.42 MB
Fingerprint                                            07.70 MB

All sizes are estimated download sizes from App Store on arm64 devices. Note that universal IPA file size containing the SDK might be visibly different in case it's built also for other architectures and/or includes bitcode.

Sizes are total sizes for the whole packages which includes:

  • an appropriate SDK variant
  • capture plugins
  • algorithms plugins
  • UIExtension library
  • UIExtension's additional resources like tutorials and animations

Different packages variants contains:

  • offline liveness + matching: an appropriate SDK, Face Normal plugin, F5_4_LOW75 algorithm, UIExtensions, face capturing tutorials
  • offline liveness: SDK, Face Normal plugin, F6_0_IDD80 algorithm, UI
  • backend: SDK, Face Lite plugin, no algorithm, UI

License Manager 

Remember: A valid license is required before using any feature of the SDK.

To have a valid license:

  1. Obtain an instance of LicenseManager via provideLicenseManager() method.
  2. Call activate() method on it.

Before Starting 

Note: If you use the debug LKMS server without a SSL connection, you should add permission for the arbitrary loads in the transport security section in your Info.plist file. But it's highly recommended NOT to set this permission without the reason.

XML
1<key>NSAppTransportSecurity</key>
2 <dict>
3 <key>NSAllowsArbitraryLoads</key>
4 <true/>
5 </dict>

New license manager 

The License manager is the main entry point to use the SDK. You can manage licenses through LicenseManager.

Note: A valid license is required before using any feature of the SDK.

provideLicenseManager

This static method provides an instance of LicenseManager with a predefined LKMS profile. Any interaction with LicenseManager must be executed before starting capture.

Swift
1let manager = LicenseManager.provideLicenseManager(profileId: LkmsProfileId, apiKey: LkmsApiKey, serverUrl: lkmsUrl)

Activating license

This method fetches the license if it's not locally stored and activates it. Additionally, in cases where the license has expired, the function retrieves a new license. This process is crucial and must occur each time the application starts.

Callback solution:

Swift
1manager.activate { (error: LicenseActivationError) in
2 if let error {
3 // Failed to fetch or activate the license.
4 } else {
5 // License fetched and activated with success.
6 }
7 }

Async solution:

Swift
1let result: Result<Void, LicenseActivationError> = await manager.activate()
2 switch result {
3 case .success:
4 // License fetched and activated with success.
5 case .failure(let error):
6 // Failed to fetch or activate the license.
7 }

LicenseActivationError

This is the information about why the license can not be activated.

Attribute
Description
type ActivationErrorTypeThe type of error that occurred during the license activation.
message StringThe reason for the activation failure.

ActivationErrorType

Attribute
Description
profileExpiredThe profile has expired, all licenses won’t work anymore. (Contact with support)
activationCountExceededNo more licenses can be consumed. (Contact with support)
authenticationIssueThe credentials and/or profile are wrong.
connectionIssueConnection issue. (Check internet connection and server url)
unknownUnknown issue.

Development issues 

This issue occurs before 4.45.0

The LKMS license on your device may become invalidated when switching between debug and App Store (also TestFlight) builds of your app. To have a valid license, uninstall the app first and then switch to debug / App Store build. There is no need to uninstall the app when updating the app from the same source (debug build replaced with debug build or App Store build replaced with App Store build). In the SDK there is dedicated error for this: licenseSignatureVerificationFailed.

Now

If there is a switch between app builds (Debug or App Store) build, the LicenseManager will automatically resolve the license issue by reactivating it.

Introduction 

In order to make integration easier and more intuitive - new API has been delivered. It is based on use cases that are self-explaining which provide specific information depending on given use case. This allows to focus on working with data provided by SDK rather than on SDK configuration. What is more, some use cases allows to capture whole document (front and back sides) in single capture session - camera opens only once.

Integration 

Integration with new API is simple and consists of three steps.

  1. License activation and camera permission. In order to use SDK proper license has to be activated. Getting started section shows how to handle license and permissions.

  2. Add DocumentCaptureView to the layout. This will be not only capture preview but also entry point to the SDK.

1@property (weak, nonatomic) IBOutlet DocumentCaptureView *captureView;

This view implements DocumentCapture protocol which might be called to manage capture. It contains three methods: configure(with captureUseCase: CaptureUseCase), start(), stop().

Setting up is described below. Methods start and stop are similar to old API's methods to manage capture.

  1. Use case creation. In order to start capture, specific use case instance needs to be created. Each use case have sessionInfo property that contains session configuration and delegate that will be used to handle callback methods.

Once these three steps are satisfied, configure method on DocumentCaptureView might be called, passing use case instance as paramerer. Delegate attached to the use case will receive data from the capture.

Use cases 

Capture settings of DocumentCaptureSDK are done by using proper, predefined configuration designed for specific use case. In this way capture configuration is more intuitive and less confusing.

RemoteUseCase

This use case performs document capture with backend communication in order to allow manual verification of the document captured. In order to provide correct flow, RemoteCaptureDelegate, FeedbackDelegate and sessionInfo must be provided during RemoteUseCase initialization. FeedbackDelegate is mandatory to instruct user to properly place device during capture and also when to flip document if both sides are required for verification. RemoteCaptureDelegate informs about whole flow result and provides images of document captured. These images have to be approved in order to proceed with the process. sessionInfo provides information about document capture session on IDEMIA Identity and Verification service for SDK needs to continue the flow.

RemoteSessionInfo field
Description
sessionId StringLive capture session id created with: v1/identities/{identityId}/id-documents/live-capture-session
apiKey StringApiKey for authorization on DocServer.
url URLUrl of document server - for example: https://idproofing-api.environment.idemia.io/doc-server/
Swift
1if let useCase = DocumentCaptureUseCase.useCaseForType(self.useCaseType, sessionInfo: sessionInfo, delegate: self) {
2 self.captureView.configure(with: useCase)
3 self.captureView.start()
4}

Delegates 

Delegates available for specific use cases within new API for document capture.

RemoteCaptureDelegate

Delegate dedicated to remote use cases. Two methods needs to be implemented to provide correct flow to the user. Remember that all UI operations should be performed on main thread.

  1. func captureInfoReceived(images: [DocumentImage], finalizer: RemoteCaptureFinalizer) - this method is being called when document has been captured. List of images (front, back or both sides images) is returned. RemoteCaptureFinalizer instance allows to retry capture, cancel whole flow (Failure instance of Result will be returned on onResult method) or approve images which continues remote flow. Notice that RemoteCaptureFinalizer can retry capture which means that whole remote flow (including displaying captured document) must be performed on the same ViewController where DocumentCaptureView is definded.

  2. func captureDidFinish(remoteResult: RemoteResult) - returns result of remote flow. No other callback will occur after this method. Result might be type of Success or Failure.

Swift
1class DocumentCaptureViewController: UIViewController, RemoteCaptureDelegate {
2 func captureInfoReceived(images: [DocumentImage], finalizer: RemoteCaptureFinalizer) {
3 //Handle captured document
4 }
5
6 func captureDidFinish(remoteResult: RemoteResult) {
7 //remoteResult.isSuccessful ?
8 //true -> Handle success result
9 //false -> Handle error (remoteResult.error)
10 }
11}

FeedbackDelegate

Returns feedback about current capture. Feedback should be displayed to user. Only one function to implement: captureInfoReceived(feedback: FaceCaptureFeedback), where FaceCaptureFeedback is an enum telling about capture condition like: document is too far/too close to camera. Remember that all UI operations should be performed on main thread.

Swift
1class DocumentCaptureViewController: UIViewController, FeedbackDelegate {
2 func captureInfoReceived(feedback: FaceCaptureFeedback) {
3 //Present feedback to the user
4 }
5}

Errors 

RemoteError object contains a lot of useful information that helps in handling a failed flow.

Parameter
Description
type ErrorTypeType of an error. High level information what goes wrong. Find types description below.
code IntSpecial code dedicated for particular case. Very helpful in L2, L3 troubleshooting.
message StringMessage with error description.

FailureType

Type
Description
TIMEOUTTimeout occured during the flow.
CONNECTION_ISSUERemote connection issue.
AUTHENTICATIONRemote capture authentication issue.
INVALID_SESSIONRemote session is invalid.
BAD_CAPTUREDocument capture failed.
CANCELEDCapture has been cancelled by the end user.
INVALID_LICENSEThe LKMS license is invalid.
UNKNOWNUnknow type of error. Also used as default type for few cases.

Biometric Capture SDK 

Design Considerations 

This is the main entry point that will allow you to use the SDK.

Get Info about Biometric Capture SDK 

The purpose of this method is allow the integrator to retrieve information about the SDK.

Objective-C
1BIOSDKInfo *info = [BIOSDK getInfo];

Returns

An object of the BIOSDKInfo type with the information about the SDK.

BIOVideoRecordingOptions

This is the video recording object used to configure video recording.

Parameter
Description
recordingEnabledIs video recording enabled

BIODebugDataSettings

This is an object used for debug purposes. Currently it contains only one parameter which is a file path used for RTV video playback.

Parameter
Description
rtvFilePathPath to RTV file used for video playback.

Enums 

BIOLogLevel

These are the constants used to configure logs.

Attribute
Description
BIOLogLevelDebugDisplay all logs from SDK
BIOLogLevelInfoInformative message
BIOLogLevelWarningWarning message
BIOLogLevelErrorError message
BIOLogLevelNoneTurns logs off

BIOColorSpace

These are the ColorSpace constants.

Attribute
Description
BIOColorSpaceY8Grayscale 8bpp image
BIOColorSpaceY16LEGrayscale 16bpp image (Little Endian)
BIOColorSpaceBGR24Color 24bpp BGR image (BMP like memory layout)
BIOColorSpaceRGB24Color 24bpp RGB image (reversed memory layout compared to RT_COLORSPACE_BGR24)

BIOLocation

These are the biometric location constants.

Attribute
Description
BIOLocationFaceFrontalface
BIOLocationFingerRightIndexright index
BIOLocationFingerRightMiddleright middle
BIOLocationFingerRightRingright ring
BIOLocationFingerRightLittleright little
BIOLocationFingerRightThumbright thumb
BIOLocationFingerLeftIndexleft index
BIOLocationFingerLeftMiddleleft middle
BIOLocationFingerLeftRingleft ring
BIOLocationFingerLeftLittleleft little
BIOLocationFingerLeftThumbleft thumb
BIOLocationFingerUnknownfinger unknown
BIOLocationHandLefthand left
BIOLocationHandRighthand right
BIOLocationHandUnknownhand unknown

BIOModality

These are the biometric modality constants.

Attribute
Description
BIOModalityUnknownunknown
BIOModalityFaceFace
BIOModalityFrictionRidgeFriction ridge

BIOCaptureHandlerError

These are errors that can be thrown when there is an error with the capture handler.

Attribute
Description
BIOCaptureHandlerErrorSuccessNo error occurred
BIOCaptureHandlerErrorParametersWrong Parameters
BIOCaptureHandlerErrorParameterUnknownUnknown parameter
BIOCaptureHandlerErrorMemallocMemory allocation error
BIOCaptureHandlerErrorInitInitialization error
BIOCaptureHandlerErrorGraphInitialisationFailedGraph initialization failed
BIOCaptureHandlerErrorParameterNotFoundParameter not found
BIOCaptureHandlerErrorParameterSizeParameter size error
BIOCaptureHandlerErrorTypeMismatchType mismatch error
BIOCaptureHandlerErrorInvalidHandleInvalid handler
BIOCaptureHandlerErrorLicenseLicense is invalid
BIOCaptureHandlerErrorApplinotavailableThe application is not available
BIOCaptureHandlerErrorProfileNotAvailableThe profile is not available
BIOCaptureHandlerErrorSubprofileNotAvailableThe subprofile is not available
BIOCaptureHandlerErrorUnknownAn unknown error occurred
BIOCaptureHandlerErrorInvalidOperationThe operation is invalid
BIOCaptureHandlerErrorIncompatibleApiVersionThe API version is incompatible. Your application must be recompiled.
BIOCaptureHandlerErrorCameraErrorCamera issue has been encountered
BIOCaptureHandlerErrorParameterWrongTypeParameter is not the right type
BIOCaptureHandlerErrorParameterNotSetParameter is not set in current scope
BIOCaptureHandlerErrorCaptureIsLockedCapture is locked

BIOCapturingError

These are errors that can be thrown when there is an error during or after the capture.

Attribute
Description
BIOCapturingErrorUnknownUnknown error occurred
BIOCapturingErrorCaptureTimeoutCapture timeout
BIOCapturingErrorNotAliveThe capture returned an image with status not alive.
BIOCapturingErrorWrongBiometricLocationThe wrong biometric location was scanned (eg. looking for face, captured fingers).
BIOCapturingErrorImageBufferCould not read image buffer
BIOCapturingErrorBadCaptureFingersFingers were not captured properly
BIOCapturingErrorBadCaptureHandHand was not captured properly

BIOCamera

These are the constants used to configure the behavior of BioCapture.

Attribute
Description
BIOCameraFrontFront Camera
BIOCameraRearRear Camera

BIOOverlay

This is the enum used to configure the behavior of BioCapture.

Attribute
Description
BIOOverlayOFFOverlay off
BIOOverlayONOverlay on

BIOPreviewColorspace

These are the flags used to set the color space for the preview of the camera.

Attribute
Description
BIOPreviewColorspaceColorSets colorspace of preview to RGB24
BIOPreviewColorspaceColorBlurSets colorspace of preview to RGB24 with Blur
BIOPreviewColorspaceGraySets colorspace of preview to Grayscale
BIOPreviewColorspaceGrayBlurSets colorspace of preview to Grayscale with Blur
BIOPreviewColorspaceGrayBlurBorderedSets colorspace of preview to Grayscale with Blur and a white border

DocumentCaptureHandler 

Getting Started with DocumentCaptureHandler 

  1. Import the framework header to your view controller.
Objective-C
1#import <BiometricSDK/BiometricSDK.h>
  1. Add at least one UIImageView or subclasses to your layout. It will be used to preview the stream from camera. It is not necessary for the capture to have a preview.
Objective-C
1@property (weak, nonatomic) IBOutlet UIImageView *preview;
  1. Check your license status here.

  2. You also need to have property for DocumentCaptureHandler. This object is handling all operations related to capturing.

Objective-C
1[BIOSDK createDocumentCaptureHandlerWithOptions:options withCompletionHandler:^(id<DocumentCaptureHandler> captureHandler, NSError* error) {
2 self.captureHandler = captureHandler;
3 ...
4 }];
  1. Set the delegate for DocumentCaptureHandler to self. self will have to implement the DocumentCaptureHandlerDelegate protocol.
Objective-C
1[BIOSDK createDocumentCaptureHandlerWithOptions:options withCompletionHandler:^(id<DocumentCaptureHandler> captureHandler, NSError* error) {
2 self.captureHandler = captureHandler;
3 self.captureHandler.delegate = self;
4 ...
5 }];
6 }
  1. After DocumentCaptureHandler finishes its initialization, the preview view can be set.
Objective-C
1[BIOSDK createDocumentCaptureHandlerWithOptions:captureOptions withCompletionHandler:^(id<DocumentCaptureHandler> captureHandler, NSError* error) {
2 self.captureHandler = captureHandler;
3 self.captureHandler.delegate = self;
4 self.captureHandler.preview = self.preview;
5 ...
6 }];
  1. Now it can start capturing.
Objective-C
1[BIOSDK createDocumentCaptureHandlerWithOptions:options withCompletionHandler:^(id<DocumentCaptureHandler> captureHandler, NSError* error) {
2 self.captureHandler = captureHandler;
3 self.captureHandler.delegate = self;
4 self.captureHandler.preview = self.preview;
5 [self.captureHandler startCaptureWithCompletionHandlerError:nil];
6 }];
  1. Whenever the view controller disappears, resources (e.g. camera) need to be released.
Objective-C
1- (void)viewDidDisappear:(BOOL)animated{
2 [super viewDidDisappear:animated];
3 [self.captureHandler destroy];
4 }

DocumentCapture Handler Info 

Delegate

This sets the listener to receive the biometric information.

Objective-C
1handler.delegate = ... //Object that implements `DocumentCaptureHandlerDelegate` protocol

Preview

This sets the camera preview.

Objective-C
1handler.preview = ..... //An `UIImageView`

Note: To stop the camera preview, set preview to nil.

Debug Settings

This sets the camera preview.

Objective-C
1BIODebugDataSettings *settings = [[BIODebugDataSettings alloc] init];
2 settings.rtvFilePath = ... //A path to RTV video file used for video playback.
3 handler.debugSettings = settings;

Start Capture

This starts the biometric capture.

Objective-C
1[handler startCaptureWithCompletionHandler:^(NSError \* error) {
2 ...
3 }];
Parameter
Description
completionHandler void (^)(NSError *)Object with error code if an error occurred, else nil.

Stop Capture

This stops the biometric capture.

Objective-C
1[handler stopCaptureWithCompletionHandler:^(NSError \* error) {
2 ...
3 }];
Parameter
Description
completionHandler void (^)(NSError *)Object with error code if an error occurred, else nil.

Force Capture

There is possibility to force Biometric Capture SDK to capture a document image. To do so, you need to call the method forceCapture during the capture. The component will bypass the tracking and launch the full resolution capture.

Objective-C
1// Create and save reference to document capture handler
2 //Start capture
3 [self.documentCapture forceCapture];
Return
Description
NSErrorError with description, if any occurred.

Switch Camera

This switches between different cameras.

Objective-C
1[handler switchCamera:BIOCameraFront withError:&error];
2 [handler switchCamera:BIOCameraRear withError:&error];
Parameter
Description
camera BIOCameraFlag that selects the camera.
error NSError**Object with error code if an error occurred, else nil.

Overlay

This sets the overlay option.

Objective-C
1[self setOverlay:BIOOverlayOFF withError:&error];
2 [self setOverlay:BIOOverlayON withError:&error];
Parameter
Description
overlay BIOOverlayFlag that determines if an overlay should be on or off.
error NSError**Object with an error code if an error occurred, else nil.

Orientation

This sets the orientation option.

Objective-C
1[self setOrientation:BIOOrientationPortrait withError:&error];
2 [self setOrientation:BIOOrientationUpSideDown withError:&error];
3 [self setOrientation:BIOOrientationLandscapeLeft withError:&error];
4 [self setOrientation:BIOOrientationLandscapeRight withError:&error];
Parameter
Description
orientation BIOOrientationSpecifies the orientation of the preview.
error NSError**Object with error code if an error occurred, else nil.

Options

This retrieves the capture options used in this handler.

Note: Readonly

Objective-C
1DocumentCaptureOptions* options = handler.options;

Partial Dump Video

This dumps the last played sequences.

Objective-C
1[handler requestPartialDumpVideoWithError:&error];

Note: To dump a partial video, enable partialDumpVideoRecordEnable before starting a capture. This option should be set in the DocumentCaptureOptions that are used when creating the DocumentCaptureHandler.

Parameter
Description
error NSError**Object with error code if an error occurred, else nil.

Destroy

This releases all the handler resources.

Objective-C
1[handler destroy];

DocumentCaptureHandlerDelegate 

documentHandlerGetTrackingInformation:withError:

This method is called when there is new tracking information with the coordinates of the document position.

Callback for modes:

  • DocumentCaptureModeMRZImageMedium
  • DocumentCaptureModeBarcodeVeryLowID1
  • DocumentCaptureModeVeryLowID
  • DocumentCaptureModeVeryLowID1
  • DocumentCaptureModeMRZMediumVeryLowID
Objective-C
1-(void)documentHandlerGetTrackingInformation:(NSArray<BIODocumentTrackingInformation*>* )trackingInfo
2 withError:(NSError*)error
Parameter
Description
trackingInfo NSArray<BIODocumentTrackingInformation*>*Array of BIODocumentTrackingInformation with the tracking information.
error NSError*Error if any occurred, otherwise nil.

documentHandlerReadMRZ:record:withError:

This method that returns the lines of an MRZ if any is found and its MRZRecord that contains the information read from the MRZ.

Callback for modes:

  • DocumentCaptureModeReadMRZ
Objective-C
1-(void)documentHandlerReadMRZ:(NSArray<DocumentMRZLine*>* )lines
2 record:(MRZRecord*)record
3 withError:(NSError*)error;
Parameter
Description
lines NSArray<DocumentMRZLine*>*Array of document Lines read from document.
record MRZRecord*Object that contains the information read from the MRZ.
error NSError*Error if any occurred, otherwise nil.

documentHandlerCapturedDocumentImage:

This method returns the DocumentImage of the document read.

Callback for modes:

  • DocumentCaptureModeMRZImageMedium
  • DocumentCaptureModeBarcodeVeryLowID1
  • DocumentCaptureModeVeryLowID
  • DocumentCaptureModeVeryLowID1
  • DocumentCaptureModeMRZMediumVeryLowID
Objective-C
1-(void)documentHandlerCapturedDocumentImage:(DocumentImage*)documentImage
Parameter
Description
documentImage DocumentImage*Image of the document.

documentHandlerCapturedDocumentRectificationImage:withLabel:

This method will only be called if the rectification is set to BIORectificationEnabled. It returns a DocumentImage of the rectified region (eg. image of the portrait photo in a passport).

Callback for modes:

  • DocumentCaptureModeMRZImageMedium
  • DocumentCaptureModeBarcodeVeryLowID1
  • DocumentCaptureModeVeryLowID
  • DocumentCaptureModeVeryLowID1
  • DocumentCaptureModeMRZMediumVeryLowID
Objective-C
1-(void)documentHandlerCapturedDocumentRectificationImage:(DocumentImage*)rectificationImage
2 withLabel:(NSString*)label
Parameter
Description
rectificationImage DocumentImage*Rectified image.
label NSString*Label to identify where the rectified image is from.

documentHandlerReadBarCode:withError:

This method is only called when using a barcode capture mode. It returns the content of the barcode read as a string.

Callback for modes:

  • DocumentCaptureModeBarcode
  • DocumentCaptureModeBarcodePDF417
Objective-C
1-(void)documentHandlerReadBarCode:(NSArray<NSString*>* )barcodeInformation
2 withError:(NSError*)error
Parameter
Description
barcodeInformation NSArray<NSString*>*Array with the information retrieved from the barcode.
error NSError*Error if any occurred, otherwise nil.

documentHandlerReadBarCodeData:withError:

This method is only called when using a barcode capture mode. It returns the content of the barcode read as binary data.

Callback for modes:

  • DocumentCaptureModeBarcode
  • DocumentCaptureModeBarcodePDF417
Objective-C
1-(void)documentHandlerReadBarCodeData:(NSArray<NSData> )barcodeInformation
2withError:(NSError*)error
Parameter
Description
barcodeInformation NSArray<NSData*>*Array with the information retrieved from the barcode.
error NSError*Error if any occurred, otherwise nil.

documentHandlerReceiveInfo:withError:

This method is called whenever there is information that should be transmitted to the user (eg. BIODocInfoTooFar to "Document too far").

Callback for modes:

  • DocumentCaptureModeMRZImageMedium
  • DocumentCaptureModeBarcodeVeryLowID1
  • DocumentCaptureModeVeryLowID
  • DocumentCaptureModeVeryLowID1
  • DocumentCaptureModeMRZMediumVeryLowID
Objective-C
1-(void)documentHandlerReceiveInfo:(BIODocInfo)info
2 withError:(NSError*)error;
Parameter
Description
info BIODocInfoDescribes the action to the user that needs to be done to finish capturing.
error NSError*Error if any occurred, otherwise nil.

Helper Objects 

DocumentCaptureOptions

This object is used to configure the behavior of a document capture.

Attribute
Description
captureMode DocumentCaptureModeThe app enum option to configure the capture.
rectification BIORectificationEnables/Disables rectification.
camera BIOCameraThe app's camera option to configure the capture.
torch BUITorchOBSOLETE. Sets the torch value.
overlay BIOOverlayEnables/Disables Overlay.
captureTimeout longCapture timeout in seconds (default value 120.)
logLevel BIOLogLevelLevel of logs that are displayed during debug.
orientation BIOOrientationThis sets the orientation of the preview.
dumpFileEnable BOOLIf a dump file is enabled, the capture create logs.
dumpFileFolder NSString*Folder where the logs will be saved. If nil, it will be saved on the Documents folder.
videoRecordEnable BOOLIf video recording is enabled, the capture will be recorded.
videoRecordFolder NSString*Folder where recorded videos will be saved.
partialDumpVideoRecordEnable BOOLIf partial dump video recording is enabled, the capture can be afterwards be recorded.
partialDumpVideoRecordFolder NSString*Folder where partial dump recorded videos will be saved.
minDPI NSUIntegerMinimum DPI for a datapage. Its value should be from 1 up to 400. The default value depends on used capture mode and resolution scanning, also it is used only for modes that return an image.
acquisitionQualityLevel BIODocumentAcquisitionQualityLevelThe criteria of doc autocapture restrictiveness. The higher it is set, the higher the acquisition time is.
stillShootEnabled BOOLIf still shoot is enabled, then the capture is based on a still image instead of a video stream and therefore the captured image has a higher resolution (default value is false).
videoRecordingOptions BIOVideoRecordingOptionsIf still shoot is enabled, then the capture is based on a still image instead of a video stream and therefore the captured image has a higher resolution (default value is false).
feedbackSamplingTime NSTimeIntervalGenerate document feedback only after given interval, set in seconds. 0 means no filtering. Defaults to 2 seconds.

DocumentImage

This is an image object of a document. Subclasses BIOImage.

Parameter
Description
location BIODocLocationLocation of the image in the document.
trackingInfo NSArray<BIODocumentTrackingInformation*>*The coordinates of the separate regions of the document, if any.
buffer NSData*The image.
stride intThe stride of the biometric.
width uint32_tThe width of the image.
height uint32_tThe height of the image.
colorSpace BIOColorSpaceThe ColorSpace of the image.
resolution floatThe resolution of the image.
alive BOOLOBSOLETE. True is alive, otherwise false.
imageQuality intImage quality. Only available for fingerprint images, so it will always be 0.
docLevel BIODocLevelStatus about doclevel.
codeMode BIOCodedModeStatus about coded mode.

DocumentMRZLine

This the object that contains information from the MRZ line on document.

Parameter
Description
lineNumber intThe line number of the MRZ read.
consorank intThe rank number of the MRZ read.
text NSString*The MRZ text line.
docLevel BIODocLevelStatus about doclevel.
codeMode BIOCodedModeStatus about coded mode.

BIODocumentInformation

This object contains information about the location of information that is currently scanned from a document e.g. MRZ section.

Parameter
Description
location BIODocLocationFlag that reveals the type and location of the current data.

BIODocumentTrackingInformation

This object contains tracking document information or data on the document information, inherited from BIODocumentInformation.

Parameter
Description
point1 CGPointFirst point of information coordinates.
point2 CGPointSecond point of information coordinates.
point3 CGPointThird point of information coordinates.
point4 CGPointFourth point of information coordinates.
relativeSize CGSizeSize that the points are related to.

Enums 

DocumentCaptureMode

This enum is used to configure the behavior of DocumentCapture.

Attribute
Description
DocumentCaptureModeReadMRZReads MRZ lines.
DocumentCaptureModeMRZImageMediumReads MRZ lines and retrieves an image from the document. Capture is based on a video stream.
DocumentCaptureModeMRZImageStillMedium(DEPRECATED) Reads MRZ lines and retrieves an image from the document. Capture is based on a still image.
DocumentCaptureModeBarcodeReads a barcode.
DocumentCaptureModeBarcodePDF417Reads a barcode in PDF417 standard.
DocumentCaptureModeBarcodeVeryLowID1Captures an image at the device's best video resolution of a ID1 document with PDF417 barcode standard.
DocumentCaptureModeVeryLowID1Captures an image at the device's best video resolution of a ID1 document.
DocumentCaptureModeVeryLowIDCaptures an image at the device's best video resolution of ID1, ID2, and ID3 documents.
DocumentCaptureModeMRZMediumVeryLowIDReads MRZ and captures an image at the device's best video resolution of ID1, ID2, and ID3 documents.

BIOOCR (OBSOLETE)

This enum is used to enable/disable OCR.

Attribute
Description
BIOOCREnableEnables OCR
BIOOCRDisableDisables OCR

BIODocLevel

These are the constants used to give information concerning the confidence of the information returned.

Attribute
Description
BIODocLevelVeryLowDoc level very low
BIODocLevelLowDoc level low
BIODocLevelMediumDoc level medium
BIODocLevelHighDoc level high

BIOCodedMode

These are the constants used to gives information concerning the confidence of the information returned.

Attribute
Description
BIOCodedModeNominalAll video quality criteria have been fulfilled: best image returned.
BIOCodedModeForceForce capture trigger has been used.
BIOCodedModeTimeoutBest image returned on timeout.

BIORectification

This enum is used to enable/disable rectification.

Attribute
Description
BIORectificationEnabledEnables rectification
BIORectificationDisabledDisables rectification

BIODocInfo

These are the constants that are used to give info about capturing a document.

Attribute
Description
BIODocInfoBlurBLUR detected
BIODocInfoBadFramingBad framing detected
BIODocInfoStartStillStart point and shoot capture
BIODocInfoEndStillPoint and shoot capture done
BIODocInfoShakingShaking detected
BIODocInfoReflectionReflection detected
BIODocInfoHoldStraightHold document straight
BIODocInfoMovementDetectedMovement detected
BIODocInfoTooFarDocument is too far
BIODocInfoTooCloseDocument is too close
BIODocInfoLowLightNot enough light to capture document
BIODocInfoOKEverything is OK

BIODocLocation

This is the flag used to determine where data is being currently scanned.

Attribute
Description
BIODocLocationMRZMRZ region
BIODocLocationDatapageDatapage region
BIODocLocationPhotoPhoto region
BIODocLocationFullFull document region
BIODocLocationUnknownUnknown region

BIODocumentAcquisitionQualityLevel

This enum describes the criteria of doc autocapture restrictiveness. When the SDK tries to acquire the best possible image, it does it in intervals which fits within a timeout time. Every interval is less restrictive then a previous one.

Attribute
Description
BIODocumentAcquisitionQualityLevelHighWhen set, this tries to get the best image in three intervals. The first interval is the most restrictive.
BIODocumentAcquisitionQualityLevelMediumWhen set, this tries to get the best image in two intervals. The first interval is less restrictive than in the high level.
BIODocumentAcquisitionQualityLevelLowWhen set, this tries to get the best image in the firs two seconds. If a reflection or a low light condition is detected, they are ignored after the first two seconds.

DocumentImageQualityIndicators

Object provides quality indicators for taken document image

Parameter
Description
badFraming BOOLThe document has been detected partially.
blur BOOLThe document is not sharp enough.
glare BOOLThe document has light reflects.
tooClose BOOLThe document is too close.
tooFar BOOLThe document is too far.
notStraight BOOLThe document is not straight.
lowLight BOOLThe document lighting conditions are too low.
badConsistency BOOLUnable to detect enough consecutive good frames.
mrzBadDecoding DocumentImageQualityIndicatorUnable to decode MRZ on the document. This property defaults to DocumentImageQualityIndicatorNotApplicable, if this field is not mandatory for the capture.
pdf417BadDecoding DocumentImageQualityIndicatorUnable to decode PDF 417 on the document. This property defaults to DocumentImageQualityIndicatorNotApplicable, if this field is not mandatory for the capture.

DocumentImageQualityIndicator

This enum provides information about the indicator.

Attribute
Description
DocumentImageQualityIndicatorFalseIndicator is false.
DocumentImageQualityIndicatorTrueIndicator is true.
DocumentImageQualityIndicatorNotApplicableIndicator is not applicable for the capture.

Use Cases 

Read MRZ

This is an example of reading an MRZ document. This use case is intended to be used when the integrator wants to read the MRZ area of a document like on passports, but without retrieving an image of the document.

NOTE: This mode works only for MRZ with 2 or 3 lines. To capture document with 1 line MRZ please use MRZ + Document Image mode described in the next section.

capture_mrz

Read MRZ with Document Image

This reads a MRZ document and also captures an image of the document. This use case is intended to be used when the integrator wants to read the MRZ area of a document like on passports, and also retrieve an image of the document.

capture_mrz_image

Capture a Document Image

This captures an image of the document. This use case is intended to be used when the integrator wants to retrieve an image of the document.

capture_document_image

Compression Recommendations

Document images:

  • Recommandation is to send non-segmented images.
  • Recommended compression is JPEG92.
  • Size of image will be about 1 MB.
Objective-C
1- (NSData *)compressDocumentImage:(UIImage *)image {
2 CGFloat compressionQuality = 0.92;
3 return UIImageJPEGRepresentation(image, compressionQuality);
4 }

ImageUtils 

SDK provides methods to perform various operations on BIOImage such as for example converting BIOImage to various image formats. Those operations are described below.

Compress BIOImage to JPEG 

This is the method of the BIOImage class that converts the BIOImage object to NSData object with JPEG file with default compression quality (90% for finger images, 80% for face images, 70% for document images). Created JPEG will contain capture maker note data inside EXIF metadata containing information such as for example SDK version used for capturing the image.

Objective-C
1- (NSData *)toJPEG;
Return
Description
NSData*JPEG file binary data.

Compress BIOImage to JPEG with custom quality 

This is the method of the BIOImage class that converts the BIOImage object to NSData object with JPEG file with given compression quality level. Created JPEG will contain capture maker note data inside EXIF metadata containing information such as for example SDK version used for capturing the image.

Objective-C
1- (NSData *)toJPEGWithQuality:(CGFloat)quality;
Parameter
Description
quality CGFloatCompression quality in range [0, 1].
Return
Description
NSData*JPEG file binary data.

Get UIImage from BIOImageFromUIImage 

This is the method of UIImage (BIOImage) extension that converts a BIOImage to a UIImage.

Objective-C
1+ (UIImage*)imageFromBIOImage:(BIOImage*)bioImage
Parameter
Description
image BIOImage*BIOImage to convert to UIImage.
Return
Description
BIOImage*UIImage from BIOImage.

Get BIOImage from UIImage 

This is the method of the BIOImage (ImageGetters) extension that converts UIImage to BIOImage.

Objective-C
1+ (BIOImage*)BIOImageFromUIImage:(UIImage*)image;
Parameter
Description
image UIImage*UIImage to convert to BIOImage.
Return
Description
BIOImage*BIOImage from UIImage.

Create a BIOImage with Different Color Space 

This is the method of the BIOImage (ImageGetters) extension that converts a BIOImage to another BIOImage with a different color space.

Objective-C
1- (BIOImage*)BIOImageWithColorSpace:(BIOColorSpace)colorSpace;
Parameter
Description
colorSpace BIOColorSpaceColor space wanted for the new BIOImage.
Return
Description
BIOImage*BIOImage with the color space provided.

Compress Image with Quality to NSData 

This is a method of BIOImage (BIOResize) extension that compresses an image to a NSData* with determined quality.

Objective-C
1- (NSData*)dataByCompressingImageWithQuality:(uint32_t)quality
Parameter
Description
quality uint32_tQuality of the compression (value between 1 and 100).
Return
Description
NSData*Final data with compression applied.

Compress Image with Quality to BIOImage 

This is the method of the BIOImage (BIOResize) extension to compresses an image to a BIOImage* with determined quality.

Objective-C
1- (BIOImage*)imageByCompressingImageWithQuality:(uint32_t)quality
Parameter
Description
quality uint32_tQuality of the compression (value between 1 and 100.)
Return
Description
BIOImage*Final BIOImage with compression applied.

Compress Image from Size in Kilobytes to NSData 

This is the a method of the BIOImage (BIOResize) extension to compress an image to a NSData* with a determined final size in kilobytes.

Objective-C
1- (NSData*)dataByCompressingImageToSizeInKilobytes:(CGFloat)sizeInKilobytes
Parameter
Description
sizeInKilobytes CGFloatFinal size in kilobytes.
Return
Description
NSData*Final data with compression applied.

Compress Image from Size in Kilobytes to BIOImage 

This is a the method of the BIOImage (BIOResize) extension to compress an image to a BIOImage* with a determined final size in kilobytes.

Objective-C
1- (BIOImage*)imageByCompressingImageToSizeInKilobytes:(CGFloat)sizeInKilobytes
Parameter
Description
sizeInKilobytes CGFloatFinal size in kilobytes.
Return
Description
BIOImage*Final BIOImage with compression applied.

Compress Image from WSQ Ratio to NSData 

This is the method of the BIOImage(BIOResize) extension to compress an image from WSQ to a NSData* with a determined WSQ ratio. Only fingerprint images should be used in this method.

Objective-C
1- (NSData*)dataByCompressingImageToWSQRatio:(CGFloat)ratio withScannerBlack:(Byte)scannerBlack andScannerWhite:(Byte)scannerWhite;
Parameter
Description
ratio CGFloatWSQ ratio for the compression (value between 1.6 and 8000, recommended value between 12 and 15).
scannerBlack ByteBlack calibration value (if unknown use 0).

|scannerWhite Byte | White calibration value (if unknown use 255).

Return
Description
NSData*Final data with compression applied.

Compress Image from WSQ Ratio to BIOImage 

This is the method of the BIOImage (BIOResize) extension that compresses an image to a BIOImage* with a determined WSQ ratio. Only fingerprint images should be used in this method.

Objective-C
1- (BIOImage*)imageByCompressingImageToWSQRatio:(CGFloat)ratio withScannerBlack:(Byte)scannerBlack andScannerWhite:(Byte)scannerWhite;
Parameter
Description
ratio CGFloatWSQ ratio for the compression (value between 1.6 and 8000, recommended value between 12 and 15).

|scannerBlack Byte | Black calibration value (if unknown use 0). |scannerWhite Byte | White calibration value (if unknown use 255).

Return
Description
BIOImage*Final BIOImage with compression applied.

Compress Image from JPEG2000 to NSData 

This is the method of the BIOImage (BIOResize) extension that compresses and image to a NSData* in JPEG2000 format with a determined maximum size in kilobytes. Only fingerprint images should be used in this method.

Objective-C
1- (NSData*)dataByCompressingImageToJPEG2000InKilobytes:(CGFloat)maximumSizeInKilobytes
Parameter
Description
maximumSizeInKilobytes CGFloatMaximum size in kilobytes.
Return
Description
NSData*Final data with compression applied.

Compress Image from JPEG2000 to BIOImage 

This is the method of the BIOImage (BIOResize) extension that compresses an image to a JPEG2000 in a BIOImage* format with a determined maximum size in kilobytes. Only fingerprint images should be used in this method.

Objective-C
1- (BIOImage*)imageByCompressingImageToJPEG2000InKilobytes:(CGFloat)maximumSizeInKilobytes
Parameter
Description
maximumSizeInKilobytes CGFloatMaximum size in kilobytes.
Return
Description
BIOImage*Final BIOImage with compression applied.

Crop Image Region (document) 

This is the method of the BIOImage (RegionCropping) extension to crop a BIOImage to a determined region.

Objective-C
1+ (BIOImage*)cropImage:(BIOImage*)bioImage toRegion:(BIODocumentTrackingInformation*)documentTrackingInfo;
Parameter
Description
bioImage BIOImage*BIOImage to be cropped.
documentTrackingInfo BIODocumentTrackingInformation*Region coordinates that the BIOImage will be cropped to.
Return
Description
BIOImage*Final BIOImage with the result of the crop, or nil if an error occurred.

Crop Image Rect 

This is the method of the BIOImage (Cropping) extension to crop a BIOImage to a determined rectangle.

Objective-C
1- (instancetype _Nullable)cropToRect:(CGRect)rect withMargin:(CGFloat)margin;
2- (instancetype _Nullable)cropToRect:(CGRect)rect; // margin = 0
Parameter
Description
rect CGRectRegion coordinates that the BIOImage will be cropped to.
margin CGFloatOptional cropping margin
Return
Description
BIOImage*Final BIOImage with the result of the crop, or nil if an error occurred.

Crop Image Points 

This is the method of the BIOImage (Cropping) extension to crop a BIOImage to a determined rectangle determined by points.

Objective-C
1- (instancetype _Nullable)cropToRegionWithPoint1:(CGPoint)point1 point2:(CGPoint)point2 point3: (CGPoint)point3 point4:(CGPoint)point4 withMargin:(CGFloat)margin;
2- (instancetype _Nullable)cropToRegionWithPoint1:(CGPoint)point1 point2:(CGPoint)point2 point3: (CGPoint)point3 point4:(CGPoint)point4; // margin = 0
Parameter
Description
point1 CGPointFirst point of the region coordinates that the BIOImage will be cropped to.
point2 CGPointSecond point of the region coordinates that the BIOImage will be cropped to.
point3 CGPointThird point of the region coordinates that the BIOImage will be cropped to.
point4 CGPointFourth point of the region coordinates that the BIOImage will be cropped to.
margin CGFloatOptional cropping margin
Return
Description
BIOImage*Final BIOImage with the result of the crop, or nil if an error occurred.