Skip to content

Commit 2e5665b

Browse files
Merge pull request #70 from dynamsoft-docs/preview
update to internal commit 2b6f85db
2 parents fcdebe0 + a53d01b commit 2e5665b

File tree

9 files changed

+257
-29
lines changed

9 files changed

+257
-29
lines changed

_includes/sidelist-programming/programming-js.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -932,11 +932,12 @@
932932
<ul>
933933
<li lang="android"><a href="{{ site.code_types }}" class="otherLinkColour">Supported Code Types</a>
934934
<ul>
935-
<li lang="android"><a href="{{ site.code_types }}mrtd.html" class="otherLinkColour">Machine Readable Travel Documents</a></li>
936-
<li lang="android"><a href="{{ site.code_types }}aamva-dl-id.html" class="otherLinkColour">North America DL/ID</a></li>
937-
<li lang="android"><a href="{{ site.code_types }}za-dl.html" class="otherLinkColour">South Africa Driver License</a></li>
938-
<li lang="android"><a href="{{ site.code_types }}aadhaar.html" class="otherLinkColour">Aadhaar</a></li>
939-
<li lang="android"><a href="{{ site.code_types }}vin.html" class="otherLinkColour">Vehicle Identification Number</a></li>
935+
<li><a href="{{ site.code_types }}mrtd.html" class="otherLinkColour">Machine Readable Travel Documents</a></li>
936+
<li><a href="{{ site.code_types }}aamva-dl-id.html" class="otherLinkColour">North America DL/ID</a></li>
937+
<li><a href="{{ site.code_types }}za-dl.html" class="otherLinkColour">South Africa Driver License</a></li>
938+
<li><a href="{{ site.code_types }}aadhaar.html" class="otherLinkColour">Aadhaar</a></li>
939+
<li><a href="{{ site.code_types }}vin.html" class="otherLinkColour">Vehicle Identification Number</a></li>
940+
<li><a href="{{ site.code_types }}gs1-ai.html" class="otherLinkColour">GS1 Application Identifiers (AI)</a></li>
940941
</ul>
941942
</li>
942943
<li>

_includes/sidelist-programming/sidelist-parameters.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,9 @@
438438
<li><a href="{{ site.dcvb_parameters }}barcode-format-specification/enable-addon-code.html" class="otherLinkColour">EnableAddOnCode</a></li>
439439
<li><a href="{{ site.dcvb_parameters }}barcode-format-specification/enable-data-matrix-ecc000-140.html" class="otherLinkColour">EnableDataMatrixECC000-140</a></li>
440440
<li><a href="{{ site.dcvb_parameters }}barcode-format-specification/enable-qr-code-model-1.html" class="otherLinkColour">EnableQRCodeModel1</a></li>
441+
<li><a href="{{ site.dcvb_parameters }}barcode-format-specification/expected-barcodes-count.html" class="otherLinkColour">ExpectedBarcodesCount</a></li>
441442
<li><a href="{{ site.dcvb_parameters }}barcode-format-specification/find-uneven-module-barcode.html" class="otherLinkColour">FindUnevenModuleBarcode</a></li>
443+
<li><a href="{{ site.dcvb_parameters }}barcode-format-specification/has-vertical-quietzone.html" class="otherLinkColour">HasVerticalQuietZone</a></li>
442444
<li><a href="{{ site.dcvb_parameters }}barcode-format-specification/head-module-ratio.html" class="otherLinkColour">HeadModuleRatio</a></li>
443445
<li><a href="{{ site.dcvb_parameters }}barcode-format-specification/include-implied-ai01.html" class="otherLinkColour">IncludeImpliedAI01</a></li>
444446
<li><a href="{{ site.dcvb_parameters }}barcode-format-specification/include-trailing-check-digit.html" class="otherLinkColour">IncludeTrailingCheckDigit</a></li>
@@ -497,7 +499,8 @@
497499
</li>
498500
<li><a href="{{ site.dcvb_parameter_file }}auxiliary/global-parameter.html" class="otherLinkColour">Global Parameter</a>
499501
<ul>
500-
<li><a href="{{ site.dcvb_parameters }}global-parameter/max-total-image-dimension.html" class="otherLinkColour">MaxTotalImageDimension</a></li>
502+
<li><a href="{{ site.dcvb_parameters_file }}auxiliary/global-parameter.html#maxtotalimagedimension" class="otherLinkColour">MaxTotalImageDimension</a></li>
503+
<li><a href="{{ site.dcvb_parameters_file }}auxiliary/global-parameter.html#intraopnumthreads" class="otherLinkColour">IntraOpNumThreads</a></li>
501504
</ul>
502505
</li>
503506
<li><a href="{{ site.dcvb_parameter_file }}semantic-processing/index.html" class="otherLinkColour">SemanticProcessing Object</a>

