Skip to content

Commit

Permalink
updated files for Anyline 3.22;
Browse files Browse the repository at this point in the history
Fixed OCRConfig.languages loading for iOS;
Updated VIN files and config
  • Loading branch information
Philipp Müller committed Mar 16, 2018
1 parent 3ad3193 commit 00bd1af
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 37 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion example/RNExampleApp/android/app/src/main/assets/vin.ale

Large diffs are not rendered by default.

Binary file not shown.
48 changes: 25 additions & 23 deletions example/RNExampleApp/config/VINConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,20 @@ export default {
'NE9tUzVraWdNUVZLaW8vaWlJS2tIVEVUdUxjYWJEWWtacExZdVR2YnU1S1hIc0R6\n' +
'b1NxUUJTL3ZFS3VYUHhhCjNnanZnS285M3lrSjJKQjVBZjZiSkE9PQo=',
options: {
"captureResolution": "1080p",
"cutout": {
"style": "rect",
"width": 500,
"alignment": "top",
"ratioFromSize": {
"width": 62,
"height": 9
},
"offset": {
"x": 0,
"y": 395
},
"outerColor": "000000",
"outerAlpha": 0.3,
"cornerRadius": 3
"style": "rect",
"maxWidthPercent": "70%",
"alignment": "top_half",
"ratioFromSize": {
"width": 62,
"height": 9
},
"outerColor": "000000",
"outerAlpha": 0.3,
"strokeWidth": 1,
"strokeColor": "FFFFFF",
"cornerRadius": 2,
"feedbackStrokeColor": "0099FF",
},
"flash": {
"mode": "manual",
Expand All @@ -39,18 +37,22 @@ export default {
"imageOff": "ic_flash_off"
},
"visualFeedback": {
"animation": "traverse_multi",
"animationDuration": 250,
"style": "contour_rect",
"strokeWidth": 2,
"strokeColor": "0099FF"
}

"animation": "traverse_multi",
"animationDuration" : 250,
"style": "contour_rect",
"strokeWidth": 2,
"strokeColor": "0099FF"
},
"beepOnResult": false,
"vibrateOnResult": true,
"blinkAnimationOnResult": true,
"cancelOnResult": true,
"reportingEnabled": true
},
ocr: {
"scanMode": "AUTO",
"aleFile": "vin.ale",
"traineddataFiles": ["CNN_vin_det_class_prot2_36_whitelist.any"],
"traineddataFiles": ["vin.any"],
"minConfidence": 0
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
17F5D56E205BDA6E00146C06 /* vin.any in Resources */ = {isa = PBXBuildFile; fileRef = 17A3F24C205AA3CA00EAB23A /* vin.any */; };
2461A0FE4220A12E83C78AAA /* libPods-RNExampleApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA0049A81087564E18C8F99C /* libPods-RNExampleApp.a */; };
5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
7C42F21D20516865002BB8E4 /* vin.ale in Resources */ = {isa = PBXBuildFile; fileRef = 7C42F21620516864002BB8E4 /* vin.ale */; };
7C42F21E20516865002BB8E4 /* anyline_austrian_driving_license.ale in Resources */ = {isa = PBXBuildFile; fileRef = 7C42F21720516864002BB8E4 /* anyline_austrian_driving_license.ale */; };
7C42F21F20516865002BB8E4 /* CNN_vin_det_class_prot2_36_whitelist.any in Resources */ = {isa = PBXBuildFile; fileRef = 7C42F21920516865002BB8E4 /* CNN_vin_det_class_prot2_36_whitelist.any */; };
7C42F22020516865002BB8E4 /* anyline_capitals.traineddata in Resources */ = {isa = PBXBuildFile; fileRef = 7C42F21A20516865002BB8E4 /* anyline_capitals.traineddata */; };
7C42F22120516865002BB8E4 /* deu.traineddata in Resources */ = {isa = PBXBuildFile; fileRef = 7C42F21B20516865002BB8E4 /* deu.traineddata */; };
7C42F22220516865002BB8E4 /* eng_no_dict.traineddata in Resources */ = {isa = PBXBuildFile; fileRef = 7C42F21C20516865002BB8E4 /* eng_no_dict.traineddata */; };
Expand Down Expand Up @@ -306,11 +306,11 @@
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = RNExampleApp/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = RNExampleApp/main.m; sourceTree = "<group>"; };
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
17A3F24C205AA3CA00EAB23A /* vin.any */ = {isa = PBXFileReference; lastKnownFileType = file; path = vin.any; sourceTree = "<group>"; };
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
7C42F21620516864002BB8E4 /* vin.ale */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = vin.ale; sourceTree = "<group>"; };
7C42F21720516864002BB8E4 /* anyline_austrian_driving_license.ale */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = anyline_austrian_driving_license.ale; sourceTree = "<group>"; };
7C42F21920516865002BB8E4 /* CNN_vin_det_class_prot2_36_whitelist.any */ = {isa = PBXFileReference; lastKnownFileType = file; path = CNN_vin_det_class_prot2_36_whitelist.any; sourceTree = "<group>"; };
7C42F21A20516865002BB8E4 /* anyline_capitals.traineddata */ = {isa = PBXFileReference; lastKnownFileType = file; path = anyline_capitals.traineddata; sourceTree = "<group>"; };
7C42F21B20516865002BB8E4 /* deu.traineddata */ = {isa = PBXFileReference; lastKnownFileType = file; path = deu.traineddata; sourceTree = "<group>"; };
7C42F21C20516865002BB8E4 /* eng_no_dict.traineddata */ = {isa = PBXFileReference; lastKnownFileType = file; path = eng_no_dict.traineddata; sourceTree = "<group>"; };
Expand Down Expand Up @@ -488,7 +488,7 @@
7C42F21820516865002BB8E4 /* traineddata */ = {
isa = PBXGroup;
children = (
7C42F21920516865002BB8E4 /* CNN_vin_det_class_prot2_36_whitelist.any */,
17A3F24C205AA3CA00EAB23A /* vin.any */,
7C42F21A20516865002BB8E4 /* anyline_capitals.traineddata */,
7C42F21B20516865002BB8E4 /* deu.traineddata */,
7C42F21C20516865002BB8E4 /* eng_no_dict.traineddata */,
Expand Down Expand Up @@ -937,8 +937,8 @@
files = (
7C42F22120516865002BB8E4 /* deu.traineddata in Resources */,
7C42F21D20516865002BB8E4 /* vin.ale in Resources */,
17F5D56E205BDA6E00146C06 /* vin.any in Resources */,
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
7C42F21F20516865002BB8E4 /* CNN_vin_det_class_prot2_36_whitelist.any in Resources */,
7C42F21E20516865002BB8E4 /* anyline_austrian_driving_license.ale in Resources */,
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
7C42F22020516865002BB8E4 /* anyline_capitals.traineddata in Resources */,
Expand Down
2 changes: 1 addition & 1 deletion example/RNExampleApp/ios/ale/vin.ale

Large diffs are not rendered by default.

Binary file added example/RNExampleApp/ios/traineddata/vin.any
Binary file not shown.
2 changes: 1 addition & 1 deletion plugin/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ repositories {
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'io.anyline:anylinesdk:3.21.0@aar'
compile 'io.anyline:anylinesdk:3.22.0@aar'
compile 'com.google.android.gms:play-services-vision:11.8.0'
compile 'com.android.support:design:25.1.0'
compile "com.facebook.react:react-native:+" // From node_modules
Expand Down
2 changes: 1 addition & 1 deletion plugin/ios/AnylineBarcodeScanViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ - (void)viewDidAppear:(BOOL)animated {
self.label.hidden = NO;


self.moduleView.captureDeviceManager.barcodeDelegate = nil;
[self.moduleView.captureDeviceManager removeBarcodeDelegate:self];
}

#pragma mark - AnylineBarcodeModuleDelegate method
Expand Down
4 changes: 2 additions & 2 deletions plugin/ios/AnylineEnergyScanViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ - (void)viewDidLoad {


[energyModuleView setScanMode:self.scanMode error:nil];
[energyModuleView.captureDeviceManager setBarcodeDelegate:self];
[energyModuleView.captureDeviceManager addBarcodeDelegate:self];

if (self.nativeBarcodeEnabled) {
energyModuleView.captureDeviceManager.barcodeDelegate = self;
[energyModuleView.captureDeviceManager addBarcodeDelegate:self];
}

// Set Serial Number specific configurations
Expand Down
6 changes: 2 additions & 4 deletions plugin/ios/AnylineOCRScanViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,9 @@ - (void)viewDidLoad {
NSMutableArray<NSString *> *languages = [NSMutableArray arrayWithCapacity:tesseractArray.count];
for (NSString *tesseractLang in tesseractArray) {
NSString *ressourcePath = [[NSBundle mainBundle] pathForResource:[[tesseractLang lastPathComponent] stringByDeletingPathExtension] ofType:[[tesseractLang lastPathComponent] pathExtension] inDirectory:[NSString stringWithFormat:@"%@",[tesseractLang stringByDeletingLastPathComponent]]];
NSError *copyError = nil;
[ocrModuleView copyTrainedData:ressourcePath fileHash:nil error:&copyError];
[languages addObject:[[tesseractLang lastPathComponent] stringByDeletingPathExtension]];
[languages addObject:ressourcePath];
}
ocrConf.tesseractLanguages = languages;
ocrConf.languages = languages;
NSError *error = nil;
[ocrModuleView setupWithLicenseKey:self.key delegate:self ocrConfig:ocrConf error:&error];
// if(!success) {
Expand Down

0 comments on commit 00bd1af

Please sign in to comment.