New Face API
Main class
FaceCaptureView
View used to capture face.
Instance Methods
cancel()
Stops face capture process.
Swift1func cancel()
setup(with:uiSettings:)
Configures required for face capture.
Swift1func setup(with: FaceCaptureUseCase, uiSettings: UISettings?)
Property | Description |
---|---|
with FaceCaptureUseCase | Configured face capture use case. |
uiSettings uiSettings | Configured UI settings for UIExtensions view. |
start()
Starts face capture process.
Swift1func start()
Use Cases
FaceRemoteCaptureUseCase
Settings for capturing face with liveness check on backend side.
Parameter | Description |
---|---|
camera Camera | Camera to use for a capture. Can be front or back. Default value is front. |
captureLivenessDelegate CaptureLivenessDelegate? | Delegate used to handle information about liveness type. |
captureResultDelegate CaptureResultDelegate? | Delegate used to handle liveness active challenge. |
feedbackDelegate FaceFeedbackDelegate? | Delegate used to handle capture feedback. |
illuminationDemandDelegate CaptureIlluminationDelegate? | Delegate used to handle illumination updates. |
illuminationDelegate IlluminationDemandDelegate? | Delegate use to handle illumination sequence trigger. |
livenessActiveDelegate LivenessActiveDelegate? | Delegate used to handle liveness active challenge. |
livenessProcessingDelegate LivenessProcessingDelegate? | Delegate used to handle liveness processing updates. |
passiveVideoDelegate PassiveVideoDelegate? | Delegate used to handle face tracking data for passive video. |
stepInfoDelegate StepInfoDelegate? | Delegate used to handle information about step status. |
trackingDelegate FaceTrackingDelegate? | Delegate used to handle face tracking data. |
smileDelegate CaptureSmileDelegate? | Delegate used to handle smile updates. |
PassiveLivenessUseCase
This is a class used to configure offline use case in passive mode.
Parameter | Description |
---|---|
timeout Int | Timeout after which a capture will finish and return a timeout error. Value in seconds. Defaults to 120. |
camera Camera | Camera to use for a capture. Can be front or back. Default value is front. |
securityLevel SecurityLevel | Security level of a capture. Can be low, medium or high. Default value is high. |
delegats PassiveCaptureDelegates? | Delegates receiving notifications about a capture. |
maxCapturesBeforeDelay Int | Defines the maximum number of captures before locking the capture for a certain delay. Default value is 5. |
timeCaptureDelayArray Array | Property that defines capture delays (in seconds) for each lock which occur after number of captures configured with maxCapturesBeforeDelay property. Default values: [1 min, 5 min, 15 min, 1 hour]). |
ActiveCaptureUseCase
This is a class used to configure offline use case in active mode.
Parameter | Description |
---|---|
timeout Int | Timeout after which a capture will finish and return a timeout error. Value in seconds. Defaults to 120. |
camera Camera | Camera to use for a capture. Can be front or back. Default value is front. |
securityLevel SecurityLevel | Security level of a capture. Can be low, medium or high. Default value is high. |
numberOfPoints Int | Number of steps to perform during a capture. |
delegats PassiveCaptureDelegates? | Delegates receiving notifications about a capture. |
maxCapturesBeforeDelay Int | Defines the maximum number of captures before locking the capture for a certain delay. Default value is 5. |
timeCaptureDelayArray Array | Property that defines capture delays (in seconds) for each lock which occur after number of captures configured with maxCapturesBeforeDelay property. Default values: [1 min, 5 min, 15 min, 1 hour]. |
Delegates
RemoteCaptureDelegates
This is a delegate container passed to FaceRemoteCaptureUseCase
Parameter | Description |
---|---|
captureLivenessDelegate CaptureLivenessDelegate? | Delegate used to handle information about liveness type. |
captureResultDelegate CaptureResultDelegate | Delegate used to handle liveness active challenge. |
feedbackDelegate FaceFeedbackDelegate? | Delegate used to handle capture feedback. |
livenessActiveDelegate LivenessActiveDelegate? | Delegate used to handle liveness active challenge. |
livenessProcessingDelegate LivenessProcessingDelegate? | Delegate used to handle liveness processing updates. |
passiveVideoDelegate PassiveVideoDelegate? | Delegate used to handle face tracking data for passive video. |
stepInfoDelegate StepInfoDelegate? | Delegate used to handle information about step status. |
trackingDelegate FaceTrackingDelegate? | Delegate used to handle face tracking data. |
mlcDelegate CaptureSmileDelegate? | Delegate used to handle MLC mode during the capture. |
PassiveCaptureDelegates
This is a delegate container passed to PassiveLivenessUseCase
.
Parameter | Description |
---|---|
trackingInfoDelegate FaceTrackingDelegate? | Delegate used to handle face tracking data. |
captureFeedbackDelegate FaceFeedbackDelegate? | Delegate used to handle capture feedback. |
resultDelegate CaptureResultDelegate? | Delegate used to handle capture result. |
ActiveCaptureDelegates
This is a delegate container passed to ActiveCaptureDelegates
.
Parameter | Description |
---|---|
livenessActiveDelegate LivenessActiveDelegate? | elegate used to handle liveness active challenge. |
trackingInfoDelegate FaceTrackingDelegate? | Delegate used to handle face tracking data. |
captureFeedbackDelegate FaceFeedbackDelegate? | Delegate used to handle capture feedback. |
resultDelegate CaptureResultDelegate? | Delegate used to handle capture result. |
Callback parameters
FaceImage
Data of a captured face image.
Property | Description |
---|---|
data Data | Image data compressed to JPEG. |
eyes Eyes | Eyes position. |
height Int | Height of the image. |
metadata Data | Metadata of the image capture. |
width Int | Width of the image. |
FaceTrackingInfo
Realtime info of user’s face position and size.
Property | Description |
---|---|
height Int | Height frame face. |
width Int | Width frame face. |
x Int | Center face X coordinate. |
y Int | Center face Y coordinate. |
FaceCaptureResult
Capture result object.
Property | Description |
---|---|
captureError FaceCaptureError? | Capture error if occured. |
faceImage FaceImage? | Data of a captured face image. |
isSuccess Bool | Flag that indicates if the capture was successful. |
OvalOverlay
Oval overlay that is displayed during PassiveVideo use case
Property | Description |
---|---|
height Int | Height frame face. |
width Int | Width frame face. |
x Int | Center face X coordinate. |
y Int | Center face Y coordinate. |
PointerInfo
Contains Liveness Active pointer information. All coordinated and metrics are relative to the camera preview resolution.
Property | Description |
---|---|
show Int | Indicates whether heading point should be displayed. |
x Int | Stores x coordinate of the heading point (point that a user is controlling) |
y Int | Stores y coordinate of the heading point (point that a user is controlling) |
TargetInfo
Target object that is displayed to be connected during LivenessHigh use case challenge
Property | Description |
---|---|
completeness CGFloat | Indicates progress of the current target challenge. |
current Bool | Indicates whether point is currently in progress |
hash Int | Hash of the instance |
number Int | Indicates which target it is in order. |
radius Int | Indicates radius size in pixels. |
show Bool | Indicates whether target info should be displayed. |
x Int | Stores x coordinate of the target info (point which must be connected by point controlled by user) |
y Int | Stores y coordinate of the target info (point which must be connected by point controlled by user) |
UI Settings
UI settings for UIExtensions view.
Parameter | Description |
---|---|
livenessActiveCaptureSettings LivenessActiveCaptureSettings? | Liveness Active capture settings |
mlcCaptureSettings MLCCaptureSettings? | MLC capture setttings |
passiveCaptureSettingsackSettings PassiveCaptureSettings? | Passive capture settings |
passiveVideoCaptureSettings PassiveVideoCaptureSettings? | Passive Video capture settings |
PassiveVideoCaptureSettings
This is a class used to configure Passive Video capture UI.
Parameter | Description |
---|---|
captureViewFeedbackTextColor UIColor? | |
captureViewFeedbackTextFont UIFont? | |
captureViewOverlayColor UIColor? | |
captureViewProgressBackgroundColor UIColor? | |
captureViewProgressLineWidth CGFloat? | |
captureViewProgressOverlayOpacity Float? | |
faceOvalImageViewBorderColor UIColor? | |
faceOvalImageViewBorderWidth CGFloat? | |
hintsViewBackgroundColor UIColor? | |
hintsViewColor UIColor? | |
hintsViewDetailsColor UIColor? | |
hintsViewImageTintColor UIColor? | |
loadingIndicatorViewProgressBackgroundColor UIColor? | |
loadingIndicatorViewProgressBarWidth CGFloat? | |
loadingIndicatorViewProgressColor UIColor? |
PassiveCaptureSettings
This is a class used to configure Passive capture UI.
Parameter | Description |
---|---|
captureInfoViewBackgroundColor UIColor? | |
captureInfoViewCounterColor UIColor? | |
hintsViewBackgroundColor UIColor? | |
hintsViewColor UIColor? | |
hintsViewDetailsColor UIColor? | |
hintsViewImageTintColor UIColor? | |
hintsViewFaceImage UIImage? |
LivenessActiveCaptureSettings
This is a class used to configure Active capture UI.
Parameter | Description |
---|---|
challengeResultViewInvalidColor UIColor? | |
challengeResultViewValidColor UIColor? | |
hintBubbleViewBubbleColor UIColor? | |
hintBubbleViewFont UIFont? | |
hintBubbleViewShadowColor UIColor? | |
hintBubbleViewShadowOffset CGSize | |
hintBubbleViewShadowOpacity CGFloat | |
hintBubbleViewShadowRadius CGFloat | |
hintBubbleViewTextColor UIColor? | |
hintsViewColor UIColor? | |
hintsViewDetailsColor UIColor? | |
hintsViewImageTintColor UIColor? | |
linkViewDotDistance CGFloat? | |
linkViewDotMaxRadius CGFloat? | |
linkViewDotRadius CGFloat? | |
linkViewDottedLineFillColor UIColor? | |
linkViewDottedLineStrokeColor UIColor? | |
linkViewDottedLineStrokeWidth CGFloat? | |
startPointViewFillColor UIColor? | |
startPointViewPointSize CGSize? | |
startPointViewStrokeColor UIColor? | |
targetViewColorFailureBackgroundColor UIColor? | |
targetViewFailureImage UIImage? | |
targetViewFillColor UIColor? | |
targetViewProgressColor UIColor? | |
targetViewSuccessBackgroundColor UIColor? | |
targetViewSuccessImage UIImage? | |
targetViewTextColor UIColor? |
MLCCaptureSettings
This is a class used to configure MLC capture UI.
Parameter | Description |
---|---|
tappingFeedbackSettings TapingFeedbackSettings? | |
deviceVerticalTiltFeedbackSettings DeviceVerticalTiltFeedbackSettings? | |
mlcFeedbackSettings MLCFeedbackSettings? |
TappingFeedbackSettings
This is a class used to configure tapping feedback.
Parameter | Description |
---|---|
showFeedback Bool | Is tapping feedback enabled |
DeviceVerticalTiltFeedbackSettings
This is a class used to configure device vertical tilt feedback.
Parameter | Description |
---|---|
showFeedback Bool | Is device vertical tilt feedback enabled |
_MLCFeedbackSettings
This is a class used to configure MLC capture feedback.
Parameter | Description |
---|---|
showFeedback Bool | Are MLC capture feedback enabled |
feedbackDisplayTime TimeInterval | Time in seconds of displaying feedback messages |
smileAcquiredTextReadingDelay TimeInterval | Time in seconds of displaying (or reading) smile acquired text |
moveCloserTextDelay TimeInterval | Time in seconds of displaying (or reading) move closer text |
flashesWarningTextReadingDelay TimeInterval | Time in seconds of displaying (or reading) flashes warning text |
Errors
FaceCaptureError**
Object contains a lot of useful information that helps in handling a failed flow.
Parameter | Description |
---|---|
type FailureType | Type of an error. High level information what goes wrong. Find types description below. |
code Int | Special code dedicated for particular case. Very helpful in L2, L3 troubleshooting. |
message String | Message with error description. |
unlockDateTime NSNumber | Unix timestamp in "UTC" time zone when capture will be unblocked. This field have value when ErrorType is deviceBlocked . Please remember, the value is represented in milliseconds. |
failureReasons [FailureReason] | List containing enums with reasons of failure. |
ErrorType
Type | Description |
---|---|
timeout | Timeout occured during the flow. |
connectionIssue | Remote connection issue. |
authentication | Remote capture authentication issue. |
invalidSession | Remote session is invalid. |
badCapture | Face capture failed. |
cancelled | Capture has been cancelled by the end user. |
invalidLicense | The LKMS license is invalid. |
unknown | Unknown type of error. Also used as default type for few cases. |
deviceBlocked | Capture on this device got blocked for period of time, because of many failures. |
notAlive | Captured image with not alive person |
FailureReason
Type | Description |
---|---|
faceNotDetected | Face was not detected. |
insufficientSmile | Smile was not detected (or was not genuine enough) during MLC capture. |
incorrectFacePosition | Face was not correctly positioned within the frame. |
tooDark | It's too dark to perform the capture. |
tooBright | It's too bright to perform the capture. |
Document
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-C1-(void)documentHandlerGetTrackingInformation:(NSArray<BIODocumentTrackingInformation*>* )trackingInfo2 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-C1-(void)documentHandlerReadMRZ:(NSArray<DocumentMRZLine*>* )lines2 record:(MRZRecord*)record3 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-C1-(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-C1-(void)documentHandlerCapturedDocumentRectificationImage:(DocumentImage*)rectificationImage2 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-C1-(void)documentHandlerReadBarCode:(NSArray<NSString*>* )barcodeInformation2 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-C1-(void)documentHandlerReadBarCodeData:(NSArray<NSData> )barcodeInformation2withError:(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-C1-(void)documentHandlerReceiveInfo:(BIODocInfo)info2 withError:(NSError*)error;
Parameter | Description |
---|---|
info BIODocInfo | Describes 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 DocumentCaptureMode | The app enum option to configure the capture. |
rectification BIORectification | Enables/Disables rectification. |
camera BIOCamera | The app's camera option to configure the capture. |
torch BUITorch | OBSOLETE. Sets the torch value. |
overlay BIOOverlay | Enables/Disables Overlay. |
captureTimeout long | Capture timeout in seconds (default value 120 .) |
logLevel BIOLogLevel | Level of logs that are displayed during debug. |
orientation BIOOrientation | This sets the orientation of the preview. |
dumpFileEnable BOOL | If 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 BOOL | If video recording is enabled, the capture will be recorded. |
videoRecordFolder NSString* | Folder where recorded videos will be saved. |
partialDumpVideoRecordEnable BOOL | If 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 NSUInteger | Minimum 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 BIODocumentAcquisitionQualityLevel | The criteria of doc autocapture restrictiveness. The higher it is set, the higher the acquisition time is. |
stillShootEnabled BOOL | If 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 BIOVideoRecordingOptions | If 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 NSTimeInterval | Generate 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 BIODocLocation | Location 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 int | The stride of the biometric. |
width uint32_t | The width of the image. |
height uint32_t | The height of the image. |
colorSpace BIOColorSpace | The ColorSpace of the image. |
resolution float | The resolution of the image. |
alive BOOL | OBSOLETE. True is alive, otherwise false . |
imageQuality int | Image quality. Only available for fingerprint images, so it will always be 0 . |
docLevel BIODocLevel | Status about doclevel . |
codeMode BIOCodedMode | Status about coded mode. |
DocumentMRZLine
This the object that contains information from the MRZ line on document.
Parameter | Description |
---|---|
lineNumber int | The line number of the MRZ read. |
consorank int | The rank number of the MRZ read. |
text NSString* | The MRZ text line. |
docLevel BIODocLevel | Status about doclevel . |
codeMode BIOCodedMode | Status 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 BIODocLocation | Flag 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 CGPoint | First point of information coordinates. |
point2 CGPoint | Second point of information coordinates. |
point3 CGPoint | Third point of information coordinates. |
point4 CGPoint | Fourth point of information coordinates. |
relativeSize CGSize | Size that the points are related to. |
Enums
DocumentCaptureMode
This enum is used to configure the behavior of DocumentCapture
.
Attribute | Description |
---|---|
DocumentCaptureModeReadMRZ | Reads MRZ lines. |
DocumentCaptureModeMRZImageMedium | Reads 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. |
DocumentCaptureModeBarcode | Reads a barcode. |
DocumentCaptureModeBarcodePDF417 | Reads a barcode in PDF417 standard. |
DocumentCaptureModeBarcodeVeryLowID1 | Captures an image at the device's best video resolution of a ID1 document with PDF417 barcode standard. |
DocumentCaptureModeVeryLowID1 | Captures an image at the device's best video resolution of a ID1 document. |
DocumentCaptureModeVeryLowID | Captures an image at the device's best video resolution of ID1, ID2, and ID3 documents. |
DocumentCaptureModeMRZMediumVeryLowID | Reads 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 |
---|---|
BIOOCREnable | Enables OCR |
BIOOCRDisable | Disables OCR |
BIODocLevel
These are the constants used to give information concerning the confidence of the information returned.
Attribute | Description |
---|---|
BIODocLevelVeryLow | Doc level very low |
BIODocLevelLow | Doc level low |
BIODocLevelMedium | Doc level medium |
BIODocLevelHigh | Doc level high |
BIOCodedMode
These are the constants used to gives information concerning the confidence of the information returned.
Attribute | Description |
---|---|
BIOCodedModeNominal | All video quality criteria have been fulfilled: best image returned. |
BIOCodedModeForce | Force capture trigger has been used. |
BIOCodedModeTimeout | Best image returned on timeout. |
BIORectification
This enum is used to enable/disable rectification.
Attribute | Description |
---|---|
BIORectificationEnabled | Enables rectification |
BIORectificationDisabled | Disables rectification |
BIODocInfo
These are the constants that are used to give info about capturing a document.
Attribute | Description |
---|---|
BIODocInfoBlur | BLUR detected |
BIODocInfoBadFraming | Bad framing detected |
BIODocInfoStartStill | Start point and shoot capture |
BIODocInfoEndStill | Point and shoot capture done |
BIODocInfoShaking | Shaking detected |
BIODocInfoReflection | Reflection detected |
BIODocInfoHoldStraight | Hold document straight |
BIODocInfoMovementDetected | Movement detected |
BIODocInfoTooFar | Document is too far |
BIODocInfoTooClose | Document is too close |
BIODocInfoLowLight | Not enough light to capture document |
BIODocInfoOK | Everything is OK |
BIODocLocation
This is the flag used to determine where data is being currently scanned.
Attribute | Description |
---|---|
BIODocLocationMRZ | MRZ region |
BIODocLocationDatapage | Datapage region |
BIODocLocationPhoto | Photo region |
BIODocLocationFull | Full document region |
BIODocLocationUnknown | Unknown 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 |
---|---|
BIODocumentAcquisitionQualityLevelHigh | When set, this tries to get the best image in three intervals. The first interval is the most restrictive. |
BIODocumentAcquisitionQualityLevelMedium | When set, this tries to get the best image in two intervals. The first interval is less restrictive than in the high level. |
BIODocumentAcquisitionQualityLevelLow | When 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 BOOL | The document has been detected partially. |
blur BOOL | The document is not sharp enough. |
glare BOOL | The document has light reflects. |
tooClose BOOL | The document is too close. |
tooFar BOOL | The document is too far. |
notStraight BOOL | The document is not straight. |
lowLight BOOL | The document lighting conditions are too low. |
badConsistency BOOL | Unable to detect enough consecutive good frames. |
mrzBadDecoding DocumentImageQualityIndicator | Unable to decode MRZ on the document. This property defaults to DocumentImageQualityIndicatorNotApplicable , if this field is not mandatory for the capture. |
pdf417BadDecoding DocumentImageQualityIndicator | Unable 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 |
---|---|
DocumentImageQualityIndicatorFalse | Indicator is false. |
DocumentImageQualityIndicatorTrue | Indicator is true. |
DocumentImageQualityIndicatorNotApplicable | Indicator is not applicable for the capture. |
Get Info about Biometric Capture SDK
The purpose of this method is allow the integrator to retrieve information about the SDK.
Objective-C1BIOSDKInfo *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 |
---|---|
recordingEnabled | Is 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 |
---|---|
rtvFilePath | Path to RTV file used for video playback. |
Enums
BIOLogLevel
These are the constants used to configure logs.
Attribute | Description |
---|---|
BIOLogLevelDebug | Display all logs from SDK |
BIOLogLevelInfo | Informative message |
BIOLogLevelWarning | Warning message |
BIOLogLevelError | Error message |
BIOLogLevelNone | Turns logs off |
BIOColorSpace
These are the ColorSpace
constants.
Attribute | Description |
---|---|
BIOColorSpaceY8 | Grayscale 8bpp image |
BIOColorSpaceY16LE | Grayscale 16bpp image (Little Endian) |
BIOColorSpaceBGR24 | Color 24bpp BGR image (BMP like memory layout) |
BIOColorSpaceRGB24 | Color 24bpp RGB image (reversed memory layout compared to RT_COLORSPACE_BGR24) |
BIOLocation
These are the biometric location constants.
Attribute | Description |
---|---|
BIOLocationFaceFrontal | face |
BIOLocationFingerRightIndex | right index |
BIOLocationFingerRightMiddle | right middle |
BIOLocationFingerRightRing | right ring |
BIOLocationFingerRightLittle | right little |
BIOLocationFingerRightThumb | right thumb |
BIOLocationFingerLeftIndex | left index |
BIOLocationFingerLeftMiddle | left middle |
BIOLocationFingerLeftRing | left ring |
BIOLocationFingerLeftLittle | left little |
BIOLocationFingerLeftThumb | left thumb |
BIOLocationFingerUnknown | finger unknown |
BIOLocationHandLeft | hand left |
BIOLocationHandRight | hand right |
BIOLocationHandUnknown | hand unknown |
BIOModality
These are the biometric modality constants.
Attribute | Description |
---|---|
BIOModalityUnknown | unknown |
BIOModalityFace | Face |
BIOModalityFrictionRidge | Friction ridge |
BIOCaptureHandlerError
These are errors that can be thrown when there is an error with the capture handler.
Attribute | Description |
---|---|
BIOCaptureHandlerErrorSuccess | No error occurred |
BIOCaptureHandlerErrorParameters | Wrong Parameters |
BIOCaptureHandlerErrorParameterUnknown | Unknown parameter |
BIOCaptureHandlerErrorMemalloc | Memory allocation error |
BIOCaptureHandlerErrorInit | Initialization error |
BIOCaptureHandlerErrorGraphInitialisationFailed | Graph initialization failed |
BIOCaptureHandlerErrorParameterNotFound | Parameter not found |
BIOCaptureHandlerErrorParameterSize | Parameter size error |
BIOCaptureHandlerErrorTypeMismatch | Type mismatch error |
BIOCaptureHandlerErrorInvalidHandle | Invalid handler |
BIOCaptureHandlerErrorLicense | License is invalid |
BIOCaptureHandlerErrorApplinotavailable | The application is not available |
BIOCaptureHandlerErrorProfileNotAvailable | The profile is not available |
BIOCaptureHandlerErrorSubprofileNotAvailable | The subprofile is not available |
BIOCaptureHandlerErrorUnknown | An unknown error occurred |
BIOCaptureHandlerErrorInvalidOperation | The operation is invalid |
BIOCaptureHandlerErrorIncompatibleApiVersion | The API version is incompatible. Your application must be recompiled. |
BIOCaptureHandlerErrorCameraError | Camera issue has been encountered |
BIOCaptureHandlerErrorParameterWrongType | Parameter is not the right type |
BIOCaptureHandlerErrorParameterNotSet | Parameter is not set in current scope |
BIOCaptureHandlerErrorCaptureIsLocked | Capture is locked |
BIOCaptureHandlerErrorWrongFingersConfiguration | Using at the same time ensureFourFingersScanning and amputatedFingers is incompatible. : |
BIOCapturingError
These are errors that can be thrown when there is an error during or after the capture.
Attribute | Description |
---|---|
BIOCapturingErrorUnknown | Unknown error occurred |
BIOCapturingErrorCaptureTimeout | Capture timeout |
BIOCapturingErrorNotAlive | The capture returned an image with status not alive . |
BIOCapturingErrorWrongBiometricLocation | The wrong biometric location was scanned (eg. looking for face, captured fingers). |
BIOCapturingErrorImageBuffer | Could not read image buffer |
BIOCapturingErrorBadCaptureFingers | Fingers were not captured properly |
BIOCapturingErrorBadCaptureHand | Hand was not captured properly |
BIOCamera
These are the constants used to configure the behavior of BioCapture
.
Attribute | Description |
---|---|
BIOCameraFront | Front Camera |
BIOCameraRear | Rear Camera |
BIOOverlay
This is the enum used to configure the behavior of BioCapture
.
Attribute | Description |
---|---|
BIOOverlayOFF | Overlay off |
BIOOverlayON | Overlay on |
BIOPreviewColorspace
These are the flags used to set the color space for the preview of the camera.
Attribute | Description |
---|---|
BIOPreviewColorspaceColor | Sets colorspace of preview to RGB24 |
BIOPreviewColorspaceColorBlur | Sets colorspace of preview to RGB24 with Blur |
BIOPreviewColorspaceGray | Sets colorspace of preview to Grayscale |
BIOPreviewColorspaceGrayBlur | Sets colorspace of preview to Grayscale with Blur |
BIOPreviewColorspaceGrayBlurBordered | Sets colorspace of preview to Grayscale with Blur and a white border |
Face
Generic SDK Objects
This section is going to cover the generic objects that are necessary to use the Biometric Capture SDK.
BIOSDKInfo
This exposes information about the SDK.
Parameters
Parameter | Description |
---|---|
version NSString* | The version of the SDK. |
BIOBiometrics
This class holds all the different Biometrics that are going into a subclass.
Parameters
Parameter | Description |
---|---|
biometricLocation BIOLocation | The BiometricLocation enum option. |
biometricModality BIOModality | The BiometricModality enum option. |
BIOImage
This is the image object returned by the SDK. Its subclass is BIOBiometrics
.
Parameters
Parameter | Description |
---|---|
buffer NSData* | The image. |
stride int | The stride of the biometric. |
width uint32_t | The width of the image. |
height uint32_t | The height of the image. |
colorSpace BIOColorSpace | The ColorSpace of the image. |
resolution float | The resolution of the image. |
alive BOOL | OBSOLETE. True is alive, otherwise false . |
imageQuality int | Image quality if available, otherwise 0 . Currently only available for fingerprint images. |
BIOTemplate
This is a Biometric template object returned by the SDK. Its subclass is BIOBiometrics
.
Parameters
Parameter | Description |
---|---|
buffer NSData* | The template. |
uuid NSString* | The template uuid in the database (Could be null ). |
uuidUser NSString* | The user uuid (Could be null ). |
BIOFaceTemplate
This is a Biometric template for Face object returned by the SDK. Its subclass is BIOTemplate
.
Parameters
Parameter | Description |
---|---|
qualityRawValue NSInteger | The face quality raw value. |
quality FaceTemplateQuality | The face quality value interpretation. |
FaceTemplateQuality enum
This enum retrieves information about qulity of the face saved in template
Attribute | Description |
---|---|
FaceTemplateQualityLow | The quality of face is low (not recommended to perform matching). |
FaceTemplateQualityMedium | The quality of face is medium. |
FaceTemplateQualityHigh | The quality of face is high. |
BIOUser
This is the user object used to represent an individual in the SDK.
Parameters
Parameter | Description |
---|---|
name NSString* | The name of the user. |
uuid NSString* | The UUID of the user. |
BIOVideoRecordingOptions
This is the video recording object used to configure video recording.
Parameter | Description |
---|---|
recordingEnabled | Is 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 |
---|---|
rtvFilePath | Path to RTV file used for video playback. |
Enums
BIOLogLevel
These are the constants used to configure logs.
Attribute | Description |
---|---|
BIOLogLevelDebug | Display all logs from SDK |
BIOLogLevelInfo | Informative message |
BIOLogLevelWarning | Warning message |
BIOLogLevelError | Error message |
BIOLogLevelNone | Turns logs off |
BIOColorSpace
These are the ColorSpace
constants.
Attribute | Description |
---|---|
BIOColorSpaceY8 | Grayscale 8bpp image |
BIOColorSpaceY16LE | Grayscale 16bpp image (Little Endian) |
BIOColorSpaceBGR24 | Color 24bpp BGR image (BMP like memory layout) |
BIOColorSpaceRGB24 | Color 24bpp RGB image (reversed memory layout compared to RT_COLORSPACE_BGR24) |
BIOLocation
These are the biometric location constants.
Attribute | Description |
---|---|
BIOLocationFaceFrontal | face |
BIOLocationFingerRightIndex | right index |
BIOLocationFingerRightMiddle | right middle |
BIOLocationFingerRightRing | right ring |
BIOLocationFingerRightLittle | right little |
BIOLocationFingerRightThumb | right thumb |
BIOLocationFingerLeftIndex | left index |
BIOLocationFingerLeftMiddle | left middle |
BIOLocationFingerLeftRing | left ring |
BIOLocationFingerLeftLittle | left little |
BIOLocationFingerLeftThumb | left thumb |
BIOLocationFingerUnknown | finger unknown |
BIOLocationHandLeft | hand left |
BIOLocationHandRight | hand right |
BIOLocationHandUnknown | hand unknown |
BIOModality
These are the biometric modality constants.
Attribute | Description |
---|---|
BIOModalityUnknown | unknown |
BIOModalityFace | Face |
BIOModalityFrictionRidge | Friction ridge |
BIOCaptureHandlerError
These are errors that can be thrown when there is an error with the capture handler.
Attribute | Description |
---|---|
BIOCaptureHandlerErrorSuccess | No error occurred |
BIOCaptureHandlerErrorParameters | Wrong Parameters |
BIOCaptureHandlerErrorParameterUnknown | Unknown parameter |
BIOCaptureHandlerErrorMemalloc | Memory allocation error |
BIOCaptureHandlerErrorInit | Initialization error |
BIOCaptureHandlerErrorGraphInitialisationFailed | Graph initialization failed |
BIOCaptureHandlerErrorParameterNotFound | Parameter not found |
BIOCaptureHandlerErrorParameterSize | Parameter size error |
BIOCaptureHandlerErrorTypeMismatch | Type mismatch error |
BIOCaptureHandlerErrorInvalidHandle | Invalid handler |
BIOCaptureHandlerErrorLicense | License is invalid |
BIOCaptureHandlerErrorApplinotavailable | The application is not available |
BIOCaptureHandlerErrorProfileNotAvailable | The profile is not available |
BIOCaptureHandlerErrorSubprofileNotAvailable | The subprofile is not available |
BIOCaptureHandlerErrorUnknown | An unknown error occurred |
BIOCaptureHandlerErrorInvalidOperation | The operation is invalid |
BIOCaptureHandlerErrorIncompatibleApiVersion | The API version is incompatible. Your application must be recompiled. |
BIOCaptureHandlerErrorCameraError | Camera issue has been encountered |
BIOCaptureHandlerErrorParameterWrongType | Parameter is not the right type |
BIOCaptureHandlerErrorParameterNotSet | Parameter is not set in current scope |
BIOCaptureHandlerErrorCaptureIsLocked | Capture is locked |
BIOCapturingError
These are errors that can be thrown when there is an error during or after the capture.
Attribute | Description |
---|---|
BIOCapturingErrorUnknown | Unknown error occurred |
BIOCapturingErrorCaptureTimeout | Capture timeout |
BIOCapturingErrorNotAlive | The capture returned an image with status not alive . |
BIOCapturingErrorWrongBiometricLocation | The wrong biometric location was scanned (eg. looking for face, captured fingers). |
BIOCapturingErrorImageBuffer | Could not read image buffer |
BIOCapturingErrorBadCaptureFingers | Fingers were not captured properly |
BIOCapturingErrorBadCaptureHand | Hand was not captured properly |
BIOCamera
These are the constants used to configure the behavior of BioCapture
.
Attribute | Description |
---|---|
BIOCameraFront | Front Camera |
BIOCameraRear | Rear Camera |
BIOOverlay
This is the enum used to configure the behavior of BioCapture
.
Attribute | Description |
---|---|
BIOOverlayOFF | Overlay off |
BIOOverlayON | Overlay on |
BIOPreviewColorspace
These are the flags used to set the color space for the preview of the camera.
Attribute | Description |
---|---|
BIOPreviewColorspaceColor | Sets colorspace of preview to RGB24 |
BIOPreviewColorspaceColorBlur | Sets colorspace of preview to RGB24 with Blur |
BIOPreviewColorspaceGray | Sets colorspace of preview to Grayscale |
BIOPreviewColorspaceGrayBlur | Sets colorspace of preview to Grayscale with Blur |
BIOPreviewColorspaceGrayBlurBordered | Sets colorspace of preview to Grayscale with Blur and a white border |
FaceCaptureHandlerDelegate
FaceCaptureHandlerDelegate is a sub protocol of BIOReplayProtocol and implements all of its methods as well.
captureFinishedWithImages:withBiometrics:withError:
This is the main method called when images are captured and returned.
Objective-C1- (void)captureFinishedWithImages:(NSArray<BIOFaceImage*>* )images2 withBiometrics:(BIOBiometrics*)biometrics3 withError:(NSError*)error
Parameter | Description |
---|---|
images NSArray<BIOFaceImage*> | Array of images. BIOFaceImages with biometric data. |
biometrics BIOBiometrics* | Object that describes what biometric data was captured. |
error NSError* | Error if any occurred, otherwise nil . |
receiveBioCaptureInfo:withError:
This method is called whenever there is information that should be transmitted to the user (eg. BIOCapturingInfoFaceInfoTurnLeft
to "Turn Left"), or information about the current challenge.
Objective-C1- (void)receiveBioCaptureInfo:(BIOCapturingInfo)info2 withError:(NSError*)error
Parameter | Description |
---|---|
info BIOCapturingInfo | Describes action from the user that needs to be done to finish capturing. |
error NSError* | Error if any occurred, otherwise nil . |
receiveCr2DTargetInfo:atIndex:outOf:withError:
This method is called whenever there is an update about a target for the CR2D challenge. Its position is relative to the captured picture resolution.
Objective-C1- (void)receiveCr2DTargetInfo:(BIOCr2DTargetInfo *)target2 atIndex:(NSUInteger)index3 outOf:(NSUInteger)numberOfTargets4 withError:(NSError *)error
Parameter | Description |
---|---|
target BIOCr2DTargetInfo* | Contains information about the target. |
index NSUInteger | Number of the target. Starts with 0 . |
numberOfTargets NSUInteger | Total number of targets for a challenge. |
error NSError* | Error if any occurred, otherwise nil . |
receiveCr2DChallengeInfo:withError:
This method is called whenever there is information for the CR2D challenge. The challenge contains information about the current point. The position is relative to the captured picture resolution.
Objective-C1- (void)receiveCr2DChallengeInfo:(BIOCr2DChallengeInfo * _Nullable)challengeInfo2 withError:(NSError * _Nullable)error
Parameter | Description |
---|---|
challengeInfo BIOCr2DChallengeInfo* | Contains information about the heading point. |
error NSError* | Error if any occurred, otherwise nil . |
receiveFaceTrackingInfo:
This method is being called when there is a tracking information available about face and eyes position.
Objective-C1- (void)receiveFaceTrackingInfo:(BIOFaceTrackingInformation *)faceTrackingInfo
Parameter | Description |
---|---|
faceTrackingInfo BIOFaceTrackingInformation | Object containing face box cordinates, eyes position and size that those points are related to. |
RemoteFaceCaptureHandlerDelegate
Note: ⚠️ RemoteFaceCaptureHandlerDelegate is deprecated.
RemoteFaceCaptureHandlerDelegate is a sub protocol of BIOReplayProtocol and BIOPassiveVideoProtocol and implements all of their methods as well.
captureFinishedWithEncryptedMetadata:withFaceImage: (deprecated)
Method that is triggered when capture is finished and face metadata is available.
Objective-C1- (void)captureFinishedWithEncryptedMetadata:(BIOEncryptedData *)encryptedMetadata withFaceImage:(BIOFaceImage *)faceImage;
Parameter | Description |
---|---|
metadata BIOEncryptedData | Object with encrypted metadata that can be used for liveness verification on the server. |
faceImage BIOFaceImage | Object with captured face image that can be used to display it within the app. |
receiveBioCaptureInfo:withError: (deprecated)
This method is called whenever there is information that should be transmitted to the user (eg. BIOCapturingInfoFaceInfoTurnLeft
to "Turn Left"), or information about the current challenge.
Objective-C1- (void)receiveBioCaptureInfo:(BIOCapturingInfo)info2 withError:(NSError*)error
Parameter | Description |
---|---|
info BIOCapturingInfo | Describes action from the user that needs to be done to finish capturing. |
error NSError* | Error if any occurred, otherwise nil . |
receiveCr2DTargetInfo:atIndex:outOf:withError: (deprecated)
This method is called whenever there is an update about a target for the CR2D challenge. Its position is relative to the captured picture resolution.
Objective-C1- (void)receiveCr2DTargetInfo:(BIOCr2DTargetInfo *)target2 atIndex:(NSUInteger)index3 outOf:(NSUInteger)numberOfTargets4 withError:(NSError *)error
Parameter | Description |
---|---|
target BIOCr2DTargetInfo* | Contains information about the target. |
index NSUInteger | Number of the target. Starts with 0 . |
numberOfTargets NSUInteger | Total number of targets for a challenge. |
error NSError* | Error if any occurred, otherwise nil . |
receiveCr2DChallengeInfo:withError: (deprecated)
This method is called whenever there is information for the CR2D challenge. The challenge contains information about the current point. The position is relative to the captured picture resolution.
Objective-C1- (void)receiveCr2DChallengeInfo:(BIOCr2DChallengeInfo * _Nullable)challengeInfo2 withError:(NSError * _Nullable)error
Parameter | Description |
---|---|
challengeInfo BIOCr2DChallengeInfo* | Contains information about the heading point. |
error NSError* | Error if any occurred, otherwise nil . |
BIOPassiveVideoProtocol
passiveVideoPreparationDidStart
Method that is triggered when BIORemoteFaceCaptureHandler receive info update about Passive Video Liveness starts preparation.
Objective-C1- (void)passiveVideoPreparationDidStart;
passiveVideoPreparationDidEnd
Method that is triggered when BIORemoteFaceCaptureHandler receive info update about Passive Video Liveness ends preparation.
Objective-C1- (void)passiveVideoPreparationDidEnd;
passiveVideoOverlayDidUpdate:andPosition:orError:
Method that is triggered when BIORemoteFaceCaptureHandler receive any info update about update for passive video overlay.
Objective-C1- (void)passiveVideoOverlayDidUpdate:(CGSize)overlaySize andPosition:(CGPoint)position orError:(NSError *)error;
Parameter | Description |
---|---|
overlaySize CGSize | Size of the overlay, if error CGSize.zero . |
position CGPoint | Position of the overlay, if error CGPoint.zero |
error NSError* | Error if something was wrong otherwise nil |
passiveVideoProgressDidUpdate:orError:
Method that is triggered when BIORemoteFaceCaptureHandler receive any info update about progress for passive video liveness check.
Objective-C1- (void)passiveVideoProgressDidUpdate:(CGFloat)progress orError:(NSError *)error;
Parameter | Description |
---|---|
progress CGSize | Progress of the passive video check, if error 0 |
error NSError* | Error if something was wrong otherwise nil |
Helper Objects
FaceCaptureOptions / RemoteFaceCaptureOptions
Note: RemoteFaceCaptureOptions are deprecated.
This is the object used to configure the behavior of BioCapture
.
Attribute | Description | FaceCaptureOptions | RemoteFaceCaptureOptions |
---|---|---|---|
livenessMode FaceCaptureLivenessMode | The app enum option to configure the FaceCaptureLivenessMode . | YES | YES |
securityLevel FaceLivenessSecurityLevel | The app enum option to configure FaceLivenessSecurityLevel . (high by default.) | YES | YES |
cr2dMode BIOCr2dMode* | Sets the CR2D mode. It's valid when livenessMode is set to FaceCaptureLivenessModeActive . Can be set to BIORandomCr2dMode, BIOFixedTargetCr2dMode, BIOPathCr2dMode. The default mode is BIORandomCr2dMode. | YES | YES |
challengeIntervalDelay NSTimeInterval | Sets the time interval between challenges. | YES | YES |
maxCapturesBeforeDelay NSInteger | Property that defines the maximum number of captures before locking the capture for a certain delay. (Default: 5). It can be set to -1 to disable locking based on repeated failed captures. | YES | NO |
timeCaptureDelayArray NSArray | Property that defines capture delays (in seconds) for each lock which occur after number of captures configured with maxCapturesBeforeDelay property. First lock after maxCapturesBeforeDelay will take as long as the number of seconds defined in the first element from timeCaptureDelayArray. Second lock after maxCapturesBeforeDelay will take as long as the number of seconds defined in the second element from timeCaptureDelayArray and so on. For all capture attempts after the array length, last element of the array is used. All values are in seconds. Default values: [1*60, 5*60, 15*60, 60*60]). | YES | NO |
camera BIOCamera | The app Camera option to configure BioCapture . | YES | YES |
torch BIOTorch | OBSOLETE. Sets the torch value. | YES | YES |
overlay BIOOverlay | Sets the overlay value. | YES | YES |
captureTimeout NSTimeInterval | Capture timeout in seconds (default value 120 ). | YES | YES |
logLevel BIOLogLevel | Level of logs that are displayed during debug. | YES | YES |
orientation BIOOrientation | Sets the orientation that the capture will be done in. | YES | YES |
previewColorspace BIOPreviewColorspace | Option that sets colorspace of the camera preview. | YES | YES |
dumpFileEnable BOOL | If dump file is enabled, the capture create logs. | YES | YES |
dumpFileFolder NSString* | Folder where the logs will be saved. If nil it will be saved on the Documents folder. | YES | YES |
dumpMetadataEnable BOOL | If dump metadata is enabled, the capture saves metadata. | YES | YES |
dumpMetadataFolder NSString* | Folder where the metadata will be saved. If nil it will be saved on the Documents folder. | YES | YES |
videoRecordEnable BOOL | If video recording is enabled, the capture will be recorded. | YES | YES |
videoRecordFolder NSString* | Folder where recorded videos will be saved. | YES | YES |
partialDumpVideoRecordEnable BOOL | If partial dump video recording is enabled, the capture can be recorded afterwards. | YES | YES |
partialDumpVideoRecordFolder NSString* | Folder where partial dump recorded videos will be saved. | YES | YES |
challengeIntervalDelay NSTimeInterval | Sets the time interval delay between challenges. | YES | YES |
videoRecordingOptions BIOVideoRecordingOptions | The video recording related options. | YES | NO |
BIOCr2dMode
Ths is a CR2D mode base class. All CR2D modes inherits from it.
Note: It should NOT be used independently.
BIORandomCr2dMode
This CR2D mode is where the target is fully random.
Objective-C1FaceCaptureOptions* options = [[FaceCaptureOptions alloc] initWithLivenessMode:FaceCaptureLivenessModeActive];2 // [...]3 options.cr2dMode = [BIOCr2dMode random];
BIOFixedTargetCr2dMode
CR2D mode is where the target has a defined position. The position values x
and y
are normalized to be independent from the screen dimensions.
Both are values between -1.0 through 0.0 to 1.0.
- [-1.0, -1.0] - top, left corner of the screen
- [ 0.0, 0.0] - center of the screen
- [ 1.0, 1.0] - bottom, right corner of the screen
Objective-C1FaceCaptureOptions* options = [[FaceCaptureOptions alloc] initWithLivenessMode:FaceCaptureLivenessModeActive];2 // [...]3 CGSize targetPosition = CGSizeMake(0, 0);4 options.cr2dMode = [BIOCr2dMode fixedTargetWithPosition:targetPosition];
BIOPathCr2dMode
This is a CR2D mode where there is more than one target. The number of the targets is defined by the targetsNumber
parameter.
Objective-C1FaceCaptureOptions* options = [[FaceCaptureOptions alloc] initWithLivenessMode:FaceCaptureLivenessModeActive];2 // [...]3 NSInteger numberOfTargets = 4;4 options.cr2dMode = [BIOCr2dMode pathWithNumberOfTargets:numberOfTargets];
BIOTrainingCr2dMode
This is a CR2D mode where it's possible to set a starting point and an end point of a challenge.
Objective-C1FaceCaptureOptions* options = [[FaceCaptureOptions alloc] initWithLivenessMode:FaceCaptureLivenessModeActive];2 // [...]3 CGSize startingPosition = CGSizeMake(0, 0);4 CGSize targetPosition = CGSizeMake(1, 0);5 options.cr2dMode = [BIOCr2dMode pathWithNumberOfTargets:numberOfTargets];
BIOChallengeInfo
The object contains information about the ongoing challenge.
Parameters
Parameter | Description |
---|---|
currentChallengeNumber NSInteger | Number of a current challenge. |
totalChallenges NSInteger | Total number of challenges. |
BIOCr2DChallengeInfo
The object contains the CR2D challenge info. All coordinates and metrics are relative to the camera preview resolution.
PARAMETERS
Parameter | Description |
---|---|
headingPointVisible BOOL | If the heading point should be displayed or not. |
headingPoint CGPoint | X,Y coordinates of the heading point (the point where a user is looking at) |
BIOCr2DTargetInfo
The object that is a representation of a target for the CR2D challenge.
PARAMETERS
Parameter | Description |
---|---|
number NSUInteger | Target number, starts with 0 . |
visible BOOL | Tells if the target should be displayed or not. |
current BOOL | Tells if target is the current one for the try. |
position CGPoint | X,Y coordinates of the target center. |
radius CGFloat | Target area radius in pixels. |
|completeness CGFloat | Property tells how long it requires the heading point to be in the target area to pass the try. The value is a float type between 0
and 1
. Where values means: 0
- the heading point is NOT in the target area; 0..1
- when it's getting bigger, the heading point is in the target area and should be kept still. When it's getting smaller, the heading point is outside of the target area;1
- the try is passed.
BIOFaceImage
This is the image object of a face. Subclass BIOImage.
Parameter | Description | Notes |
---|---|---|
buffer NSData* | The image. | |
stride int | The stride of the biometric. | |
width uint32_t | The width of the image. | |
height uint32_t | The height of the image. | |
colorSpace BIOColorSpace | The ColorSpace of the image. | |
resolution float | The resolution of the image. | |
alive BOOL | Trueis alive, otherwise false` | OBSOLETE. Use livenessStatus instead. |
livenessStatus BIOFaceLivenessStatus | The liveness status of the liveness checking mechanism. | |
imageQuality int | Image quality. Only available for fingerprint images, so it will always be 0 | |
faceMetadata BIOFaceMetadata | Captured face metadata | |
faceTrackingInfo BIOFaceTrackingInformation | Face tracking information |
BIOFaceMetadata
This is the face metadata that can be used for liveness verification with server.
Parameter | Description |
---|---|
data NSData* | Face metadata |
BIOEncryptedData
This is encrypted face metadata that can be used for liveness verification with server.
Parameter | Description |
---|---|
data NSData* | Encrypted face metadata |
masterSecret NSData* | Encrypted master secret |
BIOFaceTrackingInformation
This is face tracking information with information such as the face's position or eyes' position
Parameter | Description |
---|---|
faceBox CGRect | Face's position and size. |
leftEye BIOEye* | Left eye |
rightEye BIOEye* | Right eye |
relativeSize CGSize | Size that the points are related to |
Enums
BIOFaceLivenessStatus
The enum describes liveness status of BIOFaceImage
.
Attribute | Description |
---|---|
BIOFaceLivenessStatusFake | The SDK determined the liveness challenge to have failed. The face image is probably a photocopy or a mask. |
BIOFaceLivenessStatusLive | The SDK determined the liveness challenge to have passed. The face image is probably of an alive person. |
BIOFaceLivenessStatusNoDecision | The SDK cannot determine if the face image is of a live person or of a mask/photocopy. The image should be processed by the server to be sure. |
BIOFaceLivenessStatusUnknown | Capture was performed using NoLiveness mode. |
BIOCapturingInfo
This is the Bio capture info constants.
Attribute | Description | Notes |
---|---|---|
BIOCapturingInfoUndefined | Undefined info. | OBSOLETE |
BIOCapturingInfoFaceInfoGetOutField | Get out of the camera field. | OBSOLETE |
BIOCapturingInfoFaceInfoComeBackField | Come back in the camera field. | |
BIOCapturingInfoFaceInfoTurnLeft | Turn head left. | |
BIOCapturingInfoFaceInfoTurnRight | Turn head right. | OBSOLETE |
BIOCapturingInfoFaceInfoCenterTurnLeft | Face center but turn head left. | |
BIOCapturingInfoFaceInfoCenterTurnRight | Face center but turn head right. | |
BIOCapturingInfoFaceInfoCenterRotateDown | Face center but rotate head down. | |
BIOCapturingInfoFaceInfoCenterRotateUp | Face center but rotate head up. | |
BIOCapturingInfoFaceInfoCenterTiltLeft | Face center but tilt head left. | |
BIOCapturingInfoFaceInfoCenterTiltRight | Face center but tilt head right. | |
BIOCapturingInfoFaceInfoCenterMoveForwards | Move forwards. | |
BIOCapturingInfoFaceInfoCenterMoveBackwards | Move backwards. | |
BIOCapturingInfoFaceInfoCenterLookFrontOfCamera | Look in front of the camera. | OBSOLETE |
BIOCapturingInfoFaceInfoCenterLookCameraWithLessMovement | Look at the camera with less movement. | OBSOLETE |
BIOCapturingInfoFaceInfoTurnLeftRight | Turn left then right or right then left. | OBSOLETE |
BIOCapturingInfoFaceInfoTurnDown | Turn head down. | OBSOLETE |
BIOCapturingInfoFaceInfoTimeOut | Timeout occurred. | OBSOLETE |
BIOCapturingInfoFaceInfoUnsuccessfulAttempt | Unsuccessful attempt. | OBSOLETE |
BIOCapturingInfoFaceInfoTooFast | Moved the head too fast. | |
BIOCapturingInfoFaceInfoCenterGood | Good position of head. | |
BIOCapturingInfoFaceInfoDontMove | Don't move. | |
BIOCapturingInfoFaceInfoChallenge2D | Move the challenge point to the target using head movements. | |
BIOCapturingInfoFaceInfoMoveBrighterArea | Move to a brighter area, because exposure is too dark. | OBSOLETE |
BIOCapturingInfoFaceInfoMoveDarkerArea | Move to darker area, because exposure is too bright. | OBSOLETE |
BIOCapturingInfoFaceInfoStandStill | Stand still during the illumination check. | |
BIOCapturingInfoDeviceMovementDetected | Device is being moved but should stay still. | |
BIOCapturingInfoDeviceMovementEnded | Device is no longer moved and stays still. | |
BIOCapturingInfoNoFaceMovementDetected | Head movement is expected but not detected. | |
BIOCapturingInfoFaceInfoOpenEyes | Open eyes. | OBSOLETE |
BIOCapturingInfoDeviceMovementEnded | User stopped moving the device. |
FaceCaptureLivenessMode
This is the enum used to configure the behavior of BioCapture
.
Attribute | Description |
---|---|
FaceCaptureLivenessModePassiveVideo | Face tracking with passive video liveness for the sever integration only. |
FaceCaptureLivenessModePassive | Face tracking with passive liveness. |
FaceCaptureLivenessModeActive | Face tracking using CR2D challenge of liveness. |
FaceCaptureLivenessModeNoLiveness | Face tracking with default subprofile. |
FaceLivenessSecurityLevel
This enum is used to configure the security level of a used capture mode. The modes have different APCER (Attack Presentation Classification Error Rate) values. APCER
- Proportion of presentations using the same PAI (Presentation Attack Instrument) species incorrectly classified as bona fide presentations in a specific scenario. That is the equivalent of False Acceptance. The lower the better.
By default:
FaceLivenessSecurityLevelHigh
is used for all modes (FaceCaptureLivenessModeHigh
,FaceCaptureLivenessModePassive
,FaceCaptureLivenessModeVideoPassive
)
Attribute | Description | Notes |
---|---|---|
FaceLivenessSecurityLevelLow | Low security level | APCER ~6% |
FaceLivenessSecurityLevelMedium | Medium security level | APCER ~3% |
FaceLivenessSecurityLevelHigh | High security level | APCER ~1% |
The goal of the face liveness feature is to provide mechanisms that prevent and or fight fraud attempts. For example, through the use of still images or photos and or videos of a given person.
This IDEMIA Biometric Capture SDK offers three anti-spoofing measures:
- Artefact detection: the SDK detects artefacts that occur when a fraudster tries to perform face acquisition by placing the smartphone’s camera in front of a video feed.
- 3D model analysis: the SDK detects that the face is in three dimensions. To do this, the SDK asks the user to move his head or his smartphone.
- CR2D challenge: the SDK asks the user to perform a task. The task is to move the target point using a movement of the user's head.
Biometric Mode | 3D model analysis | Artefacts (video attack detection) |
---|---|---|
FaceCaptureModeLivenessLow | LOW | ON |
FaceCaptureModeLivenessActive | HIGH | ON |
FaceCaptureModeLivenessPassive | HIGH | ON |
FaceCaptureModeLivenessPassiveVideo | SERVER ONLY | SERVER ONLY |
FaceCaptureModeNoLiveness | Not applicable | OFF |
Finger
Get Info about Biometric Capture SDK
The purpose of this method is allow the integrator to retrieve information about the SDK.
Objective-C1BIOSDKInfo *info = [BIOSDK getInfo];
Returns
An object of the BIOSDKInfo type with the information about the SDK.
Create a FingerCaptureHandler
This retrieves a capture handler to perform finger biometric capture operations. You must configure first the capture options.
-
Please check the use case named Capture finger Biometrics.
-
Also, you can check all the features provided by this handler here.
Objective-C1@interface ViewController () <FingerCaptureHandlerDelegate>2 @property (strong, nonatomic) id<FingerCaptureHandler> captureHandler;3 @end4 ...5 [BIOSDK createFingerCaptureHandlerWithOptions:[FingerCaptureOptions new] withCompletionHandler:^(id<FingerCaptureHandler> captureHandler, NSError* error) {6 if (!error) {7 self.captureHandler = captureHandler;8 self.captureHandler.delegate = self;9 ...10 }11 }];
Parameter | Description |
---|---|
options FingerCaptureOptions* | The capture options to configure the bio capture handler. |
completionHandler void (^)(id | Block of code that will be called after the FaceCaptureHandler finishes initialization. It will pass an error if any occurred. |
Note: The errors code list is here
Create a BIOMatcherHandler
This retrieves a handler to perform all the matching, identifying, and template coding operations.
-
Please check the use case named Create BIOMatcherHandler.
-
Also, you can check all the features provided by this handler here.
Objective-C1@interface ViewController () <BIOCaptureHandlerDelegate>2 @property (strong, nonatomic) id<FaceCaptureHandler> captureHandler;3 @end4 .....5 [BIOSDK createMatcherHandlerWithOptions:[BIOMatcherHandlerOptions new]6 withCompletionHandler:^(id<BIOMatcherHandler> matcherHandler, NSError* error) {7 self.matcherHandler = matcherHandler;8 ....9 }];
Parameter | Description |
---|---|
options BIOMatcherHandlerOptions* | Object that can configure a session of matcher handler. |
completionHandler void (^)(id | Block of code that will be called after BIOMatcherHandler finishes initialization. It will pass an error if any occurred. |
BIOReplayProtocol
This protocol defines the methods that will be available in all capture handlers. However, they should be implemented to reference its sub protocols (eg. FaceCaptureHandlerDelegate
) instead of BIOReplayProtocol
.
captureFinishedWithError
This method is called whenever a capture finished with an error and cannot be resumed by Biometric Capture SDK.
Objective-C1-(void)captureFinishedWithError:(NSError*)error
Parameter | Description |
---|---|
error NSError* | The error that caused the capture to finish. |
replayDidFinishRecording
This method is called whenever a replay finished playing. These replays are used to play the recorded videos of a capture for debugging purposes.
Objective-C1-(void)replayDidFinishRecording
Generic SDK Objects
This section is going to cover the generic objects that are necessary to use the Biometric Capture SDK.
BIOSDKInfo
This exposes information about the SDK.
Parameters
Parameter | Description |
---|---|
version NSString* | The version of the SDK. |
BIOBiometrics
This class holds all the different Biometrics that are going into a subclass.
Parameters
Parameter | Description |
---|---|
biometricLocation BIOLocation | The BiometricLocation enum option. |
biometricModality BIOModality | The BiometricModality enum option. |
BIOImage
This is the image object returned by the SDK. Its subclass is BIOBiometrics
.
Parameters
Parameter | Description |
---|---|
buffer NSData* | The image. |
stride int | The stride of the biometric. |
width uint32_t | The width of the image. |
height uint32_t | The height of the image. |
colorSpace BIOColorSpace | The ColorSpace of the image. |
resolution float | The resolution of the image. |
alive BOOL | OBSOLETE. True is alive, otherwise false . |
imageQuality int | Image quality if available, otherwise 0 . Currently only available for fingerprint images. |
BIOTemplate
This is a Biometric template object returned by the SDK. Its subclass is BIOBiometrics
.
Parameters
Parameter | Description |
---|---|
buffer NSData* | The template. |
uuid NSString* | The template uuid in the database (Could be null ). |
uuidUser NSString* | The user uuid (Could be null ). |
BIOUser
This is the user object used to represent an individual in the SDK.
Parameters
Parameter | Description |
---|---|
name NSString* | The name of the user. |
uuid NSString* | The UUID of the user. |
BIOVideoRecordingOptions
This is the video recording object used to configure video recording.
Parameter | Description |
---|---|
recordingEnabled | Is 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 |
---|---|
rtvFilePath | Path to RTV file used for video playback. |
Enums
BIOLogLevel
These are the constants used to configure logs.
Attribute | Description |
---|---|
BIOLogLevelDebug | Display all logs from SDK |
BIOLogLevelInfo | Informative message |
BIOLogLevelWarning | Warning message |
BIOLogLevelError | Error message |
BIOLogLevelNone | Turns logs off |
BIOColorSpace
These are the ColorSpace
constants.
Attribute | Description |
---|---|
BIOColorSpaceY8 | Grayscale 8bpp image |
BIOColorSpaceY16LE | Grayscale 16bpp image (Little Endian) |
BIOColorSpaceBGR24 | Color 24bpp BGR image (BMP like memory layout) |
BIOColorSpaceRGB24 | Color 24bpp RGB image (reversed memory layout compared to RT_COLORSPACE_BGR24) |
BIOLocation
These are the biometric location constants.
Attribute | Description |
---|---|
BIOLocationFaceFrontal | face |
BIOLocationFingerRightIndex | right index |
BIOLocationFingerRightMiddle | right middle |
BIOLocationFingerRightRing | right ring |
BIOLocationFingerRightLittle | right little |
BIOLocationFingerRightThumb | right thumb |
BIOLocationFingerLeftIndex | left index |
BIOLocationFingerLeftMiddle | left middle |
BIOLocationFingerLeftRing | left ring |
BIOLocationFingerLeftLittle | left little |
BIOLocationFingerLeftThumb | left thumb |
BIOLocationFingerUnknown | finger unknown |
BIOLocationHandLeft | hand left |
BIOLocationHandRight | hand right |
BIOLocationHandUnknown | hand unknown |
BIOModality
These are the biometric modality constants.
Attribute | Description |
---|---|
BIOModalityUnknown | unknown |
BIOModalityFace | Face |
BIOModalityFrictionRidge | Friction ridge |
BIOCaptureHandlerError
These are errors that can be thrown when there is an error with the capture handler.
Attribute | Description |
---|---|
BIOCaptureHandlerErrorSuccess | No error occurred |
BIOCaptureHandlerErrorParameters | Wrong Parameters |
BIOCaptureHandlerErrorParameterUnknown | Unknown parameter |
BIOCaptureHandlerErrorMemalloc | Memory allocation error |
BIOCaptureHandlerErrorInit | Initialization error |
BIOCaptureHandlerErrorGraphInitialisationFailed | Graph initialization failed |
BIOCaptureHandlerErrorParameterNotFound | Parameter not found |
BIOCaptureHandlerErrorParameterSize | Parameter size error |
BIOCaptureHandlerErrorTypeMismatch | Type mismatch error |
BIOCaptureHandlerErrorInvalidHandle | Invalid handler |
BIOCaptureHandlerErrorLicense | License is invalid |
BIOCaptureHandlerErrorApplinotavailable | The application is not available |
BIOCaptureHandlerErrorProfileNotAvailable | The profile is not available |
BIOCaptureHandlerErrorSubprofileNotAvailable | The subprofile is not available |
BIOCaptureHandlerErrorUnknown | An unknown error occurred |
BIOCaptureHandlerErrorInvalidOperation | The operation is invalid |
BIOCaptureHandlerErrorIncompatibleApiVersion | The API version is incompatible. Your application must be recompiled. |
BIOCaptureHandlerErrorCameraError | Camera issue has been encountered |
BIOCaptureHandlerErrorParameterWrongType | Parameter is not the right type |
BIOCaptureHandlerErrorParameterNotSet | Parameter is not set in current scope |
BIOCaptureHandlerErrorCaptureIsLocked | Capture is locked |
BIOCapturingError
These are errors that can be thrown when there is an error during or after the capture.
Attribute | Description |
---|---|
BIOCapturingErrorUnknown | Unknown error occurred |
BIOCapturingErrorCaptureTimeout | Capture timeout |
BIOCapturingErrorNotAlive | The capture returned an image with status not alive . |
BIOCapturingErrorWrongBiometricLocation | The wrong biometric location was scanned (eg. looking for face, captured fingers). |
BIOCapturingErrorImageBuffer | Could not read image buffer |
BIOCapturingErrorBadCaptureFingers | Fingers were not captured properly |
BIOCapturingErrorBadCaptureHand | Hand was not captured properly |
BIOCamera
These are the constants used to configure the behavior of BioCapture
.
Attribute | Description |
---|---|
BIOCameraFront | Front Camera |
BIOCameraRear | Rear Camera |
BIOOverlay
This is the enum used to configure the behavior of BioCapture
.
Attribute | Description |
---|---|
BIOOverlayOFF | Overlay off |
BIOOverlayON | Overlay on |
BIOPreviewColorspace
These are the flags used to set the color space for the preview of the camera.
Attribute | Description |
---|---|
BIOPreviewColorspaceColor | Sets colorspace of preview to RGB24 |
BIOPreviewColorspaceColorBlur | Sets colorspace of preview to RGB24 with Blur |
BIOPreviewColorspaceGray | Sets colorspace of preview to Grayscale |
BIOPreviewColorspaceGrayBlur | Sets colorspace of preview to Grayscale with Blur |
BIOPreviewColorspaceGrayBlurBordered | Sets colorspace of preview to Grayscale with Blur and a white border |
FingerCaptureHandler
Delegate
This sets the listener to receive the biometric information.
Objective-C1handler.delegate = ... //Object that implements `FingerCaptureHandlerDelegate` protocol
Preview
This sets the camera preview.
Objective-C1handler.preview = ... //An `UIImageView`
Note: To stop the camera preview, set the preview to nil
.
Debug Settings
This sets the camera preview.
Objective-C1BIODebugDataSettings *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-C1[handler startCaptureWithCompletionHandler:^(NSError \* error) {2 ...3 }];
Parameter | Description |
---|---|
completionHandler void (^)(NSError *) | Object with error code if an error occurred, else nil . |
Stop Capture
Objective-C1[handler stopCaptureWithCompletionHandler:^(NSError \* error) {2 ...3 }];
Parameter | Description |
---|---|
completionHandler void (^)(NSError *) | Object with error code if an error occurred, else nil . |
Switch Camera
This switches between different cameras.
Objective-C1[handler switchCamera:BIOCameraFront withError:&error];2 [handler switchCamera:BIOCameraRear withError:&error];
Parameter | Description |
---|---|
camera BIOCamera | Flag that selects the camera. |
error NSError** | Object with the error code if an error occurred, else nil . |
Overlay
This sets the overlay option.
Objective-C1[self setOverlay:BIOOverlayOFF withError:&error];2 [self setOverlay:BIOOverlayON withError:&error];
Parameter | Description |
---|---|
overlay BIOOverlay | Flag that determines if the overlay should be on or off. |
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-C1FingerCaptureOptions* options = handler.options;
Partial Dump Video
This dumps the last played sequences.
Objective-C1[handler requestPartialDumpVideoWithError:&error];
Note: To dump a partial video, capture it with the partial dump video recording set to enabled
. This should have been done previously.
Parameter | Description |
---|---|
error NSError** | Object with the error code if an error occurred, else nil . |
Full capture time (Deprecated)
Now this method returns the same value as the captureTimeout
in the FingerCaptureOption
.
Objective-C1NSTimeInterval fullCaptureTime = handler.fullCaptureTime;
Capture distance range
This allows to check if the device is calibrated for optimal distance feedback feature. If yes, it provides the distance ranges, which can be used to present graphical indicator for the end user.
Objective-C1FingerCaptureDistanceRangeResult *rangeResult = handler.captureDistanceRange;2 if (rangeResult.range != nil) {3 rangeResult.range.rangeMin // 0.04 rangeResult.range.optimalMin5 rangeResult.range.optimalMax6 rangeResult.range.rangeMax // 1.07 } else {8 // optimal distance feedback feature is not available.9 // rangeResult.unavailabilityReason can be used to check reason.10 }
Destroy
This releases all the handler resources.
Objective-C1[handler destroy];
FingerCaptureHandlerDelegate
FingerCaptureHandlerDelegate
is a sub protocol of BIOReplayProtocol and implements all of its methods as well.
fingerCaptureReceivedTrackingInfo:withError:
This method is called when there is new tracking information with the coordinates of the finger position.
Objective-C1-(void)fingerCaptureReceivedTrackingInfo:(NSArray<FingerTrackingInfo*>* )trackingInfo2 withError:(NSError*)error
Parameter | Description |
---|---|
trackingInfo NSArray<FingerTrackingInfo*>* | Array of FingerTrackingInfo with the tracking information. |
error NSError* | Error, if any occurred, otherwise nil . |
capturedFingers:withImagesToDisplay:withResult:withError:
This method is called when there are fingers captured.
Objective-C1- (void)capturedFingers:(NSArray<BIOImage *> * _Nullable)matchingImages2 withImagesToDisplay:(NSArray<FingerImagePreview *> * _Nullable)imagesToDisplay3 withResult:(FingerCaptureResult * _Nullable)captureInfo4 withError:(NSError * _Nullable)error;
Parameter | Description |
---|---|
matchingImages NSArray<BIOImage*>* | Array of BIOImage containing all the captured finger images. It can be used for matching. |
imagesToDisplay NSArray<FingerImagePreview*>* | Array of FingerImagePreview containing all the captured finger images. Can be used for displaying. |
result FingerCaptureResult* | Capture result with liveness and matching score. |
error NSError* | Error if any occurred, otherwise this will show nil . |
(DEPRECATED) capturedFingers:withResult:withError:
Note: This method is deprecated, use capturedFingers:withImagesToDisplay:withResult:withError:
instead.
This method is called when there are fingers captured.
Objective-C1- (void)capturedFingers:(NSArray<BIOImage*>*)images2 withResult:(FingerCaptureResult*)result3 withError:(NSError*)error
Parameter | Description |
---|---|
images NSArray<BIOImage*>* | Array of BIOImage with all the images of fingers captured. |
result FingerCaptureResult* | Capture result with liveness and matching score. |
error NSError* | Error if any occurred, otherwise this will show nil . |
capturedHand:withError:
This method is called when there is a hand captured.
Objective-C1-(void)capturedHand:(BIOImage*)image2 withError:(NSError*)error
Parameter | Description |
---|---|
image BIOImage* | BIOImage with the image of the hand captured. |
error NSError* | Error, if any occurred, otherwise nil . |
fastAuthenticationFinished:withError:
This method is called when fast authentication was selected. This returns the result of the authentication.
Objective-C1-(void)fastAuthenticationFinished:(BIOAuthenticationResult*)authenticationResult2 withError:(NSError*)error
Parameter | Description |
---|---|
authenticationResult BIOAuthenticationResult* | Authentication result of the fast authentication. |
error NSError* | Error, if any occurred, otherwise nil . |
fingerCaptureReceivedCurrentDistance:
This method is called when current distance between the fingers and the phone camera lens changed. It provides distance value (e.g in order to create your own optimal distance indicator on UI).
Objective-C1- (void)fingerCaptureReceivedCurrentDistance:(FingerCaptureCurrentDistance *)distance
Parameter | Description |
---|---|
distance FingerCaptureCurrentDistance* | Current distance between the fingers and the phone camera lens. |
fingerCaptureReceivedFeedback:
This method is called when there is information/feedback to the user available. It mostly provides feedback for the end-user whether the distance is optimal.
Objective-C1- (void)fingerCaptureReceivedFeedback:(FingerCaptureInfo)info
Parameter | Description |
---|---|
info FingerCaptureInfo | Information whether the distance between the fingers and the phone lens is correct. It may be OPTIMAL , TOO_CLOSE or TOO_FAR . |
Helper Objects
FingerCaptureOptions
This object is used to configure the behavior of FingerCaptureHandler
.
Attribute | Description |
---|---|
bioCaptureMode FingerCaptureMode | The app enum option to configure FingerCaptureMode . |
hand BIOHand | Specifies which hand is being scanned. |
amputatedFingers BIOAmputatedFinger | Bitmask containing fingers marked as amputated. Specifies which fingers are missing. |
referenceTemplates NSArray<BIOTemplate*>* | List of reference templates to be used in fast authentication mode. |
threshold int | Threshold value for the fast authentication modes to succeed, or for the quality assurance for other modes when maxNumberOfCaptures parameter is activated (higher then 1). (default is 3500) |
camera BIOCamera | The app camera option to configure BioCapture . |
overlay BIOOverlay | Set the overlay value. |
captureTimeout NSTimeInterval | Capture timeout in seconds (default value 120 ). |
logLevel BIOLogLevel | Level of logs that are displayed during debug. |
orientation BIOOrientation | Sets the orientation that the capture will be done in. |
previewColorspace BIOPreviewColorspace | Option that sets colorspace of the camera preview. |
dumpFileEnable BOOL | If dump file is enabled, the capture creates logs. |
dumpFileFolder NSString* | Folder where the logs will be saved. If nil , it will be saved on the Documents folder. |
videoRecordEnable BOOL | If the video recording is enabled, the capture will be recorded. |
videoRecordFolder NSString* | Folder where recorded videos will be saved. |
partialDumpVideoRecordEnable BOOL | If partial dump video recording is enabled, the capture can be afterwards recorded. |
partialDumpVideoRecordFolder NSString* | Folder where partial dump recorded videos will be saved. |
livenessType FingerCaptureLivenessType | Specifies the liveness check type. By default there is no liveness check. |
UHDResolutionEnabled BOOL | (warning - experimental API) Defines if camera should work in UHD/4K resolution. If camera doesn't support UHD/4K resolution, it will use the best resolution it can. |
BIOLivenessResult
This object is used to check the liveness check result. Note: Liveness check is disabled by default. To enable it, use the livenessType
property in the FingerCaptureOptions
object.
Attribute | Description |
---|---|
status BIOLivenessResultStatus | Liveness check status (live , no decision , fake ). |
FingerCaptureResult
This object aggregates the liveness results and matching score.
Attribute | Description |
---|---|
liveness BIOLivenessResult | Liveness check status (live , no decision , fake ). |
qualityScore NSNumber | Unavailable Quality metrics are not good enough to be used. |
FingerImagePreview
This object provides fingerprint images for display purposes.
Parameter | Description |
---|---|
biometricLocation BIOLocation | The position of the biometric. |
image CGImage | The fingerprint image. |
FingerTrackingInfo
This is the finger tracking object returned by the SDK.
Parameters
Parameter | Description |
---|---|
frame CGRect | The position of the finger in previewSize coordinate system. |
orientation CGFloat | The position of the biometric. |
previewSize CGSize | The reference size (camera preview image size). |
quality FingerQuality | Quality level of the scanned fingers, it should be use only for UI purposes |
FingerCaptureDistanceRangeResult
This tells if the fingers distance to the phone camera lens is available and provides optimal distance range for the device.
Parameter | Description |
---|---|
range FingerCaptureDistanceRange* | The distance range object if the device is calibrated. |
unavailabilityReason NSError* | The distance feedback feature unavailability reason if the device is not calibrated. |
FingerCaptureDistanceRange
This represents fingers distance range to the phone camera lens.
Parameter | Description |
---|---|
rangeMin CGFloat | Minimum value that may be returned in FingerCaptureCurrentDistance.value . Should be equal to 0.0 |
optimalMin CGFloat | Lower boundary of optimal distance between the phone and the fingers |
optimalMax CGFloat | Upper boundary of optimal distance between the phone and the fingers |
rangeMax CGFloat | Maximum value that may be returned in FingerCaptureCurrentDistance.value . Should be equal to 1.0 |
FingerCaptureCurrentDistance
This represents current fingers distance to the phone camera lens.
Parameter | Description |
---|---|
value CGFloat | The distance between the fingers and the camera. Its range is between rangeMin and rangeMax values in FingerCaptureDistanceRange . |
Enums
FingerCaptureMode
This enum is used to configure the behavior of BioCapture
.
Attribute | Description |
---|---|
FingerCaptureModeFingers | Finger capture of the four fingers concerning amputee parameter. |
FingerCaptureModeThumb | Finger capture of a thumb finger. |
FingerCaptureModeAuthentication | Fingers detection and authentication. |
FingerCaptureLivenessType
This enum is used to enable liveness check.
Attribute | Description |
---|---|
FingerCaptureLivenessTypeNoLiveness | Finger liveness disabled. |
FingerCaptureLivenessTypeVeryLow | Finger liveness level very low. |
FingerCaptureLivenessTypeLow | Finger liveness level low. (default). |
FingerCaptureLivenessTypeMedium | Finger liveness level medium. |
BIOLivenessResultStatus
These are the liveness result constants.
Attribute | Description |
---|---|
BIOLivenessResultStatusLive | Liveness passed successfully. |
BIOLivenessResultStatusNoDecision | Liveness check result unspecified. |
BIOLivenessResultStatusFake | Liveness check failed. |
BIOHand
Specifies which hand is being scanned.
Attribute | Description |
---|---|
BIOHandRight | Right hand |
BIOHandLeft | Left hand |
FingerCaptureInfo
Finger capture (distance) feedback for the end-user.
Attribute | Description |
---|---|
FingerCaptureInfoTooFar | The fingers are too far from the camera. |
FingerCaptureInfoTooClose | The fingers are too close to the camera. |
FingerCaptureInfoOptimalDistance | The fingers are in optimal distance to the camera. |
Options
BIOAmputatedFinger
Bitmask is used to specify which fingers are amputed.
Option | Description |
---|---|
BIOAmputatedFingerNone | default value |
BIOAmputatedFingerIndex | Index finger |
BIOAmputatedFingerMiddle | Middle finger |
BIOAmputatedFingerRing | Ring finger |
BIOAmputatedFingerLittle | Little finger |
FingerQuality
The enumeration represents the quality levels of the scanned fingerprints. It is designed to be used for UI purposes. For example, it can be used to color overlays, helping the end user capture fingerprints more quickly.
Option | Description |
---|---|
FingerQualityUnavailable | The quality is unavailable because the acquisition process is still ongoing. |
FingerQualityLow | A low-quality fingerprint is a fingerprint image that lacks clarity and detail. |
FingerQualityMedium | A medium-quality fingerprint is a fingerprint image that captures a fair amount of detail. |
FingerQualityHigh | A high-quality fingerprint is a fingerprint image that is exceptionally clear and detailed, with distinct ridge patterns and minimal noise or distortion. This level of quality ensures the most reliable and accurate identification. |