Skip to content

Commit

Permalink
Merge pull request #221 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 a030b88 + 193b2f7 commit e4776ec
Show file tree
Hide file tree
Showing 17 changed files with 359 additions and 221 deletions.
2 changes: 1 addition & 1 deletion BlinkID/blinkid-react-native.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Pod::Spec.new do |s|
s.header_dir = "blinkid-react-native"

s.dependency 'React'
s.dependency 'PPBlinkID', '~> 6.9.0'
s.dependency 'PPBlinkID', '~> 6.10.1'

s.frameworks = 'UIKit'
end
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-react-native",
"version": "6.9.0",
"version": "6.10.0",
"description": "A small and powerful ID card scanning library. Powered by Microblink (www.microblink.com).",
"main": "index.js",
"repository": {
Expand Down
29 changes: 29 additions & 0 deletions BlinkID/recognizers/blinkIdMultiSideRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@ export class BlinkIdMultiSideRecognizerResult extends RecognizerResult {
*/
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 @@ -364,6 +374,16 @@ export class BlinkIdMultiSideRecognizer extends Recognizer {
*/
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 @@ -402,6 +422,15 @@ export class BlinkIdMultiSideRecognizer extends Recognizer {
*/
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
29 changes: 29 additions & 0 deletions BlinkID/recognizers/blinkIdSingleSideRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ export class BlinkIdSingleSideRecognizerResult extends RecognizerResult {
*/
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 @@ -310,6 +320,16 @@ export class BlinkIdSingleSideRecognizer extends Recognizer {
*/
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 @@ -340,6 +360,15 @@ export class BlinkIdSingleSideRecognizer extends Recognizer {
*/
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
2 changes: 1 addition & 1 deletion BlinkID/src/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ android {

dependencies {
implementation 'com.facebook.react:react-native:+'
implementation('com.microblink:blinkid:6.9.0@aar') {
implementation('com.microblink:blinkid:6.10.0@aar') {
transitive = true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,14 @@ public static WritableMap serializeAdditionalProcessingInfo(AdditionalProcessing
for (int i = 0; i < additionalProcessingInfo.getExtraPresentFields().length; ++i) {
extraPresentFieldsArr.pushInt(SerializationUtils.serializeEnum(additionalProcessingInfo.getExtraPresentFields()[i]));
}
WritableArray imageExtractionFailuresArr = new WritableNativeArray();
for (int i = 0; i < additionalProcessingInfo.getImageExtractionFailures().length; ++i) {
imageExtractionFailuresArr.pushInt(SerializationUtils.serializeEnum(additionalProcessingInfo.getImageExtractionFailures()[i]));
}
jsonAdditionalProcessingInfo.putArray("missingMandatoryFields", missingMandatoryFieldsArr);
jsonAdditionalProcessingInfo.putArray("invalidCharacterFields", invalidCharacterFieldsArr);
jsonAdditionalProcessingInfo.putArray("extraPresentFields", extraPresentFieldsArr);
jsonAdditionalProcessingInfo.putArray("imageExtractionFailures", imageExtractionFailuresArr);
return jsonAdditionalProcessingInfo;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public Recognizer<?> createRecognizer(ReadableMap jsonMap) {
if (jsonMap.hasKey("additionalAnonymization")) {
recognizer.setAdditionalAnonymization(BlinkIDSerializationUtils.deserializeClassAnonymizationSettings(jsonMap.getArray("additionalAnonymization")));
}
if (jsonMap.hasKey("allowBarcodeScanOnly")) {
recognizer.setAllowBarcodeScanOnly(jsonMap.getBoolean("allowBarcodeScanOnly"));
}
if (jsonMap.hasKey("allowUncertainFrontSideScan")) {
recognizer.setAllowUncertainFrontSideScan(jsonMap.getBoolean("allowUncertainFrontSideScan"));
}
Expand All @@ -29,6 +32,9 @@ public Recognizer<?> createRecognizer(ReadableMap jsonMap) {
if (jsonMap.hasKey("blurStrictnessLevel")) {
recognizer.setBlurStrictnessLevel(com.microblink.blinkid.entities.recognizers.blinkid.generic.imageanalysis.StrictnessLevel.values()[jsonMap.getInt("blurStrictnessLevel")]);
}
if (jsonMap.hasKey("combineFrameResults")) {
recognizer.setCombineFrameResults(jsonMap.getBoolean("combineFrameResults"));
}
if (jsonMap.hasKey("customClassRules")) {
recognizer.setCustomClassRules(BlinkIDSerializationUtils.deserializeCustomClassRules(jsonMap.getArray("customClassRules")));
}
Expand Down Expand Up @@ -103,6 +109,7 @@ public WritableMap serializeResult(Recognizer<?> recognizer) {
jsonResult.putMap("backVizResult", BlinkIDSerializationUtils.serializeVizResult(result.getBackVizResult()));
jsonResult.putString("barcodeCameraFrame", SerializationUtils.encodeImageBase64(result.getBarcodeCameraFrame()));
jsonResult.putMap("barcodeResult", BlinkIDSerializationUtils.serializeBarcodeResult(result.getBarcodeResult()));
jsonResult.putBoolean("barcodeStepUsed", result.isBarcodeStepUsed());
jsonResult.putMap("bloodType", BlinkIDSerializationUtils.serializeStringResult(result.getBloodType()));
jsonResult.putMap("classInfo", BlinkIDSerializationUtils.serializeClassInfo(result.getClassInfo()));
jsonResult.putMap("dataMatch", BlinkIDSerializationUtils.serializeDataMatchResult(result.getDataMatch()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public Recognizer<?> createRecognizer(ReadableMap jsonMap) {
if (jsonMap.hasKey("additionalAnonymization")) {
recognizer.setAdditionalAnonymization(BlinkIDSerializationUtils.deserializeClassAnonymizationSettings(jsonMap.getArray("additionalAnonymization")));
}
if (jsonMap.hasKey("allowBarcodeScanOnly")) {
recognizer.setAllowBarcodeScanOnly(jsonMap.getBoolean("allowBarcodeScanOnly"));
}
if (jsonMap.hasKey("allowUnparsedMrzResults")) {
recognizer.setAllowUnparsedMrzResults(jsonMap.getBoolean("allowUnparsedMrzResults"));
}
Expand All @@ -26,6 +29,9 @@ public Recognizer<?> createRecognizer(ReadableMap jsonMap) {
if (jsonMap.hasKey("blurStrictnessLevel")) {
recognizer.setBlurStrictnessLevel(com.microblink.blinkid.entities.recognizers.blinkid.generic.imageanalysis.StrictnessLevel.values()[jsonMap.getInt("blurStrictnessLevel")]);
}
if (jsonMap.hasKey("combineFrameResults")) {
recognizer.setCombineFrameResults(jsonMap.getBoolean("combineFrameResults"));
}
if (jsonMap.hasKey("customClassRules")) {
recognizer.setCustomClassRules(BlinkIDSerializationUtils.deserializeCustomClassRules(jsonMap.getArray("customClassRules")));
}
Expand Down Expand Up @@ -90,6 +96,7 @@ public WritableMap serializeResult(Recognizer<?> recognizer) {
jsonResult.putInt("age", result.getAge());
jsonResult.putString("barcodeCameraFrame", SerializationUtils.encodeImageBase64(result.getBarcodeCameraFrame()));
jsonResult.putMap("barcodeResult", BlinkIDSerializationUtils.serializeBarcodeResult(result.getBarcodeResult()));
jsonResult.putBoolean("barcodeStepUsed", result.isBarcodeStepUsed());
jsonResult.putMap("bloodType", BlinkIDSerializationUtils.serializeStringResult(result.getBloodType()));
jsonResult.putString("cameraFrame", SerializationUtils.encodeImageBase64(result.getCameraFrame()));
jsonResult.putMap("classInfo", BlinkIDSerializationUtils.serializeClassInfo(result.getClassInfo()));
Expand Down
Loading

0 comments on commit e4776ec

Please sign in to comment.