barkoder-nativescript 1.3.1 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/barkoder-nativescript.android.ts +6 -0
- package/barkoder-nativescript.common.ts +4 -1
- package/barkoder-nativescript.ios.ts +7 -1
- package/package.json +1 -1
- package/platforms/android/barkoder.aar +0 -0
- package/platforms/ios/Barkoder.xcframework/Info.plist +5 -5
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/Barkoder +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/Headers/iBarkoder.h +103 -14
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/Info.plist +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/default.metallib +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_384x256.mlmodelc/analytics/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_384x256.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_384x256.mlmodelc/metadata.json +85 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_384x256.mlmodelc/model.mil +753 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_384x256.mlmodelc/weights/weight.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_512x384.mlmodelc/analytics/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_512x384.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_512x384.mlmodelc/metadata.json +85 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_512x384.mlmodelc/model.mil +753 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_512x384.mlmodelc/weights/weight.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/mrz.traineddata +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/mrzfast.traineddata +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/Barkoder +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/Headers/iBarkoder.h +103 -14
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/Info.plist +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/_CodeSignature/CodeResources +137 -5
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/default.metallib +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_384x256.mlmodelc/analytics/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_384x256.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_384x256.mlmodelc/metadata.json +85 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_384x256.mlmodelc/model.mil +753 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_384x256.mlmodelc/weights/weight.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_512x384.mlmodelc/analytics/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_512x384.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_512x384.mlmodelc/metadata.json +85 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_512x384.mlmodelc/model.mil +753 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_512x384.mlmodelc/weights/weight.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/mrz.traineddata +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/mrzfast.traineddata +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/Info.plist +5 -5
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/BarkoderSDK +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Headers/BarkoderSDK-Swift.h +3 -2
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Info.plist +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios.abi.json +1059 -340
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +3 -1
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios.swiftinterface +3 -1
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/templates.json +203 -17
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/BarkoderSDK +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Headers/BarkoderSDK-Swift.h +6 -4
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Info.plist +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +1059 -340
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +3 -1
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +3 -1
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +1059 -340
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +3 -1
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +3 -1
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/_CodeSignature/CodeResources +25 -85
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/templates.json +203 -17
- package/typings/ios/objc!Barkoder.d.ts +11 -1
- package/platforms/android/README.md +0 -9
|
@@ -580,6 +580,8 @@ export class BarkoderViewAndroid extends View {
|
|
|
580
580
|
return this.bkdView.config.getDecoderConfig().COOP25.enabled;
|
|
581
581
|
case BarkoderConstants.DecoderType.Dotcode:
|
|
582
582
|
return this.bkdView.config.getDecoderConfig().Dotcode.enabled;
|
|
583
|
+
case BarkoderConstants.DecoderType.IDDocument:
|
|
584
|
+
return this.bkdView.config.getDecoderConfig().IDDocument.enabled;
|
|
583
585
|
}
|
|
584
586
|
}
|
|
585
587
|
|
|
@@ -614,6 +616,7 @@ export class BarkoderViewAndroid extends View {
|
|
|
614
616
|
this.bkdView.config.getDecoderConfig().Datalogic25.enabled = false;
|
|
615
617
|
this.bkdView.config.getDecoderConfig().COOP25.enabled = false;
|
|
616
618
|
this.bkdView.config.getDecoderConfig().Dotcode.enabled = false;
|
|
619
|
+
this.bkdView.config.getDecoderConfig().IDDocument.enabled = false;
|
|
617
620
|
decoders.forEach((dt: BarkoderConstants.DecoderType) => {
|
|
618
621
|
switch (dt) {
|
|
619
622
|
case BarkoderConstants.DecoderType.Aztec:
|
|
@@ -694,6 +697,9 @@ export class BarkoderViewAndroid extends View {
|
|
|
694
697
|
case BarkoderConstants.DecoderType.Dotcode:
|
|
695
698
|
this.bkdView.config.getDecoderConfig().Dotcode.enabled = true;
|
|
696
699
|
break;
|
|
700
|
+
case BarkoderConstants.DecoderType.IDDocument:
|
|
701
|
+
this.bkdView.config.getDecoderConfig().IDDocument.enabled = true;
|
|
702
|
+
break;
|
|
697
703
|
default:
|
|
698
704
|
break;
|
|
699
705
|
}
|
|
@@ -48,7 +48,8 @@ export enum DecoderType {
|
|
|
48
48
|
COOP25 = 24,
|
|
49
49
|
Code32 = 25,
|
|
50
50
|
Telepen = 26,
|
|
51
|
-
Dotcode = 27
|
|
51
|
+
Dotcode = 27,
|
|
52
|
+
IDDocument = 28
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
export enum FormattingType {
|
|
@@ -181,6 +182,7 @@ export class DekoderConfig {
|
|
|
181
182
|
code32?: BarcodeConfig;
|
|
182
183
|
telepen?: BarcodeConfig;
|
|
183
184
|
dotcode?: BarcodeConfig;
|
|
185
|
+
idDocument?: BarcodeConfig;
|
|
184
186
|
general?: GeneralSettings;
|
|
185
187
|
|
|
186
188
|
constructor(config: Partial<DekoderConfig>) {
|
|
@@ -217,6 +219,7 @@ export class DekoderConfig {
|
|
|
217
219
|
'Code 32': this.code32?.toMap(),
|
|
218
220
|
'Telepen': this.telepen?.toMap(),
|
|
219
221
|
'Dotcode': this.dotcode?.toMap(),
|
|
222
|
+
'IDDocument': this.dotcode?.toMap(),
|
|
220
223
|
'general': this.general?.toMap()
|
|
221
224
|
}
|
|
222
225
|
|
|
@@ -3,7 +3,7 @@ import { View } from "@nativescript/core";
|
|
|
3
3
|
import { ios } from "@nativescript/core/application";
|
|
4
4
|
|
|
5
5
|
export class BarkoderViewIOS extends View {
|
|
6
|
-
public bkdView:
|
|
6
|
+
public bkdView: any;
|
|
7
7
|
public licenseKeyProperty: any;
|
|
8
8
|
private _licenseKey: string;
|
|
9
9
|
|
|
@@ -533,6 +533,8 @@ export class BarkoderViewIOS extends View {
|
|
|
533
533
|
return this.bkdView.config.decoderConfig.coop25.enabled;
|
|
534
534
|
case BarkoderConstants.DecoderType.Dotcode:
|
|
535
535
|
return this.bkdView.config.decoderConfig.dotcode.enabled;
|
|
536
|
+
case BarkoderConstants.DecoderType.IDDocument:
|
|
537
|
+
return this.bkdView.config.decoderConfig.idDocument.enabled;
|
|
536
538
|
}
|
|
537
539
|
}
|
|
538
540
|
|
|
@@ -568,6 +570,7 @@ export class BarkoderViewIOS extends View {
|
|
|
568
570
|
this.bkdView.config.decoderConfig.coop25.enabled = false;
|
|
569
571
|
this.bkdView.config.decoderConfig.dotcode.enabled = false;
|
|
570
572
|
this.bkdView.config.decoderConfig.code32.enabled = false;
|
|
573
|
+
this.bkdView.config.decoderConfig.idDocument.enabled = false;
|
|
571
574
|
decoders.forEach((dt: BarkoderConstants.DecoderType) => {
|
|
572
575
|
switch (dt) {
|
|
573
576
|
case BarkoderConstants.DecoderType.Aztec:
|
|
@@ -648,6 +651,9 @@ export class BarkoderViewIOS extends View {
|
|
|
648
651
|
case BarkoderConstants.DecoderType.Dotcode:
|
|
649
652
|
this.bkdView.config.decoderConfig.dotcode.enabled = true;
|
|
650
653
|
break;
|
|
654
|
+
case BarkoderConstants.DecoderType.IDDocument:
|
|
655
|
+
this.bkdView.config.decoderConfig.idDocument.enabled = true;
|
|
656
|
+
break;
|
|
651
657
|
default:
|
|
652
658
|
break;
|
|
653
659
|
}
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -8,32 +8,32 @@
|
|
|
8
8
|
<key>BinaryPath</key>
|
|
9
9
|
<string>Barkoder.framework/Barkoder</string>
|
|
10
10
|
<key>LibraryIdentifier</key>
|
|
11
|
-
<string>ios-
|
|
11
|
+
<string>ios-arm64</string>
|
|
12
12
|
<key>LibraryPath</key>
|
|
13
13
|
<string>Barkoder.framework</string>
|
|
14
14
|
<key>SupportedArchitectures</key>
|
|
15
15
|
<array>
|
|
16
16
|
<string>arm64</string>
|
|
17
|
-
<string>x86_64</string>
|
|
18
17
|
</array>
|
|
19
18
|
<key>SupportedPlatform</key>
|
|
20
19
|
<string>ios</string>
|
|
21
|
-
<key>SupportedPlatformVariant</key>
|
|
22
|
-
<string>simulator</string>
|
|
23
20
|
</dict>
|
|
24
21
|
<dict>
|
|
25
22
|
<key>BinaryPath</key>
|
|
26
23
|
<string>Barkoder.framework/Barkoder</string>
|
|
27
24
|
<key>LibraryIdentifier</key>
|
|
28
|
-
<string>ios-
|
|
25
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
29
26
|
<key>LibraryPath</key>
|
|
30
27
|
<string>Barkoder.framework</string>
|
|
31
28
|
<key>SupportedArchitectures</key>
|
|
32
29
|
<array>
|
|
33
30
|
<string>arm64</string>
|
|
31
|
+
<string>x86_64</string>
|
|
34
32
|
</array>
|
|
35
33
|
<key>SupportedPlatform</key>
|
|
36
34
|
<string>ios</string>
|
|
35
|
+
<key>SupportedPlatformVariant</key>
|
|
36
|
+
<string>simulator</string>
|
|
37
37
|
</dict>
|
|
38
38
|
</array>
|
|
39
39
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
@@ -4,21 +4,36 @@
|
|
|
4
4
|
#import <Foundation/Foundation.h>
|
|
5
5
|
#import <CoreImage/CoreImage.h>
|
|
6
6
|
#import <CoreMedia/CoreMedia.h>
|
|
7
|
+
#if TARGET_OS_IOS
|
|
7
8
|
#import <UIKit/UIKit.h>
|
|
9
|
+
#else
|
|
10
|
+
#endif
|
|
11
|
+
|
|
12
|
+
|
|
8
13
|
|
|
9
14
|
typedef enum {
|
|
10
15
|
GlobalOption_SetMaximumThreads = 0,
|
|
11
16
|
GlobalOption_UseGPU,
|
|
12
17
|
GlobalOption_MulticodeCachingEnabled,
|
|
13
18
|
GlobalOption_MulticodeCachingDuration,
|
|
19
|
+
GlobalOption_LazyInitEnable,
|
|
20
|
+
GlobalOption_RestultLocationPreview,
|
|
21
|
+
GlobalOption_DisableGPUCompletely
|
|
14
22
|
} GlobalOption;
|
|
15
23
|
|
|
16
24
|
typedef enum {
|
|
17
25
|
Fast = 0,
|
|
18
26
|
Normal,
|
|
19
|
-
Slow
|
|
27
|
+
Slow,
|
|
28
|
+
Rigorous
|
|
20
29
|
} DecodingSpeed;
|
|
21
30
|
|
|
31
|
+
typedef enum {
|
|
32
|
+
Grayscale = 0,
|
|
33
|
+
YUV,
|
|
34
|
+
BGRA
|
|
35
|
+
} ColorFormat;
|
|
36
|
+
|
|
22
37
|
typedef enum {
|
|
23
38
|
Aztec,
|
|
24
39
|
AztecCompact,
|
|
@@ -47,7 +62,8 @@ typedef enum {
|
|
|
47
62
|
COOP25,
|
|
48
63
|
Code32,
|
|
49
64
|
Telepen,
|
|
50
|
-
Dotcode
|
|
65
|
+
Dotcode,
|
|
66
|
+
IDDocument
|
|
51
67
|
} DecoderType;
|
|
52
68
|
|
|
53
69
|
|
|
@@ -62,11 +78,13 @@ typedef enum {
|
|
|
62
78
|
// BKImage
|
|
63
79
|
//==========================================================================
|
|
64
80
|
@interface Image : NSObject
|
|
65
|
-
- (id)initWithPixels:(uint8_t *)pixels width: (int) width height: (int) height;
|
|
81
|
+
- (id)initWithPixels:(uint8_t *)pixels width: (int) width height: (int) height colorFormat: (ColorFormat) colorFormat;
|
|
66
82
|
|
|
67
83
|
@property (nonatomic, readwrite) uint8_t* pixels;
|
|
68
84
|
@property (nonatomic, readonly) int width;
|
|
69
85
|
@property (nonatomic, readonly) int height;
|
|
86
|
+
@property (nonatomic, readonly) ColorFormat colorFormat;
|
|
87
|
+
|
|
70
88
|
@end
|
|
71
89
|
|
|
72
90
|
//==========================================================================
|
|
@@ -79,12 +97,19 @@ typedef enum {
|
|
|
79
97
|
- (bool)isLicensed;
|
|
80
98
|
- (NSString *) typeName;
|
|
81
99
|
|
|
100
|
+
typedef enum {
|
|
101
|
+
Checksum_Disabled,
|
|
102
|
+
Checksum_Enabled
|
|
103
|
+
} StandardChecksum;
|
|
104
|
+
|
|
105
|
+
|
|
82
106
|
@property (nonatomic, readwrite) bool enabled;
|
|
83
107
|
@property (nonatomic, readwrite) int expectedCount;
|
|
84
108
|
@property (nonatomic, readonly) int minimumLength;
|
|
85
109
|
@property (nonatomic, readonly) int maximumLength;
|
|
86
110
|
@end
|
|
87
111
|
|
|
112
|
+
|
|
88
113
|
//==========================================================================
|
|
89
114
|
// Code 11 Config
|
|
90
115
|
//==========================================================================
|
|
@@ -104,13 +129,9 @@ typedef enum {
|
|
|
104
129
|
// Code 25 Config
|
|
105
130
|
//==========================================================================
|
|
106
131
|
@interface Code25Config : SpecificConfig
|
|
107
|
-
typedef enum {
|
|
108
|
-
Code25_Checksum_Disabled,
|
|
109
|
-
Code25_Checksum_Enabled
|
|
110
|
-
} Code25Checksum;
|
|
111
132
|
|
|
112
133
|
|
|
113
|
-
@property (nonatomic, readwrite)
|
|
134
|
+
@property (nonatomic, readwrite) StandardChecksum checksum;
|
|
114
135
|
|
|
115
136
|
- (id)initWithDecoderType:(DecoderType)decoderType;
|
|
116
137
|
@end
|
|
@@ -119,7 +140,7 @@ typedef enum {
|
|
|
119
140
|
// IATA 25 Config
|
|
120
141
|
//==========================================================================
|
|
121
142
|
@interface IATA25Config : SpecificConfig
|
|
122
|
-
@property (nonatomic, readwrite)
|
|
143
|
+
@property (nonatomic, readwrite) StandardChecksum checksum;
|
|
123
144
|
- (id)initWithDecoderType:(DecoderType)decoderType;
|
|
124
145
|
@end
|
|
125
146
|
|
|
@@ -127,7 +148,7 @@ typedef enum {
|
|
|
127
148
|
// Matrix 25 Config
|
|
128
149
|
//==========================================================================
|
|
129
150
|
@interface Matrix25Config : SpecificConfig
|
|
130
|
-
@property (nonatomic, readwrite)
|
|
151
|
+
@property (nonatomic, readwrite) StandardChecksum checksum;
|
|
131
152
|
- (id)initWithDecoderType:(DecoderType)decoderType;
|
|
132
153
|
@end
|
|
133
154
|
|
|
@@ -135,7 +156,7 @@ typedef enum {
|
|
|
135
156
|
// Datalogic 25 Config
|
|
136
157
|
//==========================================================================
|
|
137
158
|
@interface Datalogic25Config : SpecificConfig
|
|
138
|
-
@property (nonatomic, readwrite)
|
|
159
|
+
@property (nonatomic, readwrite) StandardChecksum checksum;
|
|
139
160
|
- (id)initWithDecoderType:(DecoderType)decoderType;
|
|
140
161
|
@end
|
|
141
162
|
|
|
@@ -143,7 +164,7 @@ typedef enum {
|
|
|
143
164
|
// COOP 25 Config
|
|
144
165
|
//==========================================================================
|
|
145
166
|
@interface COOP25Config : SpecificConfig
|
|
146
|
-
@property (nonatomic, readwrite)
|
|
167
|
+
@property (nonatomic, readwrite) StandardChecksum checksum;
|
|
147
168
|
- (id)initWithDecoderType:(DecoderType)decoderType;
|
|
148
169
|
@end
|
|
149
170
|
|
|
@@ -152,7 +173,7 @@ typedef enum {
|
|
|
152
173
|
//==========================================================================
|
|
153
174
|
@interface Interleaved25Config : SpecificConfig
|
|
154
175
|
|
|
155
|
-
@property (nonatomic, readwrite)
|
|
176
|
+
@property (nonatomic, readwrite) StandardChecksum checksum;
|
|
156
177
|
|
|
157
178
|
- (id)initWithDecoderType:(DecoderType)decoderType;
|
|
158
179
|
@end
|
|
@@ -327,6 +348,14 @@ typedef enum {
|
|
|
327
348
|
- (id)initWithDecoderType:(DecoderType)decoderType;
|
|
328
349
|
@end
|
|
329
350
|
|
|
351
|
+
//==========================================================================
|
|
352
|
+
// ID Document Config
|
|
353
|
+
//==========================================================================
|
|
354
|
+
@interface IDDocumentConfig : SpecificConfig
|
|
355
|
+
@property (nonatomic, readwrite) StandardChecksum masterChecksum;
|
|
356
|
+
- (id)initWithDecoderType:(DecoderType)decoderType;
|
|
357
|
+
@end
|
|
358
|
+
|
|
330
359
|
//==========================================================================
|
|
331
360
|
// Config
|
|
332
361
|
//==========================================================================
|
|
@@ -396,6 +425,8 @@ typedef enum {
|
|
|
396
425
|
@property (nonatomic, readonly, retain) PDF417MicroConfig* _Nonnull PDF417Micro;
|
|
397
426
|
@property (nonatomic, readonly, retain) DatamatrixConfig* _Nonnull datamatrix;
|
|
398
427
|
|
|
428
|
+
@property (nonatomic, readonly, retain) IDDocumentConfig* _Nonnull idDocument;
|
|
429
|
+
|
|
399
430
|
@property (nonatomic, readwrite) DecodingSpeed decodingSpeed;
|
|
400
431
|
@property (nonatomic, readwrite) NSString * _Nonnull encodingCharacterSet;
|
|
401
432
|
@property (nonatomic, readwrite) Formatting formatting;
|
|
@@ -451,9 +482,45 @@ typedef enum {
|
|
|
451
482
|
BT_COOP25,
|
|
452
483
|
BT_Code32,
|
|
453
484
|
BT_Telepen,
|
|
454
|
-
BT_Dotcode
|
|
485
|
+
BT_Dotcode,
|
|
486
|
+
BT_ID_Document,
|
|
487
|
+
BT_ID_Picture,
|
|
488
|
+
BT_ID_MRZ2,
|
|
489
|
+
BT_ID_MRZ3
|
|
490
|
+
|
|
455
491
|
} BarcodeType;
|
|
456
492
|
|
|
493
|
+
|
|
494
|
+
@interface BKLocation : NSObject {
|
|
495
|
+
CGPoint location[4];
|
|
496
|
+
}
|
|
497
|
+
@property (nonatomic, readwrite, retain) NSString *locationName;
|
|
498
|
+
|
|
499
|
+
-(CGPoint*) getLocationPoints;
|
|
500
|
+
|
|
501
|
+
@end;
|
|
502
|
+
|
|
503
|
+
@interface BKImageDescriptor : NSObject
|
|
504
|
+
|
|
505
|
+
#if TARGET_OS_OSX
|
|
506
|
+
@property (nonatomic, strong) NSImage *image;
|
|
507
|
+
#else
|
|
508
|
+
@property (nonatomic, strong) UIImage *image;
|
|
509
|
+
#endif
|
|
510
|
+
|
|
511
|
+
@property (nonatomic, strong) NSString *name;
|
|
512
|
+
|
|
513
|
+
- (instancetype)initWithImage:(
|
|
514
|
+
|
|
515
|
+
#if TARGET_OS_OSX
|
|
516
|
+
NSImage
|
|
517
|
+
#else
|
|
518
|
+
UIImage
|
|
519
|
+
#endif
|
|
520
|
+
*)image name:(NSString *)name;
|
|
521
|
+
|
|
522
|
+
@end
|
|
523
|
+
|
|
457
524
|
@interface DecoderResult : NSObject {
|
|
458
525
|
CGPoint location[4];
|
|
459
526
|
}
|
|
@@ -464,6 +531,8 @@ typedef enum {
|
|
|
464
531
|
@property (nonatomic, readwrite, retain) NSString* textualData;
|
|
465
532
|
@property (nonatomic, readwrite, retain) NSString* characterSet;
|
|
466
533
|
@property (nonatomic, readwrite, retain) NSDictionary* extra;
|
|
534
|
+
@property (nonatomic, readwrite, retain) NSArray<BKLocation*>* extraLocations;
|
|
535
|
+
@property (nonatomic, readwrite, retain) NSArray<BKImageDescriptor*>* images;
|
|
467
536
|
|
|
468
537
|
-(int)polygonPointCount;
|
|
469
538
|
-(CGPoint)polygonPointAt:(int)index;
|
|
@@ -471,6 +540,9 @@ typedef enum {
|
|
|
471
540
|
-(NSArray<NSString*>*)getAllKeys;
|
|
472
541
|
-(CGPoint)locationAt:(int)index;
|
|
473
542
|
-(CGPoint*) getLocationPoints;
|
|
543
|
+
-(BKLocation *)getLocationFromExtras:(NSString *)locationName;
|
|
544
|
+
-(NSArray *)getLocationsNamesFromExtras;
|
|
545
|
+
|
|
474
546
|
|
|
475
547
|
@end
|
|
476
548
|
|
|
@@ -482,12 +554,29 @@ typedef enum {
|
|
|
482
554
|
+(NSString *) GetLibVersion;
|
|
483
555
|
+(bool) IsStringVINCompliant: (NSString *) VINString checkLevel: (int) checkLevel;
|
|
484
556
|
+(bool) IsDecoderBusy;
|
|
557
|
+
|
|
558
|
+
+(NSArray<DecoderResult*>*)decodeImage:(Config*)config imageRef:(void*)imageRef imageWidth:(int)width imageHeight:(int) height;
|
|
559
|
+
+(NSArray<DecoderResult*>*)decodeImage:(Config*)config imageRef:(void*)imageRef imageWidth:(int)width imageHeight:(int) height colorFormat: (ColorFormat) colorFormat;
|
|
560
|
+
|
|
485
561
|
+(NSArray<DecoderResult*>*)decodeImageInMemory:(Config*)config imagePixels:(uint8_t*)pixels imageWidth:(int)width imageHeight:(int) height;
|
|
562
|
+
+(NSArray<DecoderResult*>*)decodeImageInMemory:(Config*)config imagePixels:(uint8_t*)pixels imageWidth:(int)width imageHeight:(int) height colorFormat: (ColorFormat) colorFormat;
|
|
563
|
+
|
|
486
564
|
+(int) decodeImageAsync:(Config*)config image: (Image*) image callback:(void (^)(NSArray<DecoderResult*>*, Image*)) callback;
|
|
487
565
|
+(int) decodeSampleBufferAsync:(Config*)config sampleBuffer:(CMSampleBufferRef)sampleBuffer callback:(void (^)(NSArray<DecoderResult*>*, CMSampleBufferRef)) callback;
|
|
488
566
|
+ (unsigned char*)CGImageToPixels:(CGImageRef) image;
|
|
489
567
|
+ (CGImageRef) CGImageFromPixels:(const char*)pixels width:(int)width height:(int)height;
|
|
568
|
+
#if TARGET_OS_IOS
|
|
490
569
|
+ (UIImage *) UIImageFromPixels:(uint8_t*)pixels width:(int)width height:(int)height;
|
|
570
|
+
#else
|
|
571
|
+
#endif
|
|
572
|
+
#if TARGET_OS_OSX
|
|
573
|
+
+ (NSImage *)UIImageFromLocation:(NSImage *)source points:(CGPoint[4])points marginPercent:(float)marginPercent;
|
|
574
|
+
#else
|
|
575
|
+
+ (UIImage *)UIImageFromLocation:(UIImage *)source points:(CGPoint[4])points marginPercent:(float)marginPercent;
|
|
576
|
+
#endif
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
|
|
491
580
|
|
|
492
581
|
@end
|
|
493
582
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"shortDescription" : "Ultralytics YOLOv8n-obb model trained on dataset_id.yaml",
|
|
4
|
+
"metadataOutputVersion" : "3.0",
|
|
5
|
+
"outputSchema" : [
|
|
6
|
+
{
|
|
7
|
+
"hasShapeFlexibility" : "0",
|
|
8
|
+
"isOptional" : "0",
|
|
9
|
+
"dataType" : "Float32",
|
|
10
|
+
"formattedType" : "MultiArray (Float32 1 × 13 × 2016)",
|
|
11
|
+
"shortDescription" : "",
|
|
12
|
+
"shape" : "[1, 13, 2016]",
|
|
13
|
+
"name" : "var_1031",
|
|
14
|
+
"type" : "MultiArray"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"version" : "8.2.34",
|
|
18
|
+
"modelParameters" : [
|
|
19
|
+
|
|
20
|
+
],
|
|
21
|
+
"author" : "Ultralytics",
|
|
22
|
+
"specificationVersion" : 6,
|
|
23
|
+
"storagePrecision" : "Float16",
|
|
24
|
+
"license" : "AGPL-3.0 License (https:\/\/ultralytics.com\/license)",
|
|
25
|
+
"mlProgramOperationTypeHistogram" : {
|
|
26
|
+
"Concat" : 21,
|
|
27
|
+
"Silu" : 63,
|
|
28
|
+
"Sin" : 1,
|
|
29
|
+
"Sub" : 3,
|
|
30
|
+
"Transpose" : 1,
|
|
31
|
+
"Cos" : 1,
|
|
32
|
+
"UpsampleNearestNeighbor" : 2,
|
|
33
|
+
"Softmax" : 1,
|
|
34
|
+
"Mul" : 8,
|
|
35
|
+
"Cast" : 2,
|
|
36
|
+
"MaxPool" : 3,
|
|
37
|
+
"Add" : 9,
|
|
38
|
+
"Reshape" : 8,
|
|
39
|
+
"Sigmoid" : 2,
|
|
40
|
+
"Split" : 11,
|
|
41
|
+
"Conv" : 73
|
|
42
|
+
},
|
|
43
|
+
"computePrecision" : "Mixed (Float16, Float32, Int32)",
|
|
44
|
+
"isUpdatable" : "0",
|
|
45
|
+
"availability" : {
|
|
46
|
+
"macOS" : "12.0",
|
|
47
|
+
"tvOS" : "15.0",
|
|
48
|
+
"visionOS" : "1.0",
|
|
49
|
+
"watchOS" : "8.0",
|
|
50
|
+
"iOS" : "15.0",
|
|
51
|
+
"macCatalyst" : "15.0"
|
|
52
|
+
},
|
|
53
|
+
"modelType" : {
|
|
54
|
+
"name" : "MLModelType_mlProgram"
|
|
55
|
+
},
|
|
56
|
+
"inputSchema" : [
|
|
57
|
+
{
|
|
58
|
+
"height" : "256",
|
|
59
|
+
"colorspace" : "RGB",
|
|
60
|
+
"isOptional" : "0",
|
|
61
|
+
"width" : "384",
|
|
62
|
+
"isColor" : "1",
|
|
63
|
+
"formattedType" : "Image (Color 384 × 256)",
|
|
64
|
+
"hasSizeFlexibility" : "0",
|
|
65
|
+
"type" : "Image",
|
|
66
|
+
"shortDescription" : "",
|
|
67
|
+
"name" : "image"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"userDefinedMetadata" : {
|
|
71
|
+
"com.github.apple.coremltools.source" : "torch==2.3.1+cu121",
|
|
72
|
+
"stride" : "32",
|
|
73
|
+
"com.github.apple.coremltools.source_dialect" : "TorchScript",
|
|
74
|
+
"docs" : "https:\/\/docs.ultralytics.com",
|
|
75
|
+
"task" : "obb",
|
|
76
|
+
"com.github.apple.coremltools.version" : "7.2",
|
|
77
|
+
"imgsz" : "[256, 384]",
|
|
78
|
+
"date" : "2024-08-01T09:34:45.251931",
|
|
79
|
+
"batch" : "1",
|
|
80
|
+
"names" : "{0: 'id_mrz_image', 1: 'mrz_2', 2: 'mrz_3', 3: 'id_mrz', 4: 'id_image', 5: 'face', 6: 'vin', 7: 'signature'}"
|
|
81
|
+
},
|
|
82
|
+
"generatedClassName" : "float16_384x256",
|
|
83
|
+
"method" : "predict"
|
|
84
|
+
}
|
|
85
|
+
]
|