Skip to content

Commit

Permalink
Merge pull request #117 from BlinkID/feature/v2.13.0
Browse files Browse the repository at this point in the history
Feature/v2.13.0
  • Loading branch information
juraskrlec authored Oct 20, 2017
2 parents 62da33c + ec4a36f commit 67e0790
Show file tree
Hide file tree
Showing 44 changed files with 950 additions and 132 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
## 2.13.0

- Updates and additions
- added support for scanning front and back side of Polish ID - use `PPPolishIDFrontRecognizerSettings`, `PolishIDBackRecognizerSettings` and `PPPolishIDCombinedRecognizerSettings`
- new document specification presets in `PPDocumentPreset` enum: `PPDocumentPresetId1VerticalCard` and `PPDocumentPresetId2VerticalCard` - use `[PPDocumentSpecification newFromPreset]` method to create document specification for detector
- `PPEudlRecognizer` can return face image from the driver's license
- warning for time limited license keys when using provided activities, custom UI integration or Direct API:
- the goal is to prevent unintentional publishing of application to production with the demo license key that will expire
- warning toast can be disabled by using `showLicenseKeyTimeLimitedWarning` property on `PPUiSettings`
- added `PPMrtdSpecification` and method `setMrtdSpecifications` on `PPMrtdDetectorSettings`
- setting `PPMrtdSpecification` on `PPMrtdDetectorSettings` will return results only for specified MRTD Documents
- `PPMrtdSpecification` can be created using `PPMrtdPreset`: `PPMrtdPresetTd1, PPMrtdPresetTd2, PPMrtdPresetTd3`

- Minor API changes
- `PPDocumentDetectorResult` does not contain information about screen orientation any more

- Improvements in ID scanning performance:
- improved face detection in `DocumentFaceRecognizer`: stable detection is required to prevent returning of blurred images
- improved reading of Malaysian `MyKad` documents:
- improved reading and parsing of address fields: previously recognizer was unable to read some documents because of the expected address format
- improved reading of Malaysian visas and work permits
- better reading of dates on Australian Driver's Licence

## 2.12.0

- Updates and additions
Expand Down
Binary file modified MicroBlink.bundle/Info.plist
Binary file not shown.
Binary file modified MicroBlink.bundle/model_general_blink_ocr.zzip
Binary file not shown.
63 changes: 63 additions & 0 deletions MicroBlink.framework/Headers/PPBaseOcrEngineOptions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
//
// PPBaseOcrEngineOptions.h
// BlinkInputDev
//
// Created by Jura Skrlec on 09/08/2017.
//
//

#import <Foundation/Foundation.h>

#import "PPMicroBlinkDefines.h"

NS_ASSUME_NONNULL_BEGIN

/**
* Options used for OCR process. These options enable you to customize how some OCR parsers work.
* For example, you can set character whitelists, character height, supported fonts etc.
*/
PP_CLASS_AVAILABLE_IOS(6.0)
@interface PPBaseOcrEngineOptions : NSObject

/**
* Minimal height of the line of text given in pixels. All chars smaller than this value will be ignored.
*
* Setting the minimal line height can reduce the noise in OCR results.
*
* Default: 10
*/
@property (nonatomic, assign) NSUInteger minimalLineHeight;

/**
* Maximal height of the line of text given in pixels.
*
* Setting the maximal line height can reduce the noise in OCR results.
*
* Default: 200
*/
@property (nonatomic, assign) NSUInteger maximalLineHeight;

/**
* Maximal chars expected on the image.
*
* Setting this value can speed up the OCR processing because all images with more chars than specified will be ignored
* (becuase in most cases they are noise)
*
* Default: 3000
*/
@property (nonatomic, assign) NSUInteger maxCharsExpected;

/**
* Specifies if the additional image processing which drops the background colors should be performed.
*
* Use this if you have black text on color backgrounds.
* If you have black text on white background, using this is not needed as it slows down processing.
* If you have color text, don't use it at all because color dropout will remove the text.
*
* Default: NO
*/
@property (nonatomic, assign) BOOL colorDropoutEnabled;

@end

NS_ASSUME_NONNULL_END
4 changes: 0 additions & 4 deletions MicroBlink.framework/Headers/PPBlinkBarcodeRecognizers.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
#import "PPPdf417RecognizerSettings.h"
#import "PPPdf417RecognizerResult.h"