programming/javascript/api-reference/capture-vision-router/auxiliary.md

Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ breadcrumbText: CVR JavaScript CaptureVisionRouter
1414
| Name | Description |
1515
| -------------------------------------------- | ------------------------------------------------------------------------ |
1616
| [maxImageSideLength](#maximagesidelength) | Limits the maximum pixel value of the longest side of an image during the processing workflow. |
17-
| [appendModelBuffer()](#appendmodelbuffer) | Loads a specific data file containing recognition information. |
17+
| [appendDLModelBuffer()](#appenddlmodelbuffer) | Loads a specific data file containing recognition information. |
1818
| [onDataLoadProgressChanged](#ondataloadprogresschanged) | An event that fires during the loading of a recognition data file (.data). |
1919
| [onCaptureError](#oncaptureerror) | An event that fires when an error occurs from the start of capturing process. |
20+
| `static`[setGlobalIntraOpNumThreads](#setglobalintraopnumthreads) | Sets the global number of threads used internally for model execution. |
21+
| `static`[clearDLModelBuffers](#cleardlmodelbuffers) | Clears all deep learning models from buffer to free up memory. |
2022

2123
## maxImageSideLength
2224

@@ -28,14 +30,14 @@ The `maxImageSideLength` property limits the maximum pixel value of the longest
2830
maxImageSideLength: number;
2931
```
3032

31-
## appendModelBuffer
33+
## appendDLModelBuffer
3234

3335
Loads a specific data file containing recognition information. This file typically comprises a Convolutional Neural Networks (CNN) model.
3436

3537
**Syntax**
3638

3739
```typescript
38-
static appendModelBuffer(dataName: string, dataPath?: string) : Promise<void>;
40+
static appendDLModelBuffer(dataName: string, dataPath?: string) : Promise<void>;
3941
```
4042

4143
**Parameter**
@@ -51,7 +53,7 @@ None.
5153
**Code snippet**
5254

5355
```javascript
54-
CaptureVisionRouter.appendModelBuffer("sample-model.data")
56+
CaptureVisionRouter.appendDLModelBuffer("sample-model.data")
5557
.then(() => {
5658
console.log("Model appended successfully.");
5759
})
@@ -60,6 +62,10 @@ CaptureVisionRouter.appendModelBuffer("sample-model.data")
6062
});
6163
```
6264

65+
**Remarks**
66+
67+
This method was renamed from `appendModelBuffer()` in Dynamsoft Barcode Reader Bundle version 11.2.2000 and Dynamsoft Capture Vision Bundle version 3.2.1000.
68+
6369
## onDataLoadProgressChanged
6470

6571
An event that fires during the loading of a recognition data file (.data).
@@ -122,4 +128,48 @@ CaptureVisionRouter.onCaptureError = function(error) {
122128
// You can also show an alert or update the UI
123129
alert("An error occurred during capture: " + error.message);
124130
};
125-
```
131+
```
132+
133+
## setGlobalIntraOpNumThreads
134+
135+
Sets the global number of threads used internally for model execution.
136+
137+
**Syntax**
138+
139+
```typescript
140+
static setGlobalIntraOpNumThreads(intraOpNumThreads?: number): Promise<void>;
141+
```
142+
143+
**Parameter**
144+
145+
`intraOpNumThreads`(optional) : Number of threads used internally for model execution.
146+
147+
**Code snippet**
148+
149+
```javascript
150+
await CaptureVisionRouter.setGlobalIntraOpNumThreads(4);
151+
```
152+
153+
**Remarks**
154+
155+
Introduced in Dynamsoft Barcode Reader Bundle version 11.2.2000 and Dynamsoft Capture Vision Bundle version 3.2.1000.
156+
157+
## clearDLModelBuffers
158+
159+
Clears all deep learning models from buffer to free up memory.
160+
161+
**Syntax**
162+
163+
```typescript
164+
static clearDLModelBuffers(): Promise<void>;
165+
```
166+
167+
**Code snippet**
168+
169+
```javascript
170+
await CaptureVisionRouter.clearDLModelBuffers();
171+
```
172+
173+
**Remarks**
174+
175+
Introduced in Dynamsoft Barcode Reader Bundle version 11.2.2000 and Dynamsoft Capture Vision Bundle version 3.2.1000.

programming/javascript/api-reference/capture-vision-router/settings.md

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ breadcrumbText: CVR JavaScript CaptureVisionRouter
1111

1212
# CaptureVisionRouter Settings
1313

14-
| Name | Description |
15-
| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
16-
| [initSettings()](#initsettings) | Configures runtime settings using a provided JSON string, an object, or a URL pointing to an object, which contains settings for one or more `CaptureVisionTemplates`. |
17-
| [outputSettings()](#outputsettings) | Outputs a `CaptureVisionTemplate` specified by its name. |
18-
| [outputSettingsToFile](#outputsettingstofile) | Generates a Blob object or initiates a JSON file download containing the settings for the specified `CaptureVisionTemplate`. |
19-
| [getSimplifiedSettings()](#getsimplifiedsettings) | Retrieves a JSON object that contains simplified settings for the specified `CaptureVisionTemplate`. |
20-
| [getTemplateNames()](#gettemplatenames) | Retrieves the names of all the currently available templates. |
21-
| [updateSettings()](#updatesettings) | Updates the specified `CaptureVisionTemplate` with an updated `SimplifiedCaptureVisionSettings` object. |
22-
| [resetSettings()](#resetsettings) | Restores all runtime settings to their original default values. |
14+
| Name | Description |
15+
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
16+
| [initSettings()](#initsettings) | Configures runtime settings using a provided JSON string, an object, or a URL pointing to an object, which contains settings for one or more `CaptureVisionTemplates`. |
17+
| [outputSettings()](#outputsettings) | Outputs a `CaptureVisionTemplate` specified by its name. |
18+
| [outputSettingsToFile](#outputsettingstofile) | Generates a Blob object or initiates a JSON file download containing the settings for the specified `CaptureVisionTemplate`. |
19+
| [getSimplifiedSettings()](#getsimplifiedsettings) | Retrieves a JSON object that contains simplified settings for the specified `CaptureVisionTemplate`. |
20+
| [getTemplateNames()](#gettemplatenames) | Retrieves the names of all the currently available templates. |
21+
| [updateSettings()](#updatesettings) | Updates the specified `CaptureVisionTemplate` with an updated `SimplifiedCaptureVisionSettings` object. |
22+
| [resetSettings()](#resetsettings) | Restores all runtime settings to their original default values. |
23+
| [switchCapturingTemplate()](#switchcapturingtemplate) | Switches the currently active capturing template during the image processing workflow. |
2324

2425

2526
## initSettings
@@ -235,3 +236,34 @@ A promise that resolves when the operation has completed. It provides an object
235236
let router = await Dynamsoft.CVR.CaptureVisionRouter.createInstance();
236237
await router.resetSettings();
237238
```
239+
240+
## switchCapturingTemplate
241+
242+
Switches the currently active capturing template during the image processing workflow. This allows dynamic reconfiguration of the capture process without restarting or reinitializing the system, enabling different settings or rules to be applied on the fly.
243+
244+
**Syntax**
245+
246+
```typescript
247+
switchCapturingTemplate(templateName: string): Promise<void>;
248+
```
249+
250+
**Parameters**
251+
252+
`templateName`: The name of the new capturing template to apply.
253+
254+
**Return Value**
255+
256+
A promise that resolves when the operation has completed.
257+
258+
**Code snippet**
259+
260+
```javascript
261+
let router = await Dynamsoft.CVR.CaptureVisionRouter.createInstance();
262+
await router.startCapturing("ReadSingleBarcode");
263+
// Switching to ReadRateFirst template
264+
await router.switchCapturingTemplate("ReadBarcodes_ReadRateFirst");
265+
```
266+
267+
**Remarks**
268+
269+
Introduced in Dynamsoft Barcode Reader Bundle version 11.2.2000 and Dynamsoft Capture Vision Bundle version 3.2.1000.

programming/javascript/api-reference/core/basic-structures/original-image-result-item.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,48 @@ The `OriginalImageResultItem` interface extends the [CapturedResultItem](./captu
1515
```typescript
1616
interface OriginalImageResultItem extends CapturedResultItem {
1717
readonly imageData: DSImageData;
18+
toCanvas: () => HTMLCanvasElement;
19+
toImage: (MIMEType: "image/png" | "image/jpeg") => HTMLImageElement;
20+
toBlob: (MIMEType: "image/png" | "image/jpeg") => Promise<Blob>;
1821
}
1922
```
2023

2124
## imageData
2225

2326
The image data associated with this result item.
27+
28+
## toCanvas
29+
30+
Converts the image data into an HTMLCanvasElement for display or further manipulation in web applications.
31+
32+
**See Also**
33+
34+
[HTMLCanvasElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement)
35+
36+
**Remarks**
37+
38+
Introduced in Dynamsoft Barcode Reader Bundle version 11.2.2000 and Dynamsoft Capture Vision Bundle version 3.2.1000.
39+
40+
## toImage
41+
42+
Converts the image data into an HTMLImageElement of a specified MIME type ('image/png' or 'image/jpeg').
43+
44+
**See Also**
45+
46+
[HTMLImageElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement)
47+
48+
**Remarks**
49+
50+
Introduced in Dynamsoft Barcode Reader Bundle version 11.2.2000 and Dynamsoft Capture Vision Bundle version 3.2.1000.
51+
52+
## toBlob
53+
54+
Converts the image data into a Blob object of a specified MIME type ('image/png' or 'image/jpeg').
55+
56+
**See Also**
57+
58+
[Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
59+
60+
**Remarks**
61+
62+
Introduced in Dynamsoft Barcode Reader Bundle version 11.2.2000 and Dynamsoft Capture Vision Bundle version 3.2.1000.

programming/javascript/api-reference/core/core-module-class.md

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ noTitleIndex: true
1212

1313
The CoreModule class defines common functionality in the Core module.
1414

15-
| Name | Description |
16-
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
17-
| `static` [detectEnvironment()](#detectenvironment) | Detects and returns information about the current runtime environment. |
18-
| `static` [engineResourcePaths](#engineresourcepaths) | Configures the paths where the .wasm files and other necessary resources for modules are located. |
19-
| `static` [getVersion()](#getversion) | Returns the version of the Core module. |
20-
| `static` [isModuleLoaded()](#ismoduleloaded) | Returns whether the WebAssembly (.wasm) file for the specified module is successfully loaded. |
21-
| `static` [loadWasm()](#loadwasm) | Initiates the loading process for the .wasm file(s) corresponding to the specified module(s). |
15+
| Name | Description |
16+
| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
17+
| `static` [detectEnvironment()](#detectenvironment) | Detects and returns information about the current runtime environment. |
18+
| `static` [engineResourcePaths](#engineresourcepaths) | Configures the paths where the .wasm files and other necessary resources for modules are located. |
19+
| `static` [getVersion()](#getversion) | Returns the version of the Core module. |
20+
| `static` [isModuleLoaded()](#ismoduleloaded) | Returns whether the WebAssembly (.wasm) file for the specified module is successfully loaded. |
21+
| `static` [loadWasm()](#loadwasm) | Initiates the loading process for the .wasm file(s) corresponding to the specified module(s). |
22+
| `static` [onWasmLoadProgressChanged()](#onwasmloadprogresschanged) | An event that fires during the loading of a WebAssembly module (.wasm). |
2223

2324
<!--
2425
| `static` [onLog](#onlog) | Event triggered whenever a log message is ready to be dispatched. |
@@ -199,6 +200,45 @@ A promise that resolves when the resources have been successfully released. It d
199200
await Dynamsoft.Core.CoreModule.loadWasm();
200201
```
201202

203+
## onWasmLoadProgressChanged
204+
205+
An event that fires during the loading of a WebAssembly module (.wasm).
206+
207+
**Syntax**
208+
209+
```typescript
210+
static onWasmLoadProgressChanged (filePath: string, tag: "starting"| "in progress" | "completed", progress: { loaded: number, total: number }) : void;
211+
```
212+
213+
**Parameter**
214+
215+
`filePath` : The path of the wasm file.
216+
217+
`tag`(Optional) : Indicates the ongoing status of the file download ("starting", "in progress", "completed").
218+
219+
`progress` : An object indicating the progress of the download, with `loaded` and `total` bytes.
220+
221+
**Return value**
222+
223+
None.
224+
225+
**Code snippet**
226+
227+
```javascript
228+
Dynamsoft.Core.Coremodule.onWasmLoadProgressChanged = function(filePath, tag, progress) {
229+
console.log(`Status: ${tag} - File: ${filePath}`);
230+
if (tag === "in progress") {
231+
let percent = ((progress.loaded / progress.total) * 100).toFixed(1);
232+
console.log(`Progress: ${percent}%`);
233+
} else if (tag === "completed") {
234+
console.log("wasm loading completed!");
235+
}
236+
};
237+
```
238+
239+
**Remarks**
240+
241+
Introduced in Dynamsoft Barcode Reader Bundle version 11.2.2000 and Dynamsoft Capture Vision Bundle version 3.2.1000.
202242
<!--
203243
## onLog
204244

programming/javascript/api-reference/core/enum-image-pixel-format.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ codeAutoHeight: true
2222
enum EnumImagePixelFormat {
2323
/** 0:Black, 1:White. */
2424
IPF_BINARY = 0,
25-
/** 0:White, 1:Black. */
25+
/** 0: black, 255: white. foreground (bars) are white, background (spaces) are black. */
2626
IPF_BINARYINVERTED = 1,
2727
/** 8bit gray. */
2828
IPF_GRAYSCALED = 2,
@@ -46,7 +46,7 @@ enum EnumImagePixelFormat {
4646
IPF_ABGR_16161616 = 11,
4747
/** 24bit with BGR channel order stored in memory from high to low address. */
4848
IPF_BGR_888 = 12,
49-
/** 0:Black, 255:White. */
49+
/** 0: black, 255: white. foreground (bars) are black, background (spaces) are white. */
5050
IPF_BINARY_8 = 13,
5151
/**NV12 */
5252
IPF_NV12 = 14

0 commit comments

Comments
 (0)