Skip to content

Commit

Permalink
Merge pull request #168 from BlinkID/release/6.10
Browse files Browse the repository at this point in the history
Release/6.10
  • Loading branch information
mparadina authored Sep 13, 2024
2 parents 7e5cfb2 + 7a8148e commit 1e0ee6d
Show file tree
Hide file tree
Showing 14 changed files with 141 additions and 10 deletions.
2 changes: 1 addition & 1 deletion BlinkID/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blinkid-cordova",
"version": "6.9.0",
"version": "6.10.0",
"description": "A small and powerful ID card scanning library",
"cordova": {
"id": "blinkid-cordova",
Expand Down
2 changes: 1 addition & 1 deletion BlinkID/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="blinkid-cordova"
version="6.9.0">
version="6.10.0">

<name>BlinkIdScanner</name>
<description>A small and powerful ID card scanning library</description>
Expand Down
2 changes: 1 addition & 1 deletion BlinkID/scripts/initIOSFramework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/v6.9.0/BlinkID.xcframework.zip'
LINK='https://github.com/BlinkID/blinkid-ios/releases/download/v6.10.1/BlinkID.xcframework.zip'
FILENAME='BlinkID.xcframework.zip'

# BlinkID framework will be obtained via wget or curl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,14 @@ public static JSONObject serializeAdditionalProcessingInfo(AdditionalProcessingI
for (int i = 0; i < additionalProcessingInfo.getExtraPresentFields().length; ++i) {
extraPresentFieldsArr.put(SerializationUtils.serializeEnum(additionalProcessingInfo.getExtraPresentFields()[i]));
}
JSONArray imageExtractionFailuresArr = new JSONArray();
for (int i = 0; i < additionalProcessingInfo.getImageExtractionFailures().length; ++i) {
imageExtractionFailuresArr.put(SerializationUtils.serializeEnum(additionalProcessingInfo.getImageExtractionFailures()[i]));
}
jsonAdditionalProcessingInfo.put("missingMandatoryFields", missingMandatoryFieldsArr);
jsonAdditionalProcessingInfo.put("invalidCharacterFields", invalidCharacterFieldsArr);
jsonAdditionalProcessingInfo.put("extraPresentFields", extraPresentFieldsArr);
jsonAdditionalProcessingInfo.put("imageExtractionFailures", imageExtractionFailuresArr);
return jsonAdditionalProcessingInfo;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ public final class BlinkIdMultiSideRecognizerSerialization implements Recognizer
public Recognizer<?> createRecognizer(JSONObject jsonObject) {
com.microblink.blinkid.entities.recognizers.blinkid.generic.BlinkIdMultiSideRecognizer recognizer = new com.microblink.blinkid.entities.recognizers.blinkid.generic.BlinkIdMultiSideRecognizer();
recognizer.setAdditionalAnonymization(BlinkIDSerializationUtils.deserializeClassAnonymizationSettings(jsonObject.optJSONArray("additionalAnonymization")));
recognizer.setAllowBarcodeScanOnly(jsonObject.optBoolean("allowBarcodeScanOnly", false));
recognizer.setAllowUncertainFrontSideScan(jsonObject.optBoolean("allowUncertainFrontSideScan", false));
recognizer.setAllowUnparsedMrzResults(jsonObject.optBoolean("allowUnparsedMrzResults", false));
recognizer.setAllowUnverifiedMrzResults(jsonObject.optBoolean("allowUnverifiedMrzResults", true));
recognizer.setAnonymizationMode(com.microblink.blinkid.entities.recognizers.blinkid.generic.AnonymizationMode.values()[jsonObject.optInt("anonymizationMode", 3)]);
recognizer.setBlurStrictnessLevel(com.microblink.blinkid.entities.recognizers.blinkid.generic.imageanalysis.StrictnessLevel.values()[jsonObject.optInt("blurStrictnessLevel", 1)]);
recognizer.setCombineFrameResults(jsonObject.optBoolean("combineFrameResults", true));
recognizer.setCustomClassRules(BlinkIDSerializationUtils.deserializeCustomClassRules(jsonObject.optJSONArray("customClassRules")));
recognizer.setEnableBlurFilter(jsonObject.optBoolean("enableBlurFilter", true));
recognizer.setEnableGlareFilter(jsonObject.optBoolean("enableGlareFilter", true));
Expand Down Expand Up @@ -57,6 +59,7 @@ public JSONObject serializeResult(Recognizer<?> recognizer) {
jsonResult.put("backVizResult", BlinkIDSerializationUtils.serializeVizResult(result.getBackVizResult()));
jsonResult.put("barcodeCameraFrame", SerializationUtils.encodeImageBase64(result.getBarcodeCameraFrame()));
jsonResult.put("barcodeResult", BlinkIDSerializationUtils.serializeBarcodeResult(result.getBarcodeResult()));
jsonResult.put("barcodeStepUsed", result.isBarcodeStepUsed());
jsonResult.put("bloodType", BlinkIDSerializationUtils.serializeStringResult(result.getBloodType()));
jsonResult.put("classInfo", BlinkIDSerializationUtils.serializeClassInfo(result.getClassInfo()));
jsonResult.put("dataMatch", BlinkIDSerializationUtils.serializeDataMatchResult(result.getDataMatch()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ public final class BlinkIdSingleSideRecognizerSerialization implements Recognize
public Recognizer<?> createRecognizer(JSONObject jsonObject) {
com.microblink.blinkid.entities.recognizers.blinkid.generic.BlinkIdSingleSideRecognizer recognizer = new com.microblink.blinkid.entities.recognizers.blinkid.generic.BlinkIdSingleSideRecognizer();
recognizer.setAdditionalAnonymization(BlinkIDSerializationUtils.deserializeClassAnonymizationSettings(jsonObject.optJSONArray("additionalAnonymization")));
recognizer.setAllowBarcodeScanOnly(jsonObject.optBoolean("allowBarcodeScanOnly", false));
recognizer.setAllowUnparsedMrzResults(jsonObject.optBoolean("allowUnparsedMrzResults", false));
recognizer.setAllowUnverifiedMrzResults(jsonObject.optBoolean("allowUnverifiedMrzResults", true));
recognizer.setAnonymizationMode(com.microblink.blinkid.entities.recognizers.blinkid.generic.AnonymizationMode.values()[jsonObject.optInt("anonymizationMode", 3)]);
recognizer.setBlurStrictnessLevel(com.microblink.blinkid.entities.recognizers.blinkid.generic.imageanalysis.StrictnessLevel.values()[jsonObject.optInt("blurStrictnessLevel", 1)]);
recognizer.setCombineFrameResults(jsonObject.optBoolean("combineFrameResults", true));
recognizer.setCustomClassRules(BlinkIDSerializationUtils.deserializeCustomClassRules(jsonObject.optJSONArray("customClassRules")));
recognizer.setEnableBlurFilter(jsonObject.optBoolean("enableBlurFilter", true));
recognizer.setEnableGlareFilter(jsonObject.optBoolean("enableGlareFilter", true));
Expand Down Expand Up @@ -50,6 +52,7 @@ public JSONObject serializeResult(Recognizer<?> recognizer) {
jsonResult.put("age", result.getAge());
jsonResult.put("barcodeCameraFrame", SerializationUtils.encodeImageBase64(result.getBarcodeCameraFrame()));
jsonResult.put("barcodeResult", BlinkIDSerializationUtils.serializeBarcodeResult(result.getBarcodeResult()));
jsonResult.put("barcodeStepUsed", result.isBarcodeStepUsed());
jsonResult.put("bloodType", BlinkIDSerializationUtils.serializeStringResult(result.getBloodType()));
jsonResult.put("cameraFrame", SerializationUtils.encodeImageBase64(result.getCameraFrame()));
jsonResult.put("classInfo", BlinkIDSerializationUtils.serializeClassInfo(result.getClassInfo()));
Expand Down
2 changes: 1 addition & 1 deletion BlinkID/src/android/libBlinkID.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repositories {
}

dependencies {
implementation('com.microblink:blinkid:6.9.0@aar') {
implementation('com.microblink:blinkid:6.10.0@aar') {
transitive = true
}
}
Expand Down
3 changes: 2 additions & 1 deletion BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ +(NSDictionary *)serializeAdditionalProcessingInfo:(MBAdditionalProcessingInfo *
return @{
@"missingMandatoryFields": additionalProcessingInfo.missingMandatoryFields,
@"invalidCharacterFields" : additionalProcessingInfo.invalidCharacterFields,
@"extraPresentFields": additionalProcessingInfo.extraPresentFields
@"extraPresentFields": additionalProcessingInfo.extraPresentFields,
@"imageExtractionFailures": additionalProcessingInfo.imageExtractionFailures
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
}
}
}
{
id allowBarcodeScanOnly = [jsonRecognizer valueForKey:@"allowBarcodeScanOnly"];
if (allowBarcodeScanOnly != nil) {
recognizer.allowBarcodeScanOnly = [(NSNumber *)allowBarcodeScanOnly boolValue];
}
}
{
id allowUncertainFrontSideScan = [jsonRecognizer valueForKey:@"allowUncertainFrontSideScan"];
if (allowUncertainFrontSideScan != nil) {
Expand Down Expand Up @@ -57,6 +63,12 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
recognizer.blurStrictnessLevel = (MBStrictnessLevel)[(NSNumber *)blurStrictnessLevel unsignedIntegerValue];
}
}
{
id combineFrameResults = [jsonRecognizer valueForKey:@"combineFrameResults"];
if (combineFrameResults != nil) {
recognizer.combineFrameResults = [(NSNumber *)combineFrameResults boolValue];
}
}
{
id customClassRules = [jsonRecognizer valueForKey:@"customClassRules"];
if (customClassRules != nil) {
Expand Down Expand Up @@ -194,6 +206,7 @@ -(NSDictionary *) serializeResult {
[jsonResult setValue:[MBBlinkIDSerializationUtils serializeVizResult:self.result.backVizResult] forKey:@"backVizResult"];
[jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.barcodeCameraFrame] forKey:@"barcodeCameraFrame"];
[jsonResult setValue:[MBBlinkIDSerializationUtils serializeBarcodeResult:self.result.barcodeResult] forKey:@"barcodeResult"];
[jsonResult setValue:[NSNumber numberWithBool:self.result.barcodeStepUsed] forKey:@"barcodeStepUsed"];
[jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.bloodType] forKey:@"bloodType"];
[jsonResult setValue:[MBBlinkIDSerializationUtils serializeClassInfo:self.result.classInfo] forKey:@"classInfo"];
[jsonResult setValue:[MBBlinkIDSerializationUtils serializeDataMatchResult:self.result.dataMatchResult] forKey:@"dataMatch"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
}
}
}
{
id allowBarcodeScanOnly = [jsonRecognizer valueForKey:@"allowBarcodeScanOnly"];
if (allowBarcodeScanOnly != nil) {
recognizer.allowBarcodeScanOnly = [(NSNumber *)allowBarcodeScanOnly boolValue];
}
}
{
id allowUnparsedMrzResults = [jsonRecognizer valueForKey:@"allowUnparsedMrzResults"];
if (allowUnparsedMrzResults != nil) {
Expand All @@ -51,6 +57,12 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
recognizer.blurStrictnessLevel = (MBStrictnessLevel)[(NSNumber *)blurStrictnessLevel unsignedIntegerValue];
}
}
{
id combineFrameResults = [jsonRecognizer valueForKey:@"combineFrameResults"];
if (combineFrameResults != nil) {
recognizer.combineFrameResults = [(NSNumber *)combineFrameResults boolValue];
}
}
{
id customClassRules = [jsonRecognizer valueForKey:@"customClassRules"];
if (customClassRules != nil) {
Expand Down Expand Up @@ -172,6 +184,7 @@ -(NSDictionary *) serializeResult {
[jsonResult setValue:[NSNumber numberWithInteger:self.result.age] forKey:@"age"];
[jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.barcodeCameraFrame] forKey:@"barcodeCameraFrame"];
[jsonResult setValue:[MBBlinkIDSerializationUtils serializeBarcodeResult:self.result.barcodeResult] forKey:@"barcodeResult"];
[jsonResult setValue:[NSNumber numberWithBool:self.result.barcodeStepUsed] forKey:@"barcodeStepUsed"];
[jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.bloodType] forKey:@"bloodType"];
[jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.cameraFrame] forKey:@"cameraFrame"];
[jsonResult setValue:[MBBlinkIDSerializationUtils serializeClassInfo:self.result.classInfo] forKey:@"classInfo"];
Expand Down
72 changes: 72 additions & 0 deletions BlinkID/www/blinkIdScanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,20 @@ BlinkID.prototype.FieldType = Object.freeze (
}
);

/**
* Defines the type of the extracted image.
*/
BlinkID.prototype.ImageExtractionType = Object.freeze (
{
/** Full document image. */
FullDocument: 0,
/** Face image. */
Face: 1,
/** Signature image. */
Signature: 2
}
);

/**
* Enumeration of possible barcode element keys
*/
Expand Down Expand Up @@ -2948,6 +2962,16 @@ function BlinkIdMultiSideRecognizerResult(nativeResult) {
*/
this.barcodeResult = nativeResult.barcodeResult;

/**
* This member indicates whether the barcode scanning step was utilized during the
* process.
* If the barcode scanning step was executed: a parsable barcode image will be stored in the
* `barcodeCameraFrame`.
* If the barcode scanning step was not executed: a parsable barcode image will be stored in the
* `fullDocumentImage`.
*/
this.barcodeStepUsed = nativeResult.barcodeStepUsed;

/**
* The blood type of the document owner.
*/
Expand Down Expand Up @@ -3225,6 +3249,16 @@ function BlinkIdMultiSideRecognizer() {
*/
this.additionalAnonymization = [];

/**
* Allows barcode recognition to proceed even if the initial extraction fails.
* This only works for still images - video feeds will ignore this setting.
* If the barcode recognition is successful, the recognizer will still end in a valid state.
* This setting is applicable only to photo frames. For multi-side recognizers, it is permitted only for the back side.
*
*
*/
this.allowBarcodeScanOnly = false;

/**
* 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.
Expand Down Expand Up @@ -3263,6 +3297,15 @@ function BlinkIdMultiSideRecognizer() {
*/
this.blurStrictnessLevel = StrictnessLevel.Normal;

/**
* Enables the aggregation of data from multiple frames.
* Disabling this setting will yield higher-quality captured images, but it may slow down the scanning process due to the additional effort required to find the optimal frame.
* Enabling this setting will simplify the extraction process, but the extracted data will be aggregated from multiple frames instead of being sourced from a single frame.
*
*
*/
this.combineFrameResults = true;

/**
* Get custom class rules.
*/
Expand Down Expand Up @@ -3452,6 +3495,16 @@ function BlinkIdSingleSideRecognizerResult(nativeResult) {
*/
this.barcodeResult = nativeResult.barcodeResult;

/**
* This member indicates whether the barcode scanning step was utilized during the
* process.
* If the barcode scanning step was executed: a parsable barcode image will be stored in the
* `barcodeCameraFrame`.
* If the barcode scanning step was not executed: a parsable barcode image will be stored in the
* `fullDocumentImage`.
*/
this.barcodeStepUsed = nativeResult.barcodeStepUsed;

/**
* The blood type of the document owner.
*/
Expand Down Expand Up @@ -3695,6 +3748,16 @@ function BlinkIdSingleSideRecognizer() {
*/
this.additionalAnonymization = [];

/**
* Allows barcode recognition to proceed even if the initial extraction fails.
* This only works for still images - video feeds will ignore this setting.
* If the barcode recognition is successful, the recognizer will still end in a valid state.
* This setting is applicable only to photo frames. For multi-side recognizers, it is permitted only for the back side.
*
*
*/
this.allowBarcodeScanOnly = false;

/**
* Defines whether returning of unparsed MRZ (Machine Readable Zone) results is allowed
*
Expand Down Expand Up @@ -3725,6 +3788,15 @@ function BlinkIdSingleSideRecognizer() {
*/
this.blurStrictnessLevel = StrictnessLevel.Normal;

/**
* Enables the aggregation of data from multiple frames.
* Disabling this setting will yield higher-quality captured images, but it may slow down the scanning process due to the additional effort required to find the optimal frame.
* Enabling this setting will simplify the extraction process, but the extracted data will be aggregated from multiple frames instead of being sourced from a single frame.
*
*
*/
this.combineFrameResults = true;

/**
* Get custom class rules.
*/
Expand Down
20 changes: 20 additions & 0 deletions Release notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
## 6.10.0

- We have updated the plugin to [Android SDK v6.10.0](https://github.com/BlinkID/blinkid-android/releases/tag/v6.10.0) and [iOS SDK v6.10.1](https://github.com/BlinkID/blinkid-ios/releases/tag/v6.10.1)

**Expanded document coverage**

- All of the new documents & document versions can also be found in the release notes for native Android and iOS SDKs.

**New features**

- ***Avoiding Double Scans of the Front Side***: For a more reliable scanning process, BlinkID now prompts users to flip the document when they scan the front side twice. This improves the overall experience and reduces the chance of mistakes.
- ***Starting with the Right Side***: If users attempt to scan the back side of a document first, BlinkID will prompt them to begin with the front side. This feature ensures that users follow the correct order, leading to a more reliable and user-friendly experience.
- Added `imageExtractionFailures` to `AdditionalProcessingInfo`
- `imageExtractionFailures` allows tracking if any images are not visible on the presented document
- Added  `ImageExtractionType` (`FullDocument``Face``Signature`) enum to specify the image type
- Added a new result member, `barcodeStepUsed` to BlinkID recognizers, which indicates whether the barcode scanning step was utilized during the scanning process.
- Added two new settings to BlinkID recognizers:
- `allowBarcodeScanOnly` - allows barcode recognition to proceed even if the initial extraction fails - set to `false` by default
- `combineFrameResults` - enables the aggregation of data from multiple frames - set to `true` by default

## 6.9.0

- We have updated the plugin to [Android SDK v6.9.0](https://github.com/BlinkID/blinkid-android/releases/tag/v6.9.0) and [iOS SDK v6.9.0](https://github.com/BlinkID/blinkid-ios/releases/tag/v6.9.0)
Expand Down
7 changes: 4 additions & 3 deletions initCordovaSampleApp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ cp -f -r ../sample_files/www .
# build app
cordova prepare



# how to run
echo "To run iOS demo application open Xcode project $APP_NAME/platforms/ios/$APP_NAME.xcodeproj, add the NSPhotoLibraryUsageDescription key to Info.plist if DirectAPI will be used; set your development team."
echo "To run iOS demo application:
1. Open Xcode project $APP_NAME/platforms/ios/$APP_NAME.xcodeproj
2. Add the NSPhotoLibraryUsageDescription key to Info.plist if DirectAPI will be used
3. Set your development team."
echo "To run Android demo application, position to $APP_NAME folder and type: cordova run android"
Loading

0 comments on commit 1e0ee6d

Please sign in to comment.