// USDL
#import "PPUsdlRecognizerSettings.h"
#import "PPUsdlRecognizerResult.h"

// ZXing
#import "PPZXingRecognizerSettings.h"
#import "PPZXingRecognizerResult.h"
Expand Down
12 changes: 12 additions & 0 deletions MicroBlink.framework/Headers/PPBlinkIDRecognizers.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@
#import "PPMrtdCombinedRecognizerResult.h"
#import "PPMrzFilter.h"

// Poland
#import "PPPolishIDFrontRecognizerSettings.h"
#import "PPPolishIDFrontRecognizerResult.h"
#import "PPPolishIDBackRecognizerSettings.h"
#import "PPPolishIDBackRecognizerResult.h"
#import "PPPolishIDCombinedRecognizerSettings.h"
#import "PPPolishIDCombinedRecognizerResult.h"

// Romania
#import "PPRomanianIDFrontRecognizerSettings.h"
#import "PPRomanianIDFrontRecognizerResult.h"
Expand Down Expand Up @@ -122,6 +130,10 @@
#import "PPSwissPassportRecognizerSettings.h"
#import "PPSwissPassportRecognizerResult.h"

// USDL
#import "PPUsdlRecognizerSettings.h"
#import "PPUsdlRecognizerResult.h"

// Use all recognizers from BlinkInput
#import "PPBlinkInputRecognizers.h"

Expand Down
5 changes: 5 additions & 0 deletions MicroBlink.framework/Headers/PPCoordinatorDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@
*/
- (void)coordinator:(PPCoordinator *)coordinator invalidLicenseKeyWithError:(NSError *)error;

/**
* Called when the we have license key with time restriction
*/
- (void)coordinator:(PPCoordinator *)coordinator isLicenseKeyTimeRestricted:(BOOL)timeRestricted;

/**
* TODO Ugly way of passing UI-related transformation information that should not be here
*/
Expand Down
5 changes: 0 additions & 5 deletions MicroBlink.framework/Headers/PPDocumentDetectorResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ PP_CLASS_AVAILABLE_IOS(6.0)
*/
@property (nonatomic) CGFloat aspectRatio;

/**
* Screen orientation used when detecting the document.
*/
@property (nonatomic) UIInterfaceOrientation screenOrientation;

@end

NS_ASSUME_NONNULL_END
3 changes: 2 additions & 1 deletion MicroBlink.framework/Headers/PPDocumentDetectorSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
#import "PPDetectorSettings.h"

#import "PPDocumentSpecification.h"
#import "PPQuadDetectorSettingsWithSize.h"

NS_ASSUME_NONNULL_BEGIN

/**
* Settings for document detector
*/
PP_CLASS_AVAILABLE_IOS(6.0)
@interface PPDocumentDetectorSettings : PPDetectorSettings
@interface PPDocumentDetectorSettings : PPQuadDetectorSettingsWithSize

/**
* Defines how many times the same document should be detected before the detector
Expand Down
8 changes: 6 additions & 2 deletions MicroBlink.framework/Headers/PPDocumentSpecification.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ typedef NS_ENUM(NSUInteger, PPDocumentPreset) {

/** Preset for detecting A4 documents in landscape */
PPDocumentPresetA4Landscape,

/** Preset for detecting vertical ID1 cards */
PPDocumentPresetId1VerticalCard,

/** Preset for detecting vertical ID1 cards */
PPDocumentPresetId2VerticalCard,
};

/**
Expand All @@ -93,7 +99,6 @@ PP_CLASS_AVAILABLE_IOS(6.0)
* Use this initializer for specifiying a document format.
*
* @param aspectRatio Aspect ratio of the document. Calculated as width / height
* @param decodingInfoArray Decoding info for the document
*
* @return initialized object
*/
Expand Down Expand Up @@ -166,7 +171,6 @@ PP_CLASS_AVAILABLE_IOS(6.0)
*/
@property (nonatomic, assign) PPRange yRange;


/**
* Physical size of document in inches
*/
Expand Down
14 changes: 14 additions & 0 deletions MicroBlink.framework/Headers/PPEudlRecognizerSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ PP_CLASS_AVAILABLE_IOS(6.0)
*/
- (instancetype)initWithEudlCountry:(PPEudlCountry)country NS_DESIGNATED_INITIALIZER;

