From 6ab49705afb1a553ab79527d8c0b019d163c73e9 Mon Sep 17 00:00:00 2001 From: Matija Krizanec Date: Tue, 28 Jun 2022 13:06:26 +0200 Subject: [PATCH 1/3] [Android] generate bindings --- .../BlinkIDSerializationUtils.java | 10 + ...linkIdCombinedRecognizerSerialization.java | 1 + BlinkID/www/blinkIdScanner.js | 490 +++++------------- 3 files changed, 143 insertions(+), 358 deletions(-) diff --git a/BlinkID/src/android/java/com/microblink/plugins/cordova/recognizers/serialization/BlinkIDSerializationUtils.java b/BlinkID/src/android/java/com/microblink/plugins/cordova/recognizers/serialization/BlinkIDSerializationUtils.java index b06e37f..a326ff7 100644 --- a/BlinkID/src/android/java/com/microblink/plugins/cordova/recognizers/serialization/BlinkIDSerializationUtils.java +++ b/BlinkID/src/android/java/com/microblink/plugins/cordova/recognizers/serialization/BlinkIDSerializationUtils.java @@ -4,6 +4,7 @@ import com.microblink.entities.recognizers.blinkid.mrtd.MrzResult; import com.microblink.entities.recognizers.blinkid.generic.DriverLicenseDetailedInfo; +import com.microblink.entities.recognizers.blinkid.generic.DataMatchDetailedInfo; import com.microblink.entities.recognizers.blinkid.generic.VehicleClassInfo; import com.microblink.entities.recognizers.blinkid.generic.classinfo.ClassInfo; import com.microblink.entities.recognizers.blinkid.generic.imageanalysis.ImageAnalysisResult; @@ -70,6 +71,15 @@ public static JSONObject serializeVehicleClassInfo(VehicleClassInfo vehicleClass return jsonVehicleClassInfo; } + public static JSONObject serializeDataMatchDetailedInfo(DataMatchDetailedInfo dataMatchDetailedInfo) throws JSONException { + JSONObject jsonDataMatch = new JSONObject(); + jsonDataMatch.put("dateOfBirth", SerializationUtils.serializeEnum(dataMatchDetailedInfo.getDateOfBirth())); + jsonDataMatch.put("dateOfExpiry", SerializationUtils.serializeEnum(dataMatchDetailedInfo.getDateOfExpiry())); + jsonDataMatch.put("documentNumber", SerializationUtils.serializeEnum(dataMatchDetailedInfo.getDocumentNumber())); + jsonDataMatch.put("dataMatchResult", SerializationUtils.serializeEnum(dataMatchDetailedInfo.getDataMatchResult())); + return jsonDataMatch; + } + public static JSONObject serializeClassInfo(ClassInfo classInfo) throws JSONException { JSONObject jsonClassInfo = new JSONObject(); jsonClassInfo.put("country", SerializationUtils.serializeEnum(classInfo.getCountry())); diff --git a/BlinkID/src/android/java/com/microblink/plugins/cordova/recognizers/serialization/BlinkIdCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/microblink/plugins/cordova/recognizers/serialization/BlinkIdCombinedRecognizerSerialization.java index 52a5dbf..13c6081 100644 --- a/BlinkID/src/android/java/com/microblink/plugins/cordova/recognizers/serialization/BlinkIdCombinedRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/microblink/plugins/cordova/recognizers/serialization/BlinkIdCombinedRecognizerSerialization.java @@ -52,6 +52,7 @@ public JSONObject serializeResult(Recognizer recognizer) { jsonResult.put("barcodeCameraFrame", SerializationUtils.encodeImageBase64(result.getBarcodeCameraFrame())); jsonResult.put("barcodeResult", BlinkIDSerializationUtils.serializeBarcodeResult(result.getBarcodeResult())); jsonResult.put("classInfo", BlinkIDSerializationUtils.serializeClassInfo(result.getClassInfo())); + jsonResult.put("dataMatchDetailedInfo", BlinkIDSerializationUtils.serializeDataMatchDetailedInfo(result.getDataMatchDetailedInfo())); jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); jsonResult.put("dateOfExpiryPermanent", result.isDateOfExpiryPermanent()); diff --git a/BlinkID/www/blinkIdScanner.js b/BlinkID/www/blinkIdScanner.js index 7339f30..124df64 100644 --- a/BlinkID/www/blinkIdScanner.js +++ b/BlinkID/www/blinkIdScanner.js @@ -2371,7 +2371,7 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * The additional address information of the document owner. + * The additional name information of the document owner. */ this.additionalAddressInformation = nativeResult.additionalAddressInformation; @@ -2392,18 +2392,16 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { /** * The current age of the document owner in years. It is calculated difference - * between now and date of birth. Now is current time on the device. - * @return current age of the document owner in years or -1 if date of birth is unknown. */ this.age = nativeResult.age; /** - * The back raw camera frame. + * Back camera frame. */ this.backCameraFrame = nativeResult.backCameraFrame; /** - * Defines possible color and moire statuses determined from scanned back image. + * Image analysis result for the scanned document back side image */ this.backImageAnalysisResult = nativeResult.backImageAnalysisResult; @@ -2413,25 +2411,30 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { this.backProcessingStatus = nativeResult.backProcessingStatus; /** - * Defines the data extracted from the back side visual inspection zone. + * The data extracted from the back side visual inspection zone. */ this.backVizResult = nativeResult.backVizResult; /** - * The barcode raw camera frame. + * Barcode camera frame. */ this.barcodeCameraFrame = nativeResult.barcodeCameraFrame; /** - * Defines the data extracted from the barcode. + * The data extracted from the barcode. */ this.barcodeResult = nativeResult.barcodeResult; /** - * The classification information. + * The document class information. */ this.classInfo = nativeResult.classInfo; + /** + * Detailed info on data match. + */ + this.dataMatchDetailedInfo = nativeResult.dataMatchDetailedInfo; + /** * The date of birth of the document owner. */ @@ -2458,10 +2461,7 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { this.documentAdditionalNumber = nativeResult.documentAdditionalNumber; /** - * Returns DataMatchResultSuccess if data from scanned parts/sides of the document match, - * DataMatchResultFailed otherwise. For example if date of expiry is scanned from the front and back side - * of the document and values do not match, this method will return DataMatchResultFailed. Result will - * be DataMatchResultSuccess only if scanned values for all fields that are compared are the same. + * Defines result of the data matching algorithm for scanned parts/sides of the document. */ this.documentDataMatch = nativeResult.documentDataMatch; @@ -2487,22 +2487,16 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { /** * Checks whether the document has expired or not by comparing the current - * time on the device with the date of expiry. - * - * @return true if the document has expired, false in following cases: - * document does not expire (date of expiry is permanent) - * date of expiry has passed - * date of expiry is unknown and it is not permanent */ this.expired = nativeResult.expired; /** - * face image from the document if enabled with returnFaceImage property. + * Face image from the document */ this.faceImage = nativeResult.faceImage; /** - * The father's name of the document owner. + * The fathers name of the document owner. */ this.fathersName = nativeResult.fathersName; @@ -2512,12 +2506,12 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { this.firstName = nativeResult.firstName; /** - * The front raw camera frame. + * Front camera frame. */ this.frontCameraFrame = nativeResult.frontCameraFrame; /** - * Defines possible color and moire statuses determined from scanned front image. + * Image analysis result for the scanned document front side image */ this.frontImageAnalysisResult = nativeResult.frontImageAnalysisResult; @@ -2527,17 +2521,17 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { this.frontProcessingStatus = nativeResult.frontProcessingStatus; /** - * Defines the data extracted from the front side visual inspection zone. + * The data extracted from the front side visual inspection zone. */ this.frontVizResult = nativeResult.frontVizResult; /** - * back side image of the document if enabled with returnFullDocumentImage property. + * Back side image of the document */ this.fullDocumentBackImage = nativeResult.fullDocumentBackImage; /** - * front side image of the document if enabled with returnFullDocumentImage property. + * Front side image of the document */ this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage; @@ -2567,12 +2561,12 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { this.maritalStatus = nativeResult.maritalStatus; /** - * The mother's name of the document owner. + * The mothers name of the document owner. */ this.mothersName = nativeResult.mothersName; /** - * The data extracted from the machine readable zone + * The data extracted from the machine readable zone. */ this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; @@ -2592,7 +2586,7 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { this.placeOfBirth = nativeResult.placeOfBirth; /** - * Defines status of the last recognition process. + * Status of the last recognition process. */ this.processingStatus = nativeResult.processingStatus; @@ -2622,8 +2616,7 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { this.residentialStatus = nativeResult.residentialStatus; /** - * Returns true if recognizer has finished scanning first side and is now scanning back side, - * false if it's still scanning first side. + * {true} if recognizer has finished scanning first side and is now scanning back side, */ this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; @@ -2633,7 +2626,7 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { this.sex = nativeResult.sex; /** - * image of the signature if enabled with returnSignatureImage property. + * Signature image from the document */ this.signatureImage = nativeResult.signatureImage; @@ -2644,153 +2637,103 @@ BlinkIdCombinedRecognizerResult.prototype = new RecognizerResult(RecognizerResul BlinkID.prototype.BlinkIdCombinedRecognizerResult = BlinkIdCombinedRecognizerResult; /** - * Recognizer which can scan front and back side of the United States driver license. + * A generic recognizer which can scan front and back side of the document. */ function BlinkIdCombinedRecognizer() { Recognizer.call(this, 'BlinkIdCombinedRecognizer'); /** - * Defines whether blured frames filtering is allowed - * - * + * Defines whether blured frames filtering is allowed. */ this.allowBlurFilter = true; /** * Proceed with scanning the back side even if the front side result is uncertain. - * This only works for still images - video feeds will ignore this setting. - * - * */ this.allowUncertainFrontSideScan = false; /** - * Defines whether returning of unparsed MRZ (Machine Readable Zone) results is allowed - * - * + * Defines whether returning of unparsed MRZ (Machine Readable Zone) results is allowed. */ this.allowUnparsedMrzResults = false; /** - * Defines whether returning unverified MRZ (Machine Readable Zone) results is allowed - * Unverified MRZ is parsed, but check digits are incorrect - * - * + * Defines whether returning unverified MRZ (Machine Readable Zone) results is allowed. */ this.allowUnverifiedMrzResults = true; /** - * Defines whether sensitive data should be removed from images, result fields or both. - * The setting only applies to certain documents - * - * + * Whether sensitive data should be removed from images, result fields or both. */ this.anonymizationMode = AnonymizationMode.FullResult; /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * The DPI (Dots Per Inch) for face image that should be returned. */ this.faceImageDpi = 250; /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * The DPI (Dots Per Inch) for full document image that should be returned. */ this.fullDocumentImageDpi = 250; /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * + * The extension factors for full document image. */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); /** * Configure the number of characters per field that are allowed to be inconsistent in data match. - * - * */ this.maxAllowedMismatchesPerField = 0; /** - * Pading is a minimum distance from the edge of the frame and is defined as a percentage of the frame width. Default value is 0.0f and in that case - * padding edge and image edge are the same. - * Recommended value is 0.02f. - * - * + * Padding is a minimum distance from the edge of the frame and it is defined */ this.paddingEdge = 0.0; /** - * Enable or disable recognition of specific document groups supported by the current license. - * - * + * Currently set recognition mode filter. */ this.recognitionModeFilter = new RecognitionModeFilter(); /** - * Sets whether face image from ID card should be extracted - * - * + * Defines whether face image will be available in result. */ this.returnFaceImage = false; /** - * Sets whether full document image of ID card should be extracted. - * - * + * Defines whether full document image will be available in */ this.returnFullDocumentImage = false; /** - * Sets whether signature image from ID card should be extracted. - * - * + * Defines whether signature image will be available in result. */ this.returnSignatureImage = false; /** * Configure the recognizer to save the raw camera frames. - * This significantly increases memory consumption. - * - * */ this.saveCameraFrames = false; /** * Configure the recognizer to only work on already cropped and dewarped images. - * This only works for still images - video feeds will ignore this setting. - * - * */ this.scanCroppedDocumentImage = false; /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * The DPI (Dots Per Inch) for signature image that should be returned. */ this.signatureImageDpi = 250; /** - * Skip back side capture and processing step when back side of the document is not supported - * - * + * Skip back side capture and processing step when back side of the document is not supported. */ this.skipUnsupportedBack = false; /** - * Defines whether result characters validatation is performed. - * If a result member contains invalid character, the result state cannot be valid - * - * + * Whether result characters validatation is performed. */ this.validateResultCharacters = true; @@ -2809,7 +2752,7 @@ function BlinkIdRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * The additional address information of the document owner. + * The additional name information of the document owner. */ this.additionalAddressInformation = nativeResult.additionalAddressInformation; @@ -2830,28 +2773,26 @@ function BlinkIdRecognizerResult(nativeResult) { /** * The current age of the document owner in years. It is calculated difference - * between now and date of birth. Now is current time on the device. - * @return current age of the document owner in years or -1 if date of birth is unknown. */ this.age = nativeResult.age; /** - * The barcode raw camera frame. + * Barcode camera frame. */ this.barcodeCameraFrame = nativeResult.barcodeCameraFrame; /** - * Defines the data extracted from the barcode. + * The data extracted from the barcode. */ this.barcodeResult = nativeResult.barcodeResult; /** - * The raw camera frame. + * Camera frame. */ this.cameraFrame = nativeResult.cameraFrame; /** - * The classification information. + * The document class information. */ this.classInfo = nativeResult.classInfo; @@ -2902,22 +2843,16 @@ function BlinkIdRecognizerResult(nativeResult) { /** * Checks whether the document has expired or not by comparing the current - * time on the device with the date of expiry. - * - * @return true if the document has expired, false in following cases: - * document does not expire (date of expiry is permanent) - * date of expiry has passed - * date of expiry is unknown and it is not permanent */ this.expired = nativeResult.expired; /** - * face image from the document if enabled with returnFaceImage property. + * Face image from the document */ this.faceImage = nativeResult.faceImage; /** - * The father's name of the document owner. + * The fathers name of the document owner. */ this.fathersName = nativeResult.fathersName; @@ -2927,7 +2862,7 @@ function BlinkIdRecognizerResult(nativeResult) { this.firstName = nativeResult.firstName; /** - * full document image if enabled with returnFullDocumentImage property. + * Image of the full document */ this.fullDocumentImage = nativeResult.fullDocumentImage; @@ -2937,7 +2872,7 @@ function BlinkIdRecognizerResult(nativeResult) { this.fullName = nativeResult.fullName; /** - * Defines possible color and moire statuses determined from scanned image. + * Image analysis result for the scanned document image */ this.imageAnalysisResult = nativeResult.imageAnalysisResult; @@ -2962,12 +2897,12 @@ function BlinkIdRecognizerResult(nativeResult) { this.maritalStatus = nativeResult.maritalStatus; /** - * The mother's name of the document owner. + * The mothers name of the document owner. */ this.mothersName = nativeResult.mothersName; /** - * The data extracted from the machine readable zone + * The data extracted from the machine readable zone. */ this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; @@ -2987,7 +2922,7 @@ function BlinkIdRecognizerResult(nativeResult) { this.placeOfBirth = nativeResult.placeOfBirth; /** - * Defines status of the last recognition process. + * Status of the last recognition process. */ this.processingStatus = nativeResult.processingStatus; @@ -3022,12 +2957,12 @@ function BlinkIdRecognizerResult(nativeResult) { this.sex = nativeResult.sex; /** - * image of the signature if enabled with returnSignatureImage property. + * Signature image from the document */ this.signatureImage = nativeResult.signatureImage; /** - * Defines the data extracted from the visual inspection zone + * The data extracted from the visual inspection zone. */ this.vizResult = nativeResult.vizResult; @@ -3038,131 +2973,88 @@ BlinkIdRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.e BlinkID.prototype.BlinkIdRecognizerResult = BlinkIdRecognizerResult; /** - * The Blink ID Recognizer is used for scanning Blink ID. + * Generic BlinkID recognizer. */ function BlinkIdRecognizer() { Recognizer.call(this, 'BlinkIdRecognizer'); /** - * Defines whether blured frames filtering is allowed - * - * + * Defines whether blured frames filtering is allowed" */ this.allowBlurFilter = true; /** - * Defines whether returning of unparsed MRZ (Machine Readable Zone) results is allowed - * - * + * Defines whether returning of unparsed MRZ (Machine Readable Zone) results is allowed. */ this.allowUnparsedMrzResults = false; /** - * Defines whether returning unverified MRZ (Machine Readable Zone) results is allowed - * Unverified MRZ is parsed, but check digits are incorrect - * - * + * Defines whether returning unverified MRZ (Machine Readable Zone) results is allowed. */ this.allowUnverifiedMrzResults = true; /** - * Defines whether sensitive data should be removed from images, result fields or both. - * The setting only applies to certain documents - * - * + * Whether sensitive data should be removed from images, result fields or both. */ this.anonymizationMode = AnonymizationMode.FullResult; /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * The DPI (Dots Per Inch) for face image that should be returned. */ this.faceImageDpi = 250; /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * The DPI (Dots Per Inch) for full document image that should be returned. */ this.fullDocumentImageDpi = 250; /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * + * The extension factors for full document image. */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); /** - * Pading is a minimum distance from the edge of the frame and is defined as a percentage of the frame width. Default value is 0.0f and in that case - * padding edge and image edge are the same. - * Recommended value is 0.02f. - * - * + * Padding is a minimum distance from the edge of the frame and it is defined */ this.paddingEdge = 0.0; /** - * Enable or disable recognition of specific document groups supported by the current license. - * - * + * Currently set recognition mode filter. */ this.recognitionModeFilter = new RecognitionModeFilter(); /** - * Sets whether face image from ID card should be extracted - * - * + * Defines whether face image will be available in result. */ this.returnFaceImage = false; /** - * Sets whether full document image of ID card should be extracted. - * - * + * Defines whether full document image will be available in */ this.returnFullDocumentImage = false; /** - * Sets whether signature image from ID card should be extracted. - * - * + * Defines whether signature image will be available in result. */ this.returnSignatureImage = false; /** * Configure the recognizer to save the raw camera frames. - * This significantly increases memory consumption. - * - * */ this.saveCameraFrames = false; /** * Configure the recognizer to only work on already cropped and dewarped images. - * This only works for still images - video feeds will ignore this setting. - * - * */ this.scanCroppedDocumentImage = false; /** - * Property for setting DPI for signature images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * The DPI (Dots Per Inch) for signature image that should be returned. */ this.signatureImageDpi = 250; /** - * Defines whether result characters validatation is performed. - * If a result member contains invalid character, the result state cannot be valid - * - * + * Whether result characters validatation is performed. */ this.validateResultCharacters = true; @@ -3181,22 +3073,22 @@ function DocumentFaceRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * Quadrangle represeting corner points of the document within the input image. + * The location of document detection in coordinate system of full input frame. */ this.documentLocation = nativeResult.documentLocation != null ? new Quadrilateral(nativeResult.documentLocation) : null; /** - * face image from the document if enabled with returnFaceImage property. + * Face image from the document */ this.faceImage = nativeResult.faceImage; /** - * Quadrangle represeting corner points of the face image within the input image. + * The location of face detection in coordinate system of cropped full document image. */ this.faceLocation = nativeResult.faceLocation != null ? new Quadrilateral(nativeResult.faceLocation) : null; /** - * full document image if enabled with returnFullDocumentImage property. + * Image of the full document */ this.fullDocumentImage = nativeResult.fullDocumentImage; @@ -3207,65 +3099,43 @@ DocumentFaceRecognizerResult.prototype = new RecognizerResult(RecognizerResultSt BlinkID.prototype.DocumentFaceRecognizerResult = DocumentFaceRecognizerResult; /** - * Class for configuring Document Face Recognizer Recognizer. - * - * Document Face Recognizer recognizer is used for scanning documents containing face images. + * Recognizer for detecting holder's photo on documents containing image. */ function DocumentFaceRecognizer() { Recognizer.call(this, 'DocumentFaceRecognizer'); /** - * Type of docment this recognizer will scan. - * - * + * Currently used detector type. */ this.detectorType = DocumentFaceDetectorType.TD1; /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * The DPI (Dots Per Inch) for face image that should be returned. */ this.faceImageDpi = 250; /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * The DPI (Dots Per Inch) for full document image that should be returned. */ this.fullDocumentImageDpi = 250; /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * + * The extension factors for full document image. */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); /** - * Defines how many times the same document should be detected before the detector - * returns this document as a result of the deteciton - * - * Higher number means more reliable detection, but slower processing - * - * + * Minimum number of stable detections required for detection to be successful. */ this.numStableDetectionsThreshold = 6; /** - * Sets whether face image from ID card should be extracted - * - * + * Defines whether face image will be available in result. */ this.returnFaceImage = false; /** - * Sets whether full document image of ID card should be extracted. - * - * + * Defines whether full document image will be available in */ this.returnFullDocumentImage = false; @@ -3295,15 +3165,11 @@ function IdBarcodeRecognizerResult(nativeResult) { /** * The current age of the document owner in years. It is calculated difference - * between now and date of birth. Now is current time on the device. - * @return current age of the document owner in years or -1 if date of birth is unknown. */ this.age = nativeResult.age; /** - * Type of the barcode scanned - * - * @return Type of the barcode + * The format of the scanned barcode. */ this.barcodeType = nativeResult.barcodeType; @@ -3339,8 +3205,6 @@ function IdBarcodeRecognizerResult(nativeResult) { /** * The document type deduced from the recognized barcode - * - * @return Type of the document */ this.documentType = nativeResult.documentType; @@ -3356,19 +3220,11 @@ function IdBarcodeRecognizerResult(nativeResult) { /** * Checks whether the document has expired or not by comparing the current - * time on the device with the date of expiry. - * - * @return true if the document has expired, false in following cases: - * document does not expire (date of expiry is permanent) - * date of expiry has passed - * date of expiry is unknown and it is not permanent */ this.expired = nativeResult.expired; /** * Document specific extended elements that contain all barcode fields in their original form. - * - * Currently this is only filled for AAMVACompliant documents. */ this.extendedElements = nativeResult.extendedElements; @@ -3438,7 +3294,7 @@ function IdBarcodeRecognizerResult(nativeResult) { this.race = nativeResult.race; /** - * Byte array with result of the scan + * The raw bytes contained inside barcode. */ this.rawData = nativeResult.rawData; @@ -3448,7 +3304,7 @@ function IdBarcodeRecognizerResult(nativeResult) { this.religion = nativeResult.religion; /** - * The residential stauts of the document owner. + * The residential status of the document owner. */ this.residentialStatus = nativeResult.residentialStatus; @@ -3468,13 +3324,12 @@ function IdBarcodeRecognizerResult(nativeResult) { this.street = nativeResult.street; /** - * Retrieves string content of scanned data + * String representation of data inside barcode. */ this.stringData = nativeResult.stringData; /** - * Flag indicating uncertain scanning data - * E.g obtained from damaged barcode. + * True if returned result is uncertain, i.e. if scanned barcode was incomplete (i.e. */ this.uncertain = nativeResult.uncertain; @@ -3510,36 +3365,32 @@ function MrtdCombinedRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * Returns DataMatchResultSuccess if data from scanned parts/sides of the document match, - * DataMatchResultFailed otherwise. For example if date of expiry is scanned from the front and back side - * of the document and values do not match, this method will return DataMatchResultFailed. Result will - * be DataMatchResultSuccess only if scanned values for all fields that are compared are the same. + * Defines result of the data matching algorithm for scanned parts/sides of the document. */ this.documentDataMatch = nativeResult.documentDataMatch; /** - * face image from the document if enabled with returnFaceImage property. + * Face image from the document */ this.faceImage = nativeResult.faceImage; /** - * back side image of the document if enabled with returnFullDocumentImage property. + * Back side image of the document */ this.fullDocumentBackImage = nativeResult.fullDocumentBackImage; /** - * front side image of the document if enabled with returnFullDocumentImage property. + * Front side image of the document */ this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage; /** - * Returns the Data extracted from the machine readable zone. + * The data extracted from the machine readable zone. */ this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; /** - * Returns true if recognizer has finished scanning first side and is now scanning back side, - * false if it's still scanning first side. + * {true} if recognizer has finished scanning first side and is now scanning back side, */ this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; @@ -3550,87 +3401,59 @@ MrtdCombinedRecognizerResult.prototype = new RecognizerResult(RecognizerResultSt BlinkID.prototype.MrtdCombinedRecognizerResult = MrtdCombinedRecognizerResult; /** - * MRTD Combined recognizer - * - * MRTD Combined recognizer is used for scanning both front and back side of generic IDs. + * Recognizer for combined reading of face from front side of documents and MRZ from back side of + * * Machine Readable Travel Document. */ function MrtdCombinedRecognizer() { Recognizer.call(this, 'MrtdCombinedRecognizer'); /** - * Whether special characters are allowed - * - * + * Whether special characters are allowed. */ this.allowSpecialCharacters = false; /** - * Whether returning of unparsed results is allowed - * - * + * Whether returning of unparsed results is allowed. */ this.allowUnparsedResults = false; /** - * Whether returning of unverified results is allowed - * Unverified result is result that is parsed, but check digits are incorrect. - * - * + * Whether returning of unverified results is allowed. */ this.allowUnverifiedResults = false; /** - * Type of document this recognizer will scan. - * - * + * Currently used detector type. */ this.detectorType = DocumentFaceDetectorType.TD1; /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * The DPI (Dots Per Inch) for face image that should be returned. */ this.faceImageDpi = 250; /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * The DPI (Dots Per Inch) for full document image that should be returned. */ this.fullDocumentImageDpi = 250; /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * + * The extension factors for full document image. */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); /** - * Defines how many times the same document should be detected before the detector - * returns this document as a result of the deteciton - * - * Higher number means more reliable detection, but slower processing - * - * + * Minimum number of stable detections required for detection to be successful. */ this.numStableDetectionsThreshold = 6; /** - * Sets whether face image from ID card should be extracted - * - * + * Defines whether face image will be available in result. */ this.returnFaceImage = false; /** - * Sets whether full document image of ID card should be extracted. - * - * + * Defines whether full document image will be available in */ this.returnFullDocumentImage = false; @@ -3649,12 +3472,12 @@ function MrtdRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * full document image if enabled with returnFullDocumentImage property. + * Image of the full document */ this.fullDocumentImage = nativeResult.fullDocumentImage; /** - * Returns the Data extracted from the machine readable zone. + * The Data extracted from the machine readable zone. */ this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; @@ -3665,60 +3488,43 @@ MrtdRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empt BlinkID.prototype.MrtdRecognizerResult = MrtdRecognizerResult; /** - * Recognizer that can recognizer Machine Readable Zone (MRZ) of the Machine Readable Travel Document (MRTD) + * Recognizer that can recognize Machine Readable Zone (MRZ) of the Machine Readable Travel Document (MRTD) */ function MrtdRecognizer() { Recognizer.call(this, 'MrtdRecognizer'); /** - * Whether special characters are allowed - * - * + * Whether special characters are allowed. */ this.allowSpecialCharacters = false; /** - * Whether returning of unparsed results is allowed - * - * + * Whether returning of unparsed results is allowed. */ this.allowUnparsedResults = false; /** - * Whether returning of unverified results is allowed - * Unverified result is result that is parsed, but check digits are incorrect. - * - * + * Whether returning of unverified results is allowed. */ this.allowUnverifiedResults = false; /** - * Defines if glare detection should be turned on/off. - * - * + * Defines whether glare detector is enabled. */ this.detectGlare = true; /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * The DPI (Dots Per Inch) for full document image that should be returned. */ this.fullDocumentImageDpi = 250; /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * + * The extension factors for full document image. */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); /** - * Sets whether full document image of ID card should be extracted. - * - * + * Defines whether full document image will be available in */ this.returnFullDocumentImage = false; @@ -3737,12 +3543,12 @@ function PassportRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * face image from the document if enabled with returnFaceImage property. + * Face image from the document */ this.faceImage = nativeResult.faceImage; /** - * full document image if enabled with returnFullDocumentImage property. + * Image of the full document */ this.fullDocumentImage = nativeResult.fullDocumentImage; @@ -3764,54 +3570,37 @@ function PassportRecognizer() { Recognizer.call(this, 'PassportRecognizer'); /** - * Defines whether to anonymize Netherlands MRZ - * - * + * Defines whether the Netherlands MRZ should be anonymized. */ this.anonymizeNetherlandsMrz = true; /** - * Defines if glare detection should be turned on/off. - * - * + * Defines whether glare detector is enabled. */ this.detectGlare = true; /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * The DPI (Dots Per Inch) for face image that should be returned. */ this.faceImageDpi = 250; /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * The DPI (Dots Per Inch) for full document image that should be returned. */ this.fullDocumentImageDpi = 250; /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * + * The extension factors for full document image. */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); /** - * Sets whether face image from ID card should be extracted - * - * + * Defines whether face image will be available in result. */ this.returnFaceImage = false; /** - * Sets whether full document image of ID card should be extracted. - * - * + * Defines whether full document image will be available in */ this.returnFullDocumentImage = false; @@ -3830,12 +3619,12 @@ function VisaRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * face image from the document if enabled with returnFaceImage property. + * Face image from the document */ this.faceImage = nativeResult.faceImage; /** - * full document image if enabled with returnFullDocumentImage property. + * Image of the full document */ this.fullDocumentImage = nativeResult.fullDocumentImage; @@ -3857,47 +3646,32 @@ function VisaRecognizer() { Recognizer.call(this, 'VisaRecognizer'); /** - * Defines if glare detection should be turned on/off. - * - * + * Defines whether glare detector is enabled. */ this.detectGlare = true; /** - * Property for setting DPI for face images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * The DPI (Dots Per Inch) for face image that should be returned. */ this.faceImageDpi = 250; /** - * Property for setting DPI for full document images - * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception - * - * + * The DPI (Dots Per Inch) for full document image that should be returned. */ this.fullDocumentImageDpi = 250; /** - * Image extension factors for full document image. - * - * @see ImageExtensionFactors - * + * The extension factors for full document image. */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); /** - * Sets whether face image from ID card should be extracted - * - * + * Defines whether face image will be available in result. */ this.returnFaceImage = false; /** - * Sets whether full document image of ID card should be extracted. - * - * + * Defines whether full document image will be available in */ this.returnFullDocumentImage = false; From b4552b60ff6e526fb21aa6c9e21fef364cc9d3e1 Mon Sep 17 00:00:00 2001 From: Matija Krizanec Date: Tue, 28 Jun 2022 13:50:18 +0200 Subject: [PATCH 2/3] update version, release notes, license and Android version --- BlinkID/package.json | 2 +- BlinkID/plugin.xml | 2 +- BlinkID/src/android/libBlinkID.gradle | 2 +- Release notes.md | 3 +++ sample_files/www/js/index.js | 10 +++++++++- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/BlinkID/package.json b/BlinkID/package.json index eb22220..43a6fad 100644 --- a/BlinkID/package.json +++ b/BlinkID/package.json @@ -1,6 +1,6 @@ { "name": "blinkid-cordova", - "version": "5.16.1", + "version": "5.17.0", "description": "A small and powerful ID card scanning library", "cordova": { "id": "blinkid-cordova", diff --git a/BlinkID/plugin.xml b/BlinkID/plugin.xml index 5199cc6..748b0aa 100644 --- a/BlinkID/plugin.xml +++ b/BlinkID/plugin.xml @@ -2,7 +2,7 @@ + version="5.17.0"> BlinkIdScanner A small and powerful ID card scanning library diff --git a/BlinkID/src/android/libBlinkID.gradle b/BlinkID/src/android/libBlinkID.gradle index 00dceb1..a42f094 100644 --- a/BlinkID/src/android/libBlinkID.gradle +++ b/BlinkID/src/android/libBlinkID.gradle @@ -6,7 +6,7 @@ repositories { } dependencies { - implementation('com.microblink:blinkid:5.16.1@aar') { + implementation('com.microblink:blinkid:5.17.0@aar') { transitive = true } } diff --git a/Release notes.md b/Release notes.md index 72be622..4b390f4 100644 --- a/Release notes.md +++ b/Release notes.md @@ -1,3 +1,6 @@ +## 5.17.0 +- Updated to [Android SDK v5.17.0](https://github.com/BlinkID/blinkid-android/releases/tag/v5.17.0) and [iOS SDK v5.17.0](https://github.com/BlinkID/blinkid-ios/releases/tag/v5.17.0) + ## 5.16.0 - Updated to [Android SDK v5.16.0](https://github.com/BlinkID/blinkid-android/releases/tag/v5.16.0) and [iOS SDK v5.16.0](https://github.com/BlinkID/blinkid-ios/releases/tag/v5.16.0) diff --git a/sample_files/www/js/index.js b/sample_files/www/js/index.js index c03d747..448c63b 100644 --- a/sample_files/www/js/index.js +++ b/sample_files/www/js/index.js @@ -77,7 +77,7 @@ var app = { // package name/bundleID com.microblink.sample var licenseKeys = { - android: 'sRwAAAAVY29tLm1pY3JvYmxpbmsuc2FtcGxlU9kJdZhZkGlTu9XHP2tly7tSD2ZBhUN9mBJgzB+kfcYY69dFpZaHtMkS44AAdMj7JJpg5dTgYeWbstEWDHNjqL0tvLOjYPeS0tfPZz7c3euhPFSj7MJHzxZMYG5wR3mAsGo2iNqv4B3+C5NLQOCc0QNNmWFAG1B3GNCqufRZGxtMiJxrxYrM5WreJ7dl6+TV9zfL2WSc6Uk1VPfVaa/T1VfEu4AGnBte8c4IJA48mvEOWKyh/qwU7joalKv/gJXJknGuUdSzJiOdmeKq+iTRGUoNmp8SL15RV47dZuyaPgE8evDECqGO6GMaz2HOJ/ZqtaYhWR3xHwiKesjsogGr5lo=', + android: 'sRwAAAAVY29tLm1pY3JvYmxpbmsuc2FtcGxlU9kJdZhZkGlTu9XHO8NDZ5etowTvAoM3PXg5QKNOMEzS+WzcCNYkGg0p7csI0R/oydYtBy2pDTTG1MHqYaFvnxUnpSu1mcXUVUOiddboBBWBXu6Z9Pq5iYIdZ3/HuZFmW1V4PK7S0WiUzzlYDHFNMH+KnaDNnJawX7D7X1S7i9KriklziYyNkX59wv1uOaExxS7FuftzTBtqxMjzOmuwglSXXzrqUE4uwNnAijs9b9Jqr/2Y72qkE+SiBY45N5E0BLpG9ex0NFT/uiLhmd1BEZBrKWouCOPogSmKBE30mawHpesSS/4XsjAZH8a5FqQdsL4QXbeYeHsAcSyDhoiwPw0="', ios: 'sRwAAAEVY29tLm1pY3JvYmxpbmsuc2FtcGxl1BIcP4FpSuS/38KlP3avmLzrsviBmV88MupFPd0dvU7q90na2QxX62I2xowx1Wi9J9I6I5k4V2p1z917NGvULzZqkh1lDbt9eO6M3+Ki1138TbG6imO8S8XFZ+VjaDqUHv/hrjG1e1p8pxtjCPMqJvo8lzQHkjaF+ej4hc8xp5ZSzD+RUI9gxBrVrPewo6v5ug96yWSlD2NqO5XTDsdx71Z/GyXgVvWRdz5Lhl3y7p1HLDpk5cknfWM6Q9xOmiMErMPuiwsWtrQY7X2xm+IVvhnUEW8jDDiNmcJG1W9V9IwVKHl233QUu2mOamKgUjy1VjBYKq235Ui66NqCEkNFvvg=' }; @@ -151,6 +151,14 @@ var app = { buildResult(blinkIdResult.recognitionMode, "Recognition mode") ; + let dataMatchDetailedInfo = blinkIdResult.dataMatchDetailedInfo; + resultString += + buildResult(dataMatchDetailedInfo.dataMatchResult, "Data match result") + + buildResult(dataMatchDetailedInfo.dateOfExpiry, "dateOfExpiry") + + buildResult(dataMatchDetailedInfo.dateOfBirth, "dateOfBirth") + + buildResult(dataMatchDetailedInfo.documentNumber, "documentNumber"); + + var licenceInfo = blinkIdResult.driverLicenseDetailedInfo; if (licenceInfo) { var vehicleClassesInfoString = ''; From b5b1abf91d1e2749463c93cf936a3d139edae535 Mon Sep 17 00:00:00 2001 From: Mijo Gracanin Date: Wed, 29 Jun 2022 13:34:01 +0200 Subject: [PATCH 3/3] [iOS] update for 5.17.0 --- BlinkID/scripts/initIOSFramework.sh | 2 +- .../ios/sources/MBBlinkIDSerializationUtils.h | 1 + .../ios/sources/MBBlinkIDSerializationUtils.m | 9 + .../MBBlinkIdCombinedRecognizerWrapper.m | 1 + BlinkID/www/blinkIdScanner.js | 485 +++++++++++++----- sample_files/www/js/index.js | 2 +- 6 files changed, 371 insertions(+), 129 deletions(-) diff --git a/BlinkID/scripts/initIOSFramework.sh b/BlinkID/scripts/initIOSFramework.sh index 51c543d..b74dea9 100755 --- a/BlinkID/scripts/initIOSFramework.sh +++ b/BlinkID/scripts/initIOSFramework.sh @@ -4,7 +4,7 @@ HERE="$(dirname "$(test -L "$0" && readlink "$0" || echo "$0")")" pushd "${HERE}/../src/ios/" > /dev/null -LINK='https://github.com/BlinkID/blinkid-ios/releases/download/v5.16.1/Microblink.xcframework.zip' +LINK='https://github.com/BlinkID/blinkid-ios/releases/download/v5.17.0/Microblink.xcframework.zip' FILENAME='Microblink.xcframework.zip' # check if Microblink framework and bundle already exist diff --git a/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.h b/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.h index 9435432..b58c34d 100644 --- a/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.h +++ b/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.h @@ -15,6 +15,7 @@ +(MBImageExtensionFactors) deserializeMBImageExtensionFactors:(NSDictionary * _Nullable)jsonExtensionFactors; +(NSDictionary * _Nonnull) serializeDriverLicenseDetailedInfo:(MBDriverLicenseDetailedInfo * _Nonnull)driverLicenseDetailedInfo; +(NSDictionary * _Nonnull) serializeVehicleClassInfo:(MBVehicleClassInfo * _Nonnull)vehicleClassInfo; ++(NSDictionary * _Nonnull) serializeDataMatchDetailedInfo:(MBDataMatchDetailedInfo * _Nonnull)dataMatchDetailedInfo; +(NSDictionary * _Nonnull) serializeClassInfo:(MBClassInfo * _Nonnull)classInfo; +(NSDictionary * _Nonnull) serializeVizResult:(MBVizResult * _Nonnull)vizResult; +(NSDictionary * _Nonnull) serializeBarcodeResult:(MBBarcodeResult * _Nonnull)barcodeResult; diff --git a/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.m b/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.m index 438af56..da709e2 100644 --- a/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.m +++ b/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.m @@ -78,6 +78,15 @@ +(NSDictionary *) serializeVehicleClassInfo:(MBVehicleClassInfo *)vehicleClassIn }; } ++(NSDictionary * _Nonnull) serializeDataMatchDetailedInfo:(MBDataMatchDetailedInfo *)dataMatchDetailedInfo { + return @{ + @"dateOfBirth" : @([dataMatchDetailedInfo getDateOfBirth]), + @"dateOfExpiry" : @([dataMatchDetailedInfo getDateOfExpiry]), + @"documentNumber" : @([dataMatchDetailedInfo getDocumentNumber]), + @"dataMatchResult" : @([dataMatchDetailedInfo getDataMatchResult]) + }; +} + +(NSDictionary *) serializeClassInfo:(MBClassInfo *)classInfo { return @{ @"country" : [NSNumber numberWithInteger:(classInfo.country + 1)], diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdCombinedRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdCombinedRecognizerWrapper.m index 071e510..94c492b 100644 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdCombinedRecognizerWrapper.m +++ b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdCombinedRecognizerWrapper.m @@ -156,6 +156,7 @@ -(NSDictionary *) serializeResult { [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.barcodeCameraFrame] forKey:@"barcodeCameraFrame"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeBarcodeResult:self.result.barcodeResult] forKey:@"barcodeResult"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeClassInfo:self.result.classInfo] forKey:@"classInfo"]; + [jsonResult setValue:[MBBlinkIDSerializationUtils serializeDataMatchDetailedInfo:self.result.dataMatchDetailedInfo] forKey:@"dataMatchDetailedInfo"]; [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; [jsonResult setValue:[NSNumber numberWithBool:self.result.dateOfExpiryPermanent] forKey:@"dateOfExpiryPermanent"]; diff --git a/BlinkID/www/blinkIdScanner.js b/BlinkID/www/blinkIdScanner.js index 124df64..c4cc4e4 100644 --- a/BlinkID/www/blinkIdScanner.js +++ b/BlinkID/www/blinkIdScanner.js @@ -2371,7 +2371,7 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * The additional name information of the document owner. + * The additional address information of the document owner. */ this.additionalAddressInformation = nativeResult.additionalAddressInformation; @@ -2392,16 +2392,18 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { /** * The current age of the document owner in years. It is calculated difference + * between now and date of birth. Now is current time on the device. + * @return current age of the document owner in years or -1 if date of birth is unknown. */ this.age = nativeResult.age; /** - * Back camera frame. + * The back raw camera frame. */ this.backCameraFrame = nativeResult.backCameraFrame; /** - * Image analysis result for the scanned document back side image + * Defines possible color and moire statuses determined from scanned back image. */ this.backImageAnalysisResult = nativeResult.backImageAnalysisResult; @@ -2411,22 +2413,22 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { this.backProcessingStatus = nativeResult.backProcessingStatus; /** - * The data extracted from the back side visual inspection zone. + * Defines the data extracted from the back side visual inspection zone. */ this.backVizResult = nativeResult.backVizResult; /** - * Barcode camera frame. + * The barcode raw camera frame. */ this.barcodeCameraFrame = nativeResult.barcodeCameraFrame; /** - * The data extracted from the barcode. + * Defines the data extracted from the barcode. */ this.barcodeResult = nativeResult.barcodeResult; /** - * The document class information. + * The classification information. */ this.classInfo = nativeResult.classInfo; @@ -2461,7 +2463,10 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { this.documentAdditionalNumber = nativeResult.documentAdditionalNumber; /** - * Defines result of the data matching algorithm for scanned parts/sides of the document. + * Returns DataMatchResultSuccess if data from scanned parts/sides of the document match, + * DataMatchResultFailed otherwise. For example if date of expiry is scanned from the front and back side + * of the document and values do not match, this method will return DataMatchResultFailed. Result will + * be DataMatchResultSuccess only if scanned values for all fields that are compared are the same. */ this.documentDataMatch = nativeResult.documentDataMatch; @@ -2487,16 +2492,22 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { /** * Checks whether the document has expired or not by comparing the current + * time on the device with the date of expiry. + * + * @return true if the document has expired, false in following cases: + * document does not expire (date of expiry is permanent) + * date of expiry has passed + * date of expiry is unknown and it is not permanent */ this.expired = nativeResult.expired; /** - * Face image from the document + * face image from the document if enabled with returnFaceImage property. */ this.faceImage = nativeResult.faceImage; /** - * The fathers name of the document owner. + * The father's name of the document owner. */ this.fathersName = nativeResult.fathersName; @@ -2506,12 +2517,12 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { this.firstName = nativeResult.firstName; /** - * Front camera frame. + * The front raw camera frame. */ this.frontCameraFrame = nativeResult.frontCameraFrame; /** - * Image analysis result for the scanned document front side image + * Defines possible color and moire statuses determined from scanned front image. */ this.frontImageAnalysisResult = nativeResult.frontImageAnalysisResult; @@ -2521,17 +2532,17 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { this.frontProcessingStatus = nativeResult.frontProcessingStatus; /** - * The data extracted from the front side visual inspection zone. + * Defines the data extracted from the front side visual inspection zone. */ this.frontVizResult = nativeResult.frontVizResult; /** - * Back side image of the document + * back side image of the document if enabled with returnFullDocumentImage property. */ this.fullDocumentBackImage = nativeResult.fullDocumentBackImage; /** - * Front side image of the document + * front side image of the document if enabled with returnFullDocumentImage property. */ this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage; @@ -2561,12 +2572,12 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { this.maritalStatus = nativeResult.maritalStatus; /** - * The mothers name of the document owner. + * The mother's name of the document owner. */ this.mothersName = nativeResult.mothersName; /** - * The data extracted from the machine readable zone. + * The data extracted from the machine readable zone */ this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; @@ -2586,7 +2597,7 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { this.placeOfBirth = nativeResult.placeOfBirth; /** - * Status of the last recognition process. + * Defines status of the last recognition process. */ this.processingStatus = nativeResult.processingStatus; @@ -2616,7 +2627,8 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { this.residentialStatus = nativeResult.residentialStatus; /** - * {true} if recognizer has finished scanning first side and is now scanning back side, + * Returns true if recognizer has finished scanning first side and is now scanning back side, + * false if it's still scanning first side. */ this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; @@ -2626,7 +2638,7 @@ function BlinkIdCombinedRecognizerResult(nativeResult) { this.sex = nativeResult.sex; /** - * Signature image from the document + * image of the signature if enabled with returnSignatureImage property. */ this.signatureImage = nativeResult.signatureImage; @@ -2637,103 +2649,153 @@ BlinkIdCombinedRecognizerResult.prototype = new RecognizerResult(RecognizerResul BlinkID.prototype.BlinkIdCombinedRecognizerResult = BlinkIdCombinedRecognizerResult; /** - * A generic recognizer which can scan front and back side of the document. + * Recognizer which can scan front and back side of the United States driver license. */ function BlinkIdCombinedRecognizer() { Recognizer.call(this, 'BlinkIdCombinedRecognizer'); /** - * Defines whether blured frames filtering is allowed. + * Defines whether blured frames filtering is allowed + * + * */ this.allowBlurFilter = true; /** * Proceed with scanning the back side even if the front side result is uncertain. + * This only works for still images - video feeds will ignore this setting. + * + * */ this.allowUncertainFrontSideScan = false; /** - * Defines whether returning of unparsed MRZ (Machine Readable Zone) results is allowed. + * Defines whether returning of unparsed MRZ (Machine Readable Zone) results is allowed + * + * */ this.allowUnparsedMrzResults = false; /** - * Defines whether returning unverified MRZ (Machine Readable Zone) results is allowed. + * Defines whether returning unverified MRZ (Machine Readable Zone) results is allowed + * Unverified MRZ is parsed, but check digits are incorrect + * + * */ this.allowUnverifiedMrzResults = true; /** - * Whether sensitive data should be removed from images, result fields or both. + * Defines whether sensitive data should be removed from images, result fields or both. + * The setting only applies to certain documents + * + * */ this.anonymizationMode = AnonymizationMode.FullResult; /** - * The DPI (Dots Per Inch) for face image that should be returned. + * Property for setting DPI for face images + * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception + * + * */ this.faceImageDpi = 250; /** - * The DPI (Dots Per Inch) for full document image that should be returned. + * Property for setting DPI for full document images + * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception + * + * */ this.fullDocumentImageDpi = 250; /** - * The extension factors for full document image. + * Image extension factors for full document image. + * + * @see ImageExtensionFactors + * */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); /** * Configure the number of characters per field that are allowed to be inconsistent in data match. + * + * */ this.maxAllowedMismatchesPerField = 0; /** - * Padding is a minimum distance from the edge of the frame and it is defined + * Pading is a minimum distance from the edge of the frame and is defined as a percentage of the frame width. Default value is 0.0f and in that case + * padding edge and image edge are the same. + * Recommended value is 0.02f. + * + * */ this.paddingEdge = 0.0; /** - * Currently set recognition mode filter. + * Enable or disable recognition of specific document groups supported by the current license. + * + * */ this.recognitionModeFilter = new RecognitionModeFilter(); /** - * Defines whether face image will be available in result. + * Sets whether face image from ID card should be extracted + * + * */ this.returnFaceImage = false; /** - * Defines whether full document image will be available in + * Sets whether full document image of ID card should be extracted. + * + * */ this.returnFullDocumentImage = false; /** - * Defines whether signature image will be available in result. + * Sets whether signature image from ID card should be extracted. + * + * */ this.returnSignatureImage = false; /** * Configure the recognizer to save the raw camera frames. + * This significantly increases memory consumption. + * + * */ this.saveCameraFrames = false; /** * Configure the recognizer to only work on already cropped and dewarped images. + * This only works for still images - video feeds will ignore this setting. + * + * */ this.scanCroppedDocumentImage = false; /** - * The DPI (Dots Per Inch) for signature image that should be returned. + * Property for setting DPI for signature images + * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception + * + * */ this.signatureImageDpi = 250; /** - * Skip back side capture and processing step when back side of the document is not supported. + * Skip back side capture and processing step when back side of the document is not supported + * + * */ this.skipUnsupportedBack = false; /** - * Whether result characters validatation is performed. + * Defines whether result characters validatation is performed. + * If a result member contains invalid character, the result state cannot be valid + * + * */ this.validateResultCharacters = true; @@ -2752,7 +2814,7 @@ function BlinkIdRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * The additional name information of the document owner. + * The additional address information of the document owner. */ this.additionalAddressInformation = nativeResult.additionalAddressInformation; @@ -2773,26 +2835,28 @@ function BlinkIdRecognizerResult(nativeResult) { /** * The current age of the document owner in years. It is calculated difference + * between now and date of birth. Now is current time on the device. + * @return current age of the document owner in years or -1 if date of birth is unknown. */ this.age = nativeResult.age; /** - * Barcode camera frame. + * The barcode raw camera frame. */ this.barcodeCameraFrame = nativeResult.barcodeCameraFrame; /** - * The data extracted from the barcode. + * Defines the data extracted from the barcode. */ this.barcodeResult = nativeResult.barcodeResult; /** - * Camera frame. + * The raw camera frame. */ this.cameraFrame = nativeResult.cameraFrame; /** - * The document class information. + * The classification information. */ this.classInfo = nativeResult.classInfo; @@ -2843,16 +2907,22 @@ function BlinkIdRecognizerResult(nativeResult) { /** * Checks whether the document has expired or not by comparing the current + * time on the device with the date of expiry. + * + * @return true if the document has expired, false in following cases: + * document does not expire (date of expiry is permanent) + * date of expiry has passed + * date of expiry is unknown and it is not permanent */ this.expired = nativeResult.expired; /** - * Face image from the document + * face image from the document if enabled with returnFaceImage property. */ this.faceImage = nativeResult.faceImage; /** - * The fathers name of the document owner. + * The father's name of the document owner. */ this.fathersName = nativeResult.fathersName; @@ -2862,7 +2932,7 @@ function BlinkIdRecognizerResult(nativeResult) { this.firstName = nativeResult.firstName; /** - * Image of the full document + * full document image if enabled with returnFullDocumentImage property. */ this.fullDocumentImage = nativeResult.fullDocumentImage; @@ -2872,7 +2942,7 @@ function BlinkIdRecognizerResult(nativeResult) { this.fullName = nativeResult.fullName; /** - * Image analysis result for the scanned document image + * Defines possible color and moire statuses determined from scanned image. */ this.imageAnalysisResult = nativeResult.imageAnalysisResult; @@ -2897,12 +2967,12 @@ function BlinkIdRecognizerResult(nativeResult) { this.maritalStatus = nativeResult.maritalStatus; /** - * The mothers name of the document owner. + * The mother's name of the document owner. */ this.mothersName = nativeResult.mothersName; /** - * The data extracted from the machine readable zone. + * The data extracted from the machine readable zone */ this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; @@ -2922,7 +2992,7 @@ function BlinkIdRecognizerResult(nativeResult) { this.placeOfBirth = nativeResult.placeOfBirth; /** - * Status of the last recognition process. + * Defines status of the last recognition process. */ this.processingStatus = nativeResult.processingStatus; @@ -2957,12 +3027,12 @@ function BlinkIdRecognizerResult(nativeResult) { this.sex = nativeResult.sex; /** - * Signature image from the document + * image of the signature if enabled with returnSignatureImage property. */ this.signatureImage = nativeResult.signatureImage; /** - * The data extracted from the visual inspection zone. + * Defines the data extracted from the visual inspection zone */ this.vizResult = nativeResult.vizResult; @@ -2973,88 +3043,131 @@ BlinkIdRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.e BlinkID.prototype.BlinkIdRecognizerResult = BlinkIdRecognizerResult; /** - * Generic BlinkID recognizer. + * The Blink ID Recognizer is used for scanning Blink ID. */ function BlinkIdRecognizer() { Recognizer.call(this, 'BlinkIdRecognizer'); /** - * Defines whether blured frames filtering is allowed" + * Defines whether blured frames filtering is allowed + * + * */ this.allowBlurFilter = true; /** - * Defines whether returning of unparsed MRZ (Machine Readable Zone) results is allowed. + * Defines whether returning of unparsed MRZ (Machine Readable Zone) results is allowed + * + * */ this.allowUnparsedMrzResults = false; /** - * Defines whether returning unverified MRZ (Machine Readable Zone) results is allowed. + * Defines whether returning unverified MRZ (Machine Readable Zone) results is allowed + * Unverified MRZ is parsed, but check digits are incorrect + * + * */ this.allowUnverifiedMrzResults = true; /** - * Whether sensitive data should be removed from images, result fields or both. + * Defines whether sensitive data should be removed from images, result fields or both. + * The setting only applies to certain documents + * + * */ this.anonymizationMode = AnonymizationMode.FullResult; /** - * The DPI (Dots Per Inch) for face image that should be returned. + * Property for setting DPI for face images + * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception + * + * */ this.faceImageDpi = 250; /** - * The DPI (Dots Per Inch) for full document image that should be returned. + * Property for setting DPI for full document images + * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception + * + * */ this.fullDocumentImageDpi = 250; /** - * The extension factors for full document image. + * Image extension factors for full document image. + * + * @see ImageExtensionFactors + * */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); /** - * Padding is a minimum distance from the edge of the frame and it is defined + * Pading is a minimum distance from the edge of the frame and is defined as a percentage of the frame width. Default value is 0.0f and in that case + * padding edge and image edge are the same. + * Recommended value is 0.02f. + * + * */ this.paddingEdge = 0.0; /** - * Currently set recognition mode filter. + * Enable or disable recognition of specific document groups supported by the current license. + * + * */ this.recognitionModeFilter = new RecognitionModeFilter(); /** - * Defines whether face image will be available in result. + * Sets whether face image from ID card should be extracted + * + * */ this.returnFaceImage = false; /** - * Defines whether full document image will be available in + * Sets whether full document image of ID card should be extracted. + * + * */ this.returnFullDocumentImage = false; /** - * Defines whether signature image will be available in result. + * Sets whether signature image from ID card should be extracted. + * + * */ this.returnSignatureImage = false; /** * Configure the recognizer to save the raw camera frames. + * This significantly increases memory consumption. + * + * */ this.saveCameraFrames = false; /** * Configure the recognizer to only work on already cropped and dewarped images. + * This only works for still images - video feeds will ignore this setting. + * + * */ this.scanCroppedDocumentImage = false; /** - * The DPI (Dots Per Inch) for signature image that should be returned. + * Property for setting DPI for signature images + * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception + * + * */ this.signatureImageDpi = 250; /** - * Whether result characters validatation is performed. + * Defines whether result characters validatation is performed. + * If a result member contains invalid character, the result state cannot be valid + * + * */ this.validateResultCharacters = true; @@ -3073,22 +3186,22 @@ function DocumentFaceRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * The location of document detection in coordinate system of full input frame. + * Quadrangle represeting corner points of the document within the input image. */ this.documentLocation = nativeResult.documentLocation != null ? new Quadrilateral(nativeResult.documentLocation) : null; /** - * Face image from the document + * face image from the document if enabled with returnFaceImage property. */ this.faceImage = nativeResult.faceImage; /** - * The location of face detection in coordinate system of cropped full document image. + * Quadrangle represeting corner points of the face image within the input image. */ this.faceLocation = nativeResult.faceLocation != null ? new Quadrilateral(nativeResult.faceLocation) : null; /** - * Image of the full document + * full document image if enabled with returnFullDocumentImage property. */ this.fullDocumentImage = nativeResult.fullDocumentImage; @@ -3099,43 +3212,65 @@ DocumentFaceRecognizerResult.prototype = new RecognizerResult(RecognizerResultSt BlinkID.prototype.DocumentFaceRecognizerResult = DocumentFaceRecognizerResult; /** - * Recognizer for detecting holder's photo on documents containing image. + * Class for configuring Document Face Recognizer Recognizer. + * + * Document Face Recognizer recognizer is used for scanning documents containing face images. */ function DocumentFaceRecognizer() { Recognizer.call(this, 'DocumentFaceRecognizer'); /** - * Currently used detector type. + * Type of docment this recognizer will scan. + * + * */ this.detectorType = DocumentFaceDetectorType.TD1; /** - * The DPI (Dots Per Inch) for face image that should be returned. + * Property for setting DPI for face images + * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception + * + * */ this.faceImageDpi = 250; /** - * The DPI (Dots Per Inch) for full document image that should be returned. + * Property for setting DPI for full document images + * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception + * + * */ this.fullDocumentImageDpi = 250; /** - * The extension factors for full document image. + * Image extension factors for full document image. + * + * @see ImageExtensionFactors + * */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); /** - * Minimum number of stable detections required for detection to be successful. + * Defines how many times the same document should be detected before the detector + * returns this document as a result of the deteciton + * + * Higher number means more reliable detection, but slower processing + * + * */ this.numStableDetectionsThreshold = 6; /** - * Defines whether face image will be available in result. + * Sets whether face image from ID card should be extracted + * + * */ this.returnFaceImage = false; /** - * Defines whether full document image will be available in + * Sets whether full document image of ID card should be extracted. + * + * */ this.returnFullDocumentImage = false; @@ -3165,11 +3300,15 @@ function IdBarcodeRecognizerResult(nativeResult) { /** * The current age of the document owner in years. It is calculated difference + * between now and date of birth. Now is current time on the device. + * @return current age of the document owner in years or -1 if date of birth is unknown. */ this.age = nativeResult.age; /** - * The format of the scanned barcode. + * Type of the barcode scanned + * + * @return Type of the barcode */ this.barcodeType = nativeResult.barcodeType; @@ -3205,6 +3344,8 @@ function IdBarcodeRecognizerResult(nativeResult) { /** * The document type deduced from the recognized barcode + * + * @return Type of the document */ this.documentType = nativeResult.documentType; @@ -3220,11 +3361,19 @@ function IdBarcodeRecognizerResult(nativeResult) { /** * Checks whether the document has expired or not by comparing the current + * time on the device with the date of expiry. + * + * @return true if the document has expired, false in following cases: + * document does not expire (date of expiry is permanent) + * date of expiry has passed + * date of expiry is unknown and it is not permanent */ this.expired = nativeResult.expired; /** * Document specific extended elements that contain all barcode fields in their original form. + * + * Currently this is only filled for AAMVACompliant documents. */ this.extendedElements = nativeResult.extendedElements; @@ -3294,7 +3443,7 @@ function IdBarcodeRecognizerResult(nativeResult) { this.race = nativeResult.race; /** - * The raw bytes contained inside barcode. + * Byte array with result of the scan */ this.rawData = nativeResult.rawData; @@ -3304,7 +3453,7 @@ function IdBarcodeRecognizerResult(nativeResult) { this.religion = nativeResult.religion; /** - * The residential status of the document owner. + * The residential stauts of the document owner. */ this.residentialStatus = nativeResult.residentialStatus; @@ -3324,12 +3473,13 @@ function IdBarcodeRecognizerResult(nativeResult) { this.street = nativeResult.street; /** - * String representation of data inside barcode. + * Retrieves string content of scanned data */ this.stringData = nativeResult.stringData; /** - * True if returned result is uncertain, i.e. if scanned barcode was incomplete (i.e. + * Flag indicating uncertain scanning data + * E.g obtained from damaged barcode. */ this.uncertain = nativeResult.uncertain; @@ -3365,32 +3515,36 @@ function MrtdCombinedRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * Defines result of the data matching algorithm for scanned parts/sides of the document. + * Returns DataMatchResultSuccess if data from scanned parts/sides of the document match, + * DataMatchResultFailed otherwise. For example if date of expiry is scanned from the front and back side + * of the document and values do not match, this method will return DataMatchResultFailed. Result will + * be DataMatchResultSuccess only if scanned values for all fields that are compared are the same. */ this.documentDataMatch = nativeResult.documentDataMatch; /** - * Face image from the document + * face image from the document if enabled with returnFaceImage property. */ this.faceImage = nativeResult.faceImage; /** - * Back side image of the document + * back side image of the document if enabled with returnFullDocumentImage property. */ this.fullDocumentBackImage = nativeResult.fullDocumentBackImage; /** - * Front side image of the document + * front side image of the document if enabled with returnFullDocumentImage property. */ this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage; /** - * The data extracted from the machine readable zone. + * Returns the Data extracted from the machine readable zone. */ this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; /** - * {true} if recognizer has finished scanning first side and is now scanning back side, + * Returns true if recognizer has finished scanning first side and is now scanning back side, + * false if it's still scanning first side. */ this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; @@ -3401,59 +3555,87 @@ MrtdCombinedRecognizerResult.prototype = new RecognizerResult(RecognizerResultSt BlinkID.prototype.MrtdCombinedRecognizerResult = MrtdCombinedRecognizerResult; /** - * Recognizer for combined reading of face from front side of documents and MRZ from back side of - * * Machine Readable Travel Document. + * MRTD Combined recognizer + * + * MRTD Combined recognizer is used for scanning both front and back side of generic IDs. */ function MrtdCombinedRecognizer() { Recognizer.call(this, 'MrtdCombinedRecognizer'); /** - * Whether special characters are allowed. + * Whether special characters are allowed + * + * */ this.allowSpecialCharacters = false; /** - * Whether returning of unparsed results is allowed. + * Whether returning of unparsed results is allowed + * + * */ this.allowUnparsedResults = false; /** - * Whether returning of unverified results is allowed. + * Whether returning of unverified results is allowed + * Unverified result is result that is parsed, but check digits are incorrect. + * + * */ this.allowUnverifiedResults = false; /** - * Currently used detector type. + * Type of document this recognizer will scan. + * + * */ this.detectorType = DocumentFaceDetectorType.TD1; /** - * The DPI (Dots Per Inch) for face image that should be returned. + * Property for setting DPI for face images + * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception + * + * */ this.faceImageDpi = 250; /** - * The DPI (Dots Per Inch) for full document image that should be returned. + * Property for setting DPI for full document images + * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception + * + * */ this.fullDocumentImageDpi = 250; /** - * The extension factors for full document image. + * Image extension factors for full document image. + * + * @see ImageExtensionFactors + * */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); /** - * Minimum number of stable detections required for detection to be successful. + * Defines how many times the same document should be detected before the detector + * returns this document as a result of the deteciton + * + * Higher number means more reliable detection, but slower processing + * + * */ this.numStableDetectionsThreshold = 6; /** - * Defines whether face image will be available in result. + * Sets whether face image from ID card should be extracted + * + * */ this.returnFaceImage = false; /** - * Defines whether full document image will be available in + * Sets whether full document image of ID card should be extracted. + * + * */ this.returnFullDocumentImage = false; @@ -3472,12 +3654,12 @@ function MrtdRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * Image of the full document + * full document image if enabled with returnFullDocumentImage property. */ this.fullDocumentImage = nativeResult.fullDocumentImage; /** - * The Data extracted from the machine readable zone. + * Returns the Data extracted from the machine readable zone. */ this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null; @@ -3488,43 +3670,60 @@ MrtdRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empt BlinkID.prototype.MrtdRecognizerResult = MrtdRecognizerResult; /** - * Recognizer that can recognize Machine Readable Zone (MRZ) of the Machine Readable Travel Document (MRTD) + * Recognizer that can recognizer Machine Readable Zone (MRZ) of the Machine Readable Travel Document (MRTD) */ function MrtdRecognizer() { Recognizer.call(this, 'MrtdRecognizer'); /** - * Whether special characters are allowed. + * Whether special characters are allowed + * + * */ this.allowSpecialCharacters = false; /** - * Whether returning of unparsed results is allowed. + * Whether returning of unparsed results is allowed + * + * */ this.allowUnparsedResults = false; /** - * Whether returning of unverified results is allowed. + * Whether returning of unverified results is allowed + * Unverified result is result that is parsed, but check digits are incorrect. + * + * */ this.allowUnverifiedResults = false; /** - * Defines whether glare detector is enabled. + * Defines if glare detection should be turned on/off. + * + * */ this.detectGlare = true; /** - * The DPI (Dots Per Inch) for full document image that should be returned. + * Property for setting DPI for full document images + * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception + * + * */ this.fullDocumentImageDpi = 250; /** - * The extension factors for full document image. + * Image extension factors for full document image. + * + * @see ImageExtensionFactors + * */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); /** - * Defines whether full document image will be available in + * Sets whether full document image of ID card should be extracted. + * + * */ this.returnFullDocumentImage = false; @@ -3543,12 +3742,12 @@ function PassportRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * Face image from the document + * face image from the document if enabled with returnFaceImage property. */ this.faceImage = nativeResult.faceImage; /** - * Image of the full document + * full document image if enabled with returnFullDocumentImage property. */ this.fullDocumentImage = nativeResult.fullDocumentImage; @@ -3570,37 +3769,54 @@ function PassportRecognizer() { Recognizer.call(this, 'PassportRecognizer'); /** - * Defines whether the Netherlands MRZ should be anonymized. + * Defines whether to anonymize Netherlands MRZ + * + * */ this.anonymizeNetherlandsMrz = true; /** - * Defines whether glare detector is enabled. + * Defines if glare detection should be turned on/off. + * + * */ this.detectGlare = true; /** - * The DPI (Dots Per Inch) for face image that should be returned. + * Property for setting DPI for face images + * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception + * + * */ this.faceImageDpi = 250; /** - * The DPI (Dots Per Inch) for full document image that should be returned. + * Property for setting DPI for full document images + * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception + * + * */ this.fullDocumentImageDpi = 250; /** - * The extension factors for full document image. + * Image extension factors for full document image. + * + * @see ImageExtensionFactors + * */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); /** - * Defines whether face image will be available in result. + * Sets whether face image from ID card should be extracted + * + * */ this.returnFaceImage = false; /** - * Defines whether full document image will be available in + * Sets whether full document image of ID card should be extracted. + * + * */ this.returnFullDocumentImage = false; @@ -3619,12 +3835,12 @@ function VisaRecognizerResult(nativeResult) { RecognizerResult.call(this, nativeResult.resultState); /** - * Face image from the document + * face image from the document if enabled with returnFaceImage property. */ this.faceImage = nativeResult.faceImage; /** - * Image of the full document + * full document image if enabled with returnFullDocumentImage property. */ this.fullDocumentImage = nativeResult.fullDocumentImage; @@ -3646,32 +3862,47 @@ function VisaRecognizer() { Recognizer.call(this, 'VisaRecognizer'); /** - * Defines whether glare detector is enabled. + * Defines if glare detection should be turned on/off. + * + * */ this.detectGlare = true; /** - * The DPI (Dots Per Inch) for face image that should be returned. + * Property for setting DPI for face images + * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception + * + * */ this.faceImageDpi = 250; /** - * The DPI (Dots Per Inch) for full document image that should be returned. + * Property for setting DPI for full document images + * Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception + * + * */ this.fullDocumentImageDpi = 250; /** - * The extension factors for full document image. + * Image extension factors for full document image. + * + * @see ImageExtensionFactors + * */ this.fullDocumentImageExtensionFactors = new ImageExtensionFactors(); /** - * Defines whether face image will be available in result. + * Sets whether face image from ID card should be extracted + * + * */ this.returnFaceImage = false; /** - * Defines whether full document image will be available in + * Sets whether full document image of ID card should be extracted. + * + * */ this.returnFullDocumentImage = false; diff --git a/sample_files/www/js/index.js b/sample_files/www/js/index.js index 448c63b..19f30fe 100644 --- a/sample_files/www/js/index.js +++ b/sample_files/www/js/index.js @@ -78,7 +78,7 @@ var app = { // package name/bundleID com.microblink.sample var licenseKeys = { android: 'sRwAAAAVY29tLm1pY3JvYmxpbmsuc2FtcGxlU9kJdZhZkGlTu9XHO8NDZ5etowTvAoM3PXg5QKNOMEzS+WzcCNYkGg0p7csI0R/oydYtBy2pDTTG1MHqYaFvnxUnpSu1mcXUVUOiddboBBWBXu6Z9Pq5iYIdZ3/HuZFmW1V4PK7S0WiUzzlYDHFNMH+KnaDNnJawX7D7X1S7i9KriklziYyNkX59wv1uOaExxS7FuftzTBtqxMjzOmuwglSXXzrqUE4uwNnAijs9b9Jqr/2Y72qkE+SiBY45N5E0BLpG9ex0NFT/uiLhmd1BEZBrKWouCOPogSmKBE30mawHpesSS/4XsjAZH8a5FqQdsL4QXbeYeHsAcSyDhoiwPw0="', - ios: 'sRwAAAEVY29tLm1pY3JvYmxpbmsuc2FtcGxl1BIcP4FpSuS/38KlP3avmLzrsviBmV88MupFPd0dvU7q90na2QxX62I2xowx1Wi9J9I6I5k4V2p1z917NGvULzZqkh1lDbt9eO6M3+Ki1138TbG6imO8S8XFZ+VjaDqUHv/hrjG1e1p8pxtjCPMqJvo8lzQHkjaF+ej4hc8xp5ZSzD+RUI9gxBrVrPewo6v5ug96yWSlD2NqO5XTDsdx71Z/GyXgVvWRdz5Lhl3y7p1HLDpk5cknfWM6Q9xOmiMErMPuiwsWtrQY7X2xm+IVvhnUEW8jDDiNmcJG1W9V9IwVKHl233QUu2mOamKgUjy1VjBYKq235Ui66NqCEkNFvvg=' + ios: 'sRwAAAEVY29tLm1pY3JvYmxpbmsuc2FtcGxl1BIcP4FpSuS/38KlOx6IMzWbmaGEGiaL7eNSyKVwZjeUMW3Ax8aKh+quw2aZ4K4wKk+HtsAqjaGiGJSKWfeqZ/hXXpX3Kd7PRq/86AF3lpVWOZPN6FzUB6FVm7jYfVBUag4hYYxvq70616zMDQyaAItml02PvEL8OKbKbBxEYmVzBVpq3ew4JoHyRAaOJQfc9WEKrP4HYd8q4s15+HB/KO24IUVBabZggHMj2hOyAEM7p9dWpA/Q+n6C49w35xLfmcJrjSP0qE25bdTUMMEwhu6xiYmYdtMrqJkwCEIjzEQ04bEB3XWskZl3+AD5kUQH8qyhuEELR/mvbmvwxMBpwpM=' }; function buildResult(result, key) {