Skip to content

Commit 0f1bf58

Browse files
committed
fix bug
1 parent e37ec68 commit 0f1bf58

35 files changed

+893
-31
lines changed

hello-world/svelte/src/components/VideoCapture.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import "../lib/router"; // import side effects. The license, engineResourcePath, so on.
2+
import "../lib/cvr"; // import side effects. The license, engineResourcePath, so on.
33
import { type DecodedBarcodesResult } from "dynamsoft-barcode-reader";
44
import { CameraEnhancer, CameraView } from "dynamsoft-camera-enhancer";
55
import {

others/debug/public/index.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,7 @@ <h1 style="font-size: 1.5em">Read Barcodes from Camera - Debug</h1>
105105
let ss = await router.getSimplifiedSettings("ReadSingleBarcode");
106106
ss.timeout = 100000;
107107
ss.minImageCaptureInterval = 100;
108-
ss.capturedResultItemTypes =
109-
"barcode" |
110-
Dynamsoft.Core.EnumCapturedResultItemType.CRIT_ORIGINAL_IMAGE;
108+
ss.capturedResultItemTypes |= Dynamsoft.Core.EnumCapturedResultItemType.CRIT_ORIGINAL_IMAGE;
111109
await router.updateSettings("ReadSingleBarcode", ss);
112110

113111
// Define a callback for results.

use-case/dcp/MRZ-templates.json

Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,264 @@
1+
{
2+
"CaptureVisionTemplates": [
3+
{
4+
"Name": "all-mrz",
5+
"ImageROIProcessingNameArray": [
6+
"roi-mrz"
7+
],
8+
"SemanticProcessingNameArray": [
9+
"sp-mrz"
10+
]
11+
},
12+
{
13+
"Name": "passport-mrz",
14+
"ImageROIProcessingNameArray": [
15+
"roi-mrz-passport"
16+
],
17+
"SemanticProcessingNameArray": [
18+
"sp-mrz-passport"
19+
]
20+
},
21+
{
22+
"Name": "visa-mrz",
23+
"ImageROIProcessingNameArray": [
24+
"roi-mrz-visa"
25+
],
26+
"SemanticProcessingNameArray": [
27+
"sp-mrz-visa"
28+
]
29+
},
30+
{
31+
"Name": "id-mrz",
32+
"ImageROIProcessingNameArray": [
33+
"roi-mrz-id"
34+
],
35+
"SemanticProcessingNameArray": [
36+
"sp-mrz-id"
37+
]
38+
}
39+
],
40+
"TargetROIDefOptions": [
41+
{
42+
"Name": "roi-mrz",
43+
"TaskSettingNameArray": [
44+
"task-mrz"
45+
]
46+
},
47+
{
48+
"Name": "roi-mrz-passport",
49+
"TaskSettingNameArray": [
50+
"task-mrz-passport"
51+
]
52+
},
53+
{
54+
"Name": "roi-mrz-visa",
55+
"TaskSettingNameArray": [
56+
"task-mrz-visa"
57+
]
58+
},
59+
{
60+
"Name": "roi-mrz-id",
61+
"TaskSettingNameArray": [
62+
"task-mrz-id"
63+
]
64+
}
65+
],
66+
"TextLineSpecificationOptions": [
67+
{
68+
"Name": "tls-mrz",
69+
"CharacterModelName": "MRZ",
70+
"StringRegExPattern": "([ACI][A-Z<][A-Z<]{3}[A-Z0-9<]{9}[0-9][A-Z0-9<]{15}){(30)}|([0-9]{2}[(01-12)][(01-31)][0-9][MF<][0-9]{2}[(01-12)][(01-31)][0-9][A-Z<]{3}[A-Z0-9<]{11}[0-9]){(30)}|([A-Z<]{30}){(30)}|([ACIV][A-Z<][A-Z<]{3}[A-Z<]{31}){(36)}|([A-Z0-9<]{9}[0-9][A-Z<]{3}[0-9]{2}[(01-12)][(01-31)][0-9][MF<][0-9]{2}[(01-12)][(01-31)][0-9][A-Z0-9<]{8}){(36)}|([PV][A-Z<][A-Z<]{3}[A-Z<]{39}){(44)}|([A-Z0-9<]{9}[0-9][A-Z<]{3}[0-9]{2}[(01-12)][(01-31)][0-9][MF<][0-9]{2}[(01-12)][(01-31)][0-9][A-Z0-9<]{14}[A-Z0-9<]{2}){(44)}",
71+
"StringLengthRange": [
72+
30,
73+
44
74+
],
75+
"CharHeightRange": [
76+
5,
77+
1000,
78+
1
79+
],
80+
"BinarizationModes": [
81+
{
82+
"BlockSizeX": 30,
83+
"BlockSizeY": 30,
84+
"Mode": "BM_LOCAL_BLOCK",
85+
"MorphOperation": "Close"
86+
}
87+
]
88+
},
89+
{
90+
"Name": "tls-mrz-passport",
91+
"StringRegExPattern": "(P[A-Z<][A-Z<]{3}[A-Z<]{39}){(44)}|([A-Z0-9<]{9}[0-9][A-Z<]{3}[0-9]{2}[(01-12)][(01-31)][0-9][MF<][0-9]{2}[(01-12)][(01-31)][0-9][A-Z0-9<]{14}[0-9<][0-9]){(44)}",
92+
"StringLengthRange": [
93+
44,
94+
44
95+
],
96+
"BaseTextLineSpecificationName": "tls-mrz"
97+
},
98+
{
99+
"Name": "tls-mrz-visa",
100+
"StringRegExPattern": "(V[A-Z<][A-Z<]{3}[A-Z<]{31}){(36)}|([A-Z0-9<]{9}[0-9][A-Z<]{3}[0-9]{2}[(01-12)][(01-31)][0-9][MF<][0-9]{2}[(01-12)][(01-31)][0-9][A-Z0-9<]{8}){(36)}|(V[A-Z<][A-Z<]{3}[A-Z<]{39}){(44)}|([A-Z0-9<]{9}[0-9][A-Z<]{3}[0-9]{2}[(01-12)][(01-31)][0-9][MF<][0-9]{2}[(01-12)][(01-31)][0-9][A-Z0-9<]{14}[A-Z0-9<]{2}){(44)}",
101+
"StringLengthRange": [
102+
36,
103+
44
104+
],
105+
"BaseTextLineSpecificationName": "tls-mrz"
106+
},
107+
{
108+
"Name": "tls-mrz-id",
109+
"StringRegExPattern": "([ACI][A-Z<][A-Z<]{3}[A-Z0-9<]{9}[0-9][A-Z0-9<]{15}){(30)}|([0-9]{2}[(01-12)][(01-31)][0-9][MF<][0-9]{2}[(01-12)][(01-31)][0-9][A-Z<]{3}[A-Z0-9<]{11}[0-9]){(30)}|([A-Z<]{30}){(30)}|([ACI][A-Z<][A-Z<]{3}[A-Z<]{31}){(36)}|([A-Z0-9<]{9}[0-9][A-Z<]{3}[0-9]{2}[(01-12)][(01-31)][0-9][MF<][0-9]{2}[(01-12)][(01-31)][0-9][A-Z0-9<]{8}){(36)}",
110+
"StringLengthRange": [
111+
30,
112+
36
113+
],
114+
"BaseTextLineSpecificationName": "tls-mrz"
115+
}
116+
],
117+
"LabelRecognizerTaskSettingOptions": [
118+
{
119+
"Name": "task-mrz",
120+
"TextLineSpecificationNameArray": [
121+
"tls-mrz"
122+
],
123+
"SectionImageParameterArray": [
124+
{
125+
"Section": "ST_REGION_PREDETECTION",
126+
"ImageParameterName": "ip-mrz"
127+
},
128+
{
129+
"Section": "ST_TEXT_LINE_LOCALIZATION",
130+
"ImageParameterName": "ip-mrz"
131+
},
132+
{
133+
"Section": "ST_TEXT_LINE_RECOGNITION",
134+
"ImageParameterName": "ip-mrz"
135+
}
136+
]
137+
},
138+
{
139+
"Name": "task-mrz-passport",
140+
"TextLineSpecificationNameArray": [
141+
"tls-mrz-passport"
142+
],
143+
"BaseLabelRecognizerTaskSettingName": "task-mrz"
144+
},
145+
{
146+
"Name": "task-mrz-visa",
147+
"TextLineSpecificationNameArray": [
148+
"tls-mrz-visa"
149+
],
150+
"BaseLabelRecognizerTaskSettingName": "task-mrz"
151+
},
152+
{
153+
"Name": "task-mrz-id",
154+
"TextLineSpecificationNameArray": [
155+
"tls-mrz-id"
156+
],
157+
"BaseLabelRecognizerTaskSettingName": "task-mrz"
158+
}
159+
],
160+
"CharacterModelOptions": [
161+
{
162+
"DirectoryPath": "",
163+
"Name": "MRZ"
164+
}
165+
],
166+
"ImageParameterOptions": [
167+
{
168+
"Name": "ip-mrz",
169+
"TextureDetectionModes": [
170+
{
171+
"Mode": "TDM_GENERAL_WIDTH_CONCENTRATION",
172+
"Sensitivity": 8
173+
}
174+
],
175+
"TextDetectionMode": {
176+
"Mode": "TTDM_LINE",
177+
"CharHeightRange": [
178+
20,
179+
1000,
180+
1
181+
],
182+
"Sensitivity": 7
183+
}
184+
}
185+
],
186+
"SemanticProcessingOptions": [
187+
{
188+
"Name": "sp-mrz",
189+
"ReferenceObjectFilter": {
190+
"ReferenceTargetROIDefNameArray": [
191+
"roi-mrz"
192+
]
193+
},
194+
"TaskSettingNameArray": [
195+
"dcp-mrz"
196+
]
197+
},
198+
{
199+
"Name": "sp-mrz-passport",
200+
"ReferenceObjectFilter": {
201+
"ReferenceTargetROIDefNameArray": [
202+
"roi-mrz-passport"
203+
]
204+
},
205+
"TaskSettingNameArray": [
206+
"dcp-mrz-passport"
207+
]
208+
},
209+
{
210+
"Name": "sp-mrz-visa",
211+
"ReferenceObjectFilter": {
212+
"ReferenceTargetROIDefNameArray": [
213+
"roi-mrz-visa"
214+
]
215+
},
216+
"TaskSettingNameArray": [
217+
"dcp-mrz-visa"
218+
]
219+
},
220+
{
221+
"Name": "sp-mrz-id",
222+
"ReferenceObjectFilter": {
223+
"ReferenceTargetROIDefNameArray": [
224+
"roi-mrz-id"
225+
]
226+
},
227+
"TaskSettingNameArray": [
228+
"dcp-mrz-id"
229+
]
230+
}
231+
],
232+
"CodeParserTaskSettingOptions": [
233+
{
234+
"Name": "dcp-mrz",
235+
"CodeSpecifications": [
236+
"MRTD_TD3_PASSPORT",
237+
"MRTD_TD2_VISA",
238+
"MRTD_TD3_VISA",
239+
"MRTD_TD1_ID",
240+
"MRTD_TD2_ID"
241+
]
242+
},
243+
{
244+
"Name": "dcp-mrz-passport",
245+
"CodeSpecifications": [
246+
"MRTD_TD3_PASSPORT"
247+
]
248+
},
249+
{
250+
"Name": "dcp-mrz-visa",
251+
"CodeSpecifications": [
252+
"MRTD_TD2_VISA",
253+
"MRTD_TD3_VISA"
254+
]
255+
},
256+
{
257+
"Name": "dcp-mrz-id",
258+
"CodeSpecifications": [
259+
"MRTD_TD1_ID",
260+
"MRTD_TD2_ID"
261+
]
262+
}
263+
]
264+
}

use-case/dcp/dcp.esm.js

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)