Skip to content

Commit

Permalink
Merge pull request #136 from BlinkID/release/5.1.0
Browse files Browse the repository at this point in the history
Release/5.1.0
  • Loading branch information
i1E authored Dec 18, 2019
2 parents 1350c30 + 8c423ba commit 60fd081
Show file tree
Hide file tree
Showing 23 changed files with 533 additions and 340 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', '~> 5.0.0'
s.dependency 'PPBlinkID', '~> 5.1.0'

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": "5.0.0",
"version": "5.1.0",
"description": "A small and powerful ID card scanning library. Powered by Microblink (www.microblink.com).",
"main": "index.js",
"repository": {
Expand Down
45 changes: 33 additions & 12 deletions BlinkID/recognizers/blinkIdCombinedRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class BlinkIdCombinedRecognizerResult extends RecognizerResult {
super(nativeResult.resultState);

/**
* The additional name information of the document owner.
* The additional address information of the document owner.
*/
this.additionalAddressInformation = nativeResult.additionalAddressInformation;

Expand Down Expand Up @@ -59,7 +59,10 @@ export class BlinkIdCombinedRecognizerResult extends RecognizerResult {
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;

Expand All @@ -79,7 +82,7 @@ export class BlinkIdCombinedRecognizerResult extends RecognizerResult {
this.employer = nativeResult.employer;

/**
* Face image from the document
* face image from the document if enabled with returnFaceImage property.
*/
this.faceImage = nativeResult.faceImage;

Expand All @@ -89,12 +92,12 @@ export class BlinkIdCombinedRecognizerResult extends RecognizerResult {
this.firstName = nativeResult.firstName;

/**
* 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;

Expand All @@ -119,7 +122,7 @@ export class BlinkIdCombinedRecognizerResult extends RecognizerResult {
this.maritalStatus = nativeResult.maritalStatus;

/**
* 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;

Expand Down Expand Up @@ -159,7 +162,8 @@ export class BlinkIdCombinedRecognizerResult extends RecognizerResult {
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;

Expand All @@ -172,34 +176,51 @@ export class BlinkIdCombinedRecognizerResult extends RecognizerResult {
}

/**
* 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.
*/
export class BlinkIdCombinedRecognizer extends Recognizer {
constructor() {
super('BlinkIdCombinedRecognizer');

/**
* Defines whether blured frames filtering is allowed
*/
this.allowBlurFilter = 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;

Expand Down
35 changes: 26 additions & 9 deletions BlinkID/recognizers/blinkIdRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class BlinkIdRecognizerResult extends RecognizerResult {
super(nativeResult.resultState);

/**
* The additional name information of the document owner.
* The additional address information of the document owner.
*/
this.additionalAddressInformation = nativeResult.additionalAddressInformation;

Expand Down Expand Up @@ -74,7 +74,7 @@ export class BlinkIdRecognizerResult extends RecognizerResult {
this.employer = nativeResult.employer;

/**
* Face image from the document
* face image from the document if enabled with returnFaceImage property.
*/
this.faceImage = nativeResult.faceImage;

Expand All @@ -84,7 +84,7 @@ export class BlinkIdRecognizerResult extends RecognizerResult {
this.firstName = nativeResult.firstName;

/**
* Image of the full document
* full document image if enabled with returnFullDocumentImage property.
*/
this.fullDocumentImage = nativeResult.fullDocumentImage;

Expand All @@ -109,7 +109,7 @@ export class BlinkIdRecognizerResult extends RecognizerResult {
this.maritalStatus = nativeResult.maritalStatus;

/**
* 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;

Expand Down Expand Up @@ -157,34 +157,51 @@ export class BlinkIdRecognizerResult extends RecognizerResult {
}

/**
* Generic BlinkID recognizer.
* The Blink ID Recognizer is used for scanning Blink ID.
*/
export class BlinkIdRecognizer extends Recognizer {
constructor() {
super('BlinkIdRecognizer');

/**
* Defines whether blured frames filtering is allowed
*/
this.allowBlurFilter = 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;

Expand Down
46 changes: 34 additions & 12 deletions BlinkID/recognizers/documentFaceRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,67 +19,89 @@ export class DocumentFaceRecognizerResult extends RecognizerResult {
super(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;

}
}

/**
* 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.
*/
export class DocumentFaceRecognizer extends Recognizer {
constructor() {
super('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;

Expand Down
Loading

0 comments on commit 60fd081

Please sign in to comment.