Skip to content

Commit 3bc809e

Browse files
Merge pull request #16 from dynamsoft-docs/preview
update to internal commit d3889a8e
2 parents dc79f00 + 2956d98 commit 3bc809e

File tree

12 files changed

+409
-380
lines changed

12 files changed

+409
-380
lines changed

_includes/sidelist-programming/programming-js.html

Lines changed: 326 additions & 336 deletions
Large diffs are not rendered by default.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
layout: default-layout
3+
title: Built-in CaptureVisionTemplates - Dynamsoft Capture Vision JavaScript Edition API
4+
description: This page introduces the built-in CaptureVisionTemplates
5+
keywords: CaptureVisionTemplates, router, api reference, javascript, js
6+
needAutoGenerateSidebar: true
7+
needGenerateH3Content: false
8+
noTitleIndex: true
9+
---
10+
11+
# Built-in CaptureVisionTemplates
12+
13+
The following shows the built-in CaptureVisionTemplates
14+
15+
| Template Name | Function Description | Available with |
16+
| --------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------ |
17+
| **ReadBarcodes_Default** | Scans a single barcode. | dynamsoft-barcode-reader |
18+
| **ReadSingleBarcode** | Quickly scans a single barcode. | dynamsoft-barcode-reader |
19+
| **ReadBarcodes_SpeedFirst** | Prioritizes speed in scanning multiple barcodes. | dynamsoft-barcode-reader |
20+
| **ReadBarcodes_ReadRateFirst** | Maximizes the number of barcodes read. | dynamsoft-barcode-reader |
21+
| **ReadBarcodes_Balance** | Balances speed and quantity in reading multiple barcodes. | dynamsoft-barcode-reader |
22+
| **ReadDenseBarcodes** | Specialized in reading barcodes with high information density. | dynamsoft-barcode-reader |
23+
| **ReadDistantBarcodes** | Capable of reading barcodes from extended distances. | dynamsoft-barcode-reader |
24+
| **DetectDocumentBoundaries_Default** | Identifies the edges of a document. | dynamsoft-document-normalizer |
25+
| **NormalizeDocument_Default** | Adjusts a document to a standard format using detected borders. | dynamsoft-document-normalizer |
26+
| **DetectAndNormalizeDocument_Default** | Detects document edges and standardizes its format. | dynamsoft-document-normalizer |
27+
| **RecognizeTextLines_Default** | Identifies and reads any text present. | dynamsoft-label-recognizer |
28+
| **RecognizeNumbers** | Specializes in recognizing numerical data. | dynamsoft-label-recognizer |
29+
| **RecognizeLetters** | Identifies both uppercase and lowercase English alphabets. | dynamsoft-label-recognizer |
30+
| **RecognizeNumbersAndLetters** | Reads both numbers and English alphabets (any case). | dynamsoft-label-recognizer |
31+
| **RecognizeNumbersAndUppercaseLetters** | Scans numbers and uppercase English alphabets. | dynamsoft-label-recognizer |
32+
| **RecognizeUppercaseLetters** | Focuses on recognizing uppercase English alphabets. | dynamsoft-label-recognizer |
33+
| **Default** | Versatile function for barcode reading, document detection, or text recognition. | Any of the above three modules |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permalink: /programming/javascript/api-reference/capture-vision-router/capture-v
1111
---
1212
<!-- 2.0.20 -- Updated on 11/28/2023-->
1313

14-
# CaptureVisionRouter Module
14+
# DynamsoftCaptureVisionRouter Module
1515