/**
* Name of the image sent to didOutputMetadata method of scanDelegate object that contains face.
* This image will be sent to scan delegate during recognition process if displaying of face image
* is enabled via displayFaceImage property and receiving of dewarpedImage in MetadataSettings is enabled.
*/
+ (NSString *)ID_FACE;

/**
* Name of the image sent to didOutputMetadata method of scanDelegate object that contains full document.
* This image will be sent to scan delegate during recognition process if displaying of full document image
Expand Down Expand Up @@ -68,6 +75,13 @@ PP_CLASS_AVAILABLE_IOS(6.0)
*/
@property (nonatomic, assign) BOOL showFullDocument;

/**
* If YES, face image of the document will be dewarped and returned via the API.
*
* Default: NO.
*/
@property (nonatomic, assign) BOOL showFaceImage;

/**
* Country of scanning Eudl. The default value of PPEudlCountryAny will scan all supported driver's licenses.
*
Expand Down
30 changes: 30 additions & 0 deletions MicroBlink.framework/Headers/PPGlareStatusOverlaySubview.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//
// PPGlareStatusOverlaySubview.h
// MicroBlinkDev
//
// Created by Jura Skrlec on 14/09/2017.
//
//

#import "PPOverlaySubview.h"

NS_ASSUME_NONNULL_BEGIN

/**
* Overlay subview presenting the status of glare detection.
* The subview is presented as translucent view with detection status label in the center of ID Card View Finder View
*/
PP_CLASS_AVAILABLE_IOS(6.0)
@interface PPGlareStatusOverlaySubview : PPOverlaySubview

@property (nonatomic) UILabel *label;

- (instancetype)init NS_UNAVAILABLE;

- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE;

- (instancetype)initWithFrame:(CGRect)frame NS_DESIGNATED_INITIALIZER;

@end

NS_ASSUME_NONNULL_END
6 changes: 6 additions & 0 deletions MicroBlink.framework/Headers/PPIDCardOverlayViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#import "PPModernBaseOverlayViewController.h"

#import "PPIdCardOverlaySubview.h"
#import "PPGlareStatusOverlaySubview.h"

/**
* Default overlay when using ID card recognizers.
Expand All @@ -25,4 +26,9 @@ PP_CLASS_AVAILABLE_IOS(6.0)
*/
@property (nonatomic) PPIdCardOverlaySubview *idCardSubview;

/**
* Subview which shows the glare status view - the status label of glare detection if it's there
*/
@property (nonatomic) PPGlareStatusOverlaySubview *glareStatusSubview;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,5 @@ PP_CLASS_AVAILABLE_IOS(6.0)
*/
@property (nonatomic, assign) BOOL encodeFullDocumentPhoto;

/**
* Defines if glare detection should be turned on/off for front and back side of generic ID
*
* Default: YES
*/
@property (nonatomic, assign) BOOL detectGlare;


@end
NS_ASSUME_NONNULL_END
13 changes: 11 additions & 2 deletions MicroBlink.framework/Headers/PPMrtdDetectorSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
// Copyright © 2015 MicroBlink Ltd. All rights reserved.
//

#import "PPQuadDetectorSettings.h"
#import "PPQuadDetectorSettingsWithSize.h"
#import "PPMrtdSpecification.h"

NS_ASSUME_NONNULL_BEGIN

/**
* Class used for detection of MRTD documents
*/
PP_CLASS_AVAILABLE_IOS(6.0)
@interface PPMrtdDetectorSettings : PPQuadDetectorSettings
@interface PPMrtdDetectorSettings : PPQuadDetectorSettingsWithSize

/**
* Initializes MRTD Detector settings with decoding information array
Expand Down Expand Up @@ -50,6 +51,14 @@ PP_CLASS_AVAILABLE_IOS(6.0)
*/
@property (nonatomic) BOOL detectFullDocument;

/**
* Sets the mrtd specifications. Mrtd specifications describe the images that should be returned by
* the detector.
*
* @param mrtdSpecifications mrtd specifications
*/
- (void)setMrtdSpecifications:(NSArray<__kindof PPMrtdSpecification *> *)mrtdSpecifications;

@end

NS_ASSUME_NONNULL_END
Loading

0 comments on commit 67e0790

Please sign in to comment.