1616
The CaptureVisionRouter module is defined in the namespace `Dynamsoft.CVR`. It consists of the classes `CaptureVisionRouterModule`, `CaptureVisionRouter`, `CapturedResultReceiver`, `IntermediateResultReceiver`, `IntermediateResultManager` and a few interfaces and enumerations.
1717

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

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ interface SimplifiedCaptureVisionSettings {
2424
}
2525
```
2626

27-
| Properties | Type |
28-
| --------------------------------------------------- | ----------------------------------------------------------- |
29-
| [capturedResultItemTypes](#capturedresultitemtypes) | *Dynamsoft.Core.EnumCapturedResultItemType* |
30-
| [roi](#roi) | *Dynamsoft.Core.Quadrilateral* |
31-
| [roiMeasuredInPercentage](#roimeasuredinpercentage) | *boolean* |
32-
| [timeout](#timeout) | *number* |
33-
| [barcodeSettings](#barcodesettings) | *Dynamsoft.DBR.SimplifiedBarcodeReaderSettings* |
34-
| [labelSettings](#labelsettings) | *Dynamsoft.DLR.SimplifiedLabelRecognizerSettings* |
35-
| [minImageCaptureInterval](#minimagecaptureinterval) | *number* |
27+
| Properties | Type |
28+
| --------------------------------------------------- | ------------------------------------------------- |
29+
| [capturedResultItemTypes](#capturedresultitemtypes) | *Dynamsoft.Core.EnumCapturedResultItemType* |
30+
| [roi](#roi) | *Dynamsoft.Core.Quadrilateral* |
31+
| [roiMeasuredInPercentage](#roimeasuredinpercentage) | *boolean* |
32+
| [timeout](#timeout) | *number* |
33+
| [barcodeSettings](#barcodesettings) | *Dynamsoft.DBR.SimplifiedBarcodeReaderSettings* |
34+
| [labelSettings](#labelsettings) | *Dynamsoft.DLR.SimplifiedLabelRecognizerSettings* |
35+
| [minImageCaptureInterval](#minimagecaptureinterval) | *number* |
3636

3737
## capturedResultItemTypes
3838

39-
Specifies the types of captured items to be processed. It uses the EnumCapturedResultItemType enumeration from the Core.BasicStructures namespace.
39+
Defines the types of items that are expected to be obtained through the capture process.
4040

4141
```typescript
4242
capturedResultItemTypes: Dynamsoft.Core.EnumCapturedResultItemType;
@@ -48,7 +48,7 @@ capturedResultItemTypes: Dynamsoft.Core.EnumCapturedResultItemType;
4848

4949
## roi
5050

51-
Represents the region of interest (ROI) as a quadrilateral. It defines the coordinates of the ROI.
51+
Specifies the specific area (known as region of interest, or roi) within the images that will be targeted by the capture process.
5252

5353
```typescript
5454
roi: Dynamsoft.Core.Quadrilateral;
@@ -60,23 +60,23 @@ roi: Dynamsoft.Core.Quadrilateral;
6060

6161
## roiMeasuredInPercentage
6262

63-
Indicates whether the ROI coordinates are measured in percentage values (true) or absolute pixel values (false).
63+
Specifies if the coordinates of the region of interest (roi) are represented as percentage values (true) or as absolute pixel values (false).
6464

6565
```typescript
6666
roiMeasuredInPercentage: boolean;
6767
```
6868

6969
## timeout
7070

71-
Specifies the timeout duration (in milliseconds) for processing tasks.
71+
Defines the maximum duration (in milliseconds) permitted for processing each individual image.
7272

7373
```typescript
7474
timeout: number;
7575
```
7676

7777
## barcodeSettings
7878

79-
Represents the simplified settings for barcode recognition using the SimplifiedBarcodeReaderSettings interface from the DBR namespace.
79+
Specifies the basic configuration for barcode scanning as defined by the `SimplifiedBarcodeReaderSettings` interface.
8080

8181
```typescript
8282
barcodeSettings: Dynamsoft.DBR.SimplifiedBarcodeReaderSettings;
@@ -88,15 +88,22 @@ barcodeSettings: Dynamsoft.DBR.SimplifiedBarcodeReaderSettings;
8888

8989
## labelSettings
9090

91-
Represents the simplified settings for label recognition using the SimplifiedLabelRecognizerSettings interface from the DLR namespace.
91+
Specifies the basic configuration for label recognition as defined by the `SimplifiedLabelRecognizerSettings` interface.
9292

9393
```typescript
9494
labelSettings: Dynamsoft.DLR.SimplifiedLabelRecognizerSettings;
9595
```
9696

9797
## minImageCaptureInterval
9898

99-
Represents the minimum time interval (in milliseconds) that must elapse before the next image capture operation can be initiated. Setting a larger value for this property will introduce a delay between image captures, while setting a smaller value allows for more frequent captures. It can be used to reduce the computational frequency, which can effectively lower energy consumption.
99+
Defines the minimum time interval in milliseconds that controls the time gap between consecutive image captures. It's a crucial parameter for managing the balance between capture frequency and computational load. Here's how it works:
100+
101+
1. **Adjustable Time Interval**: The value of `minImageCaptureInterval` dictates the minimum duration that should pass before another image capture can occur. A higher value means less frequent captures, leading to reduced computational demands and energy usage. Conversely, a lower value allows for more rapid image capturing.
102+
103+
2. **Special Values and Their Functions**:
104+
105+
* -1: Setting this value indicates that the image source should wait until the `CaptureVisionRouter` object has completely processed the current image before capturing the next one. This ensures there's a processing break between two successive images.
106+
* 0 (Default Setting): This value signifies that the image source should prepare the next image for capture immediately. As soon as the `CaptureVisionRouter` finishes processing an image, it can straightaway start with the next, ensuring no delay in processing.
100107

101108
```typescript
102109
minImageCaptureInterval: number;

programming/javascript/api-reference/capture-vision-router/multiple-image-processing-v2.0.10.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ breadcrumbText: CVR JavaScript CaptureVisionRouter
1111

1212
# CaptureVisionRouter Multiple Image Processing
1313

14-
| API Name | Description |
15-
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
16-
| [setInput()](#setinput) | Sets an image source to provide images for consecutive process. |
17-
| [getInput()](#getinput) | Gets an image source to provide images for consecutive process. |
18-
| [addImageSourceStateListener()](#addimagesourcestatelistener) | Adds an object that listens to state changes of the image source. |
19-
| [removeImageSourceStateListener()](#removeimagesourcestatelistener) | Removes an object which listens to state changes of the image source. |
20-
| [addResultReceiver()](#addresultreceiver) | Adds an object as the receiver of captured results. |
21-
| [removeResultReceiver()](#removeresultreceiver) | Removes an object which was added as a receiver of captured results. |
22-
| [addResultFilter()](#addresultfilter) | Adds a result filter to the capture process for filtering non-essential results.|
23-
| [removeResultFilter()](#removeresultfilter) | Removes a result filter for filtering non-essential results. |
24-
| [startCapturing()](#startcapturing) | Starts to process images consecutively. |
25-
| [stopCapturing()](#stopcapturing) | Stops the consecutive process. |
14+
| API Name | Description |
15+
| ------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
16+
| [setInput()](#setinput) | Sets an image source to provide images for consecutive process. |
17+
| [getInput()](#getinput) | Gets an image source to provide images for consecutive process. |
18+
| [addImageSourceStateListener()](#addimagesourcestatelistener) | Adds an object that listens to state changes of the image source. |
19+
| [removeImageSourceStateListener()](#removeimagesourcestatelistener) | Removes an object which listens to state changes of the image source. |
20+
| [addResultReceiver()](#addresultreceiver) | Adds an object as the receiver of captured results. |
21+
| [removeResultReceiver()](#removeresultreceiver) | Removes an object which was added as a receiver of captured results. |
22+
| [addResultFilter()](#addresultfilter) | Adds a result filter to the capture process for filtering non-essential results. |
23+
| [removeResultFilter()](#removeresultfilter) | Removes a result filter for filtering non-essential results. |
24+
| [startCapturing()](#startcapturing) | Starts to process images consecutively. |
25+
| [stopCapturing()](#stopcapturing) | Stops the consecutive process. |
2626

2727
## setInput
2828

@@ -326,7 +326,7 @@ startCapturing(templateName?: string): Promise<void>;
326326

327327
**parameter**
328328

329-
`templateName`(optional): The name of the template to use for capturing. If not specified, the default template (`EnumPresetTemplate.PT_DEFAULT`) will be used.
329+
`templateName`: specifies a "CaptureVisionTemplate" to use. If not specified, "Default" is used. There are two types of CaptureVisionTemplates: the [built-in ones](./built-in-templates.md) which come with the SDK and the custom ones that get initialized when the user calls [initSettings](./settings.md#initsettings). Please be aware that the [built-in CaptureVisionTemplates](./built-in-templates.md) will be overwritten should the user calls [initSettings](./settings.md#initsettings) and pass his own settings.
330330

331331
**Return Value**
332332

programming/javascript/api-reference/capture-vision-router/multiple-image-processing.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ breadcrumbText: CVR JavaScript CaptureVisionRouter
1111

1212
# CaptureVisionRouter Multiple Image Processing
1313

14-
| API Name | Description |
15-
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
16-
| [setInput()](#setinput) | Sets up an image source to provide images for continuous processing. |
17-
| [getInput()](#getinput) | Returns the image source object. |
14+
| API Name | Description |
15+
| ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
16+
| [setInput()](#setinput) | Sets up an image source to provide images for continuous processing. |
17+
| [getInput()](#getinput) | Returns the image source object. |
1818
| [addImageSourceStateListener()](#addimagesourcestatelistener) | Adds an `ImageSourceStateListener` object that listens to state changes of the image source. |
1919
| [removeImageSourceStateListener()](#removeimagesourcestatelistener) | Removes the specified `ImageSourceStateListener` object. |
2020
| [addResultReceiver()](#addresultreceiver) | Adds a `CapturedResultReceiver` object as the receiver of captured results. |
2121
| [removeResultReceiver()](#removeresultreceiver) | Removes the specified `CapturedResultReceiver` object. |
2222
| [addResultFilter()](#addresultfilter) | Adds a `CapturedResultFilter` object to filter non-essential results. |
2323
| [removeResultFilter()](#removeresultfilter) | Removes the specified `CapturedResultFilter` object. |
24-
| [startCapturing()](#startcapturing) | Starts to process images consecutively. |
25-
| [stopCapturing()](#stopcapturing) | Stops the consecutive process. |
24+
| [startCapturing()](#startcapturing) | Starts to process images consecutively. |
25+
| [stopCapturing()](#stopcapturing) | Stops the consecutive process. |
2626

2727
<!--
2828
| [addCaptureStateListener()](#addcapturestatelistener) | Adds a CaptureStateListener object to listen to the state changes of the capture process. |
@@ -330,7 +330,7 @@ startCapturing(templateName?: string): Promise<void>;
330330

331331
**parameter**
332332

333-
`templateName`(optional): The name of the template to use for capturing. If not specified, the default template will be used.
333+
`templateName`: specifies a "CaptureVisionTemplate" to use. If not specified, "Default" is used. There are two types of CaptureVisionTemplates: the [built-in ones](./built-in-templates.md) which come with the SDK and the custom ones that get initialized when the user calls [initSettings](./settings.md#initsettings). Please be aware that the [built-in CaptureVisionTemplates](./built-in-templates.md) will be overwritten should the user calls [initSettings](./settings.md#initsettings) and pass his own settings.
334334

335335
**Return Value**
336336

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ breadcrumbText: CVR JavaScript CaptureVisionRouter
2222

2323
## initSettings
2424

25-
Initializes the Runtime Settings with the settings in the given JSON string.
25+
Initializes the Runtime Settings with the settings in the given JSON string which contains one or multiple CaptureVisionTemplates.
2626

2727
**Syntax**
2828

@@ -32,7 +32,6 @@ initSettings(settings: string): Promise<void>;
3232

3333
**Parameters**
3434

35-
3635
`settings`: A JSON string containing the configuration settings for the CaptureVisionRouter.
3736

3837
**Return value**

programming/javascript/api-reference/capture-vision-router/single-image-processing-v2.0.10.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ capture(imageOrFile: Core.DSImageData | string | Blob | HTMLImageElement | HTMLC
2929

3030
`imageOrFile`: specifies the image or file to be processed. It can be the image itself in the form of `DSImageData`, the path of the image/file or the file itself in the form of `blob`, `HTMLImageElement` or `HTMLCanvasElement`.
3131

32-
`templateName`: specifies a [CaptureVisionTemplate]({{site.parameterFile}}capture-vision-template.html) to use. If not specified, the default one is used.
32+
`templateName`: specifies a "CaptureVisionTemplate" to use. If not specified, "Default" is used. There are two types of CaptureVisionTemplates: the [built-in ones](./built-in-templates.md) which come with the SDK and the custom ones that get initialized when the user calls [initSettings](./settings.md#initsettings). Please be aware that the [built-in CaptureVisionTemplates](./built-in-templates.md) will be overwritten should the user calls [initSettings](./settings.md#initsettings) and pass his own settings.
3333

3434
**Return value**
3535

0 commit comments

Comments
 (0)