Skip to content

Commit 1e44eab

Browse files
Merge pull request #815 from dynamsoft-docs/preview
Preview
2 parents 5f14fb2 + d574b4b commit 1e44eab

File tree

10 files changed

+193
-7
lines changed

10 files changed

+193
-7
lines changed

_includes/sidelist-parameters-organization.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
<li><a href="{{ site.dcvb_parameters_reference }}barcode-reader-task-settings/expected-barcodes-count.html" class="otherLinkColour">ExpectedBarcodesCount</a></li>
7070
<li><a href="{{ site.dcvb_parameters_reference }}barcode-reader-task-settings/max-threads-in-one-task.html" class="otherLinkColour">MaxThreadsInOneTask</a></li>
7171
<li><a href="{{ site.dcvb_parameters_reference }}barcode-reader-task-settings/name.html" class="otherLinkColour">Name</a></li>
72-
<li><a href="{{ site.dcvb_parameters_reference }}barcode-reader-task-settings/return-barcode-zone-clarity.html" class="otherLinkColour">ReturnBarcodeZoneClarity</a></li>
7372
<li><a href="{{ site.dcvb_parameters_reference }}barcode-reader-task-settings/text-result-order-modes.html" class="otherLinkColour">TextResultOrderModes</a></li>
7473
<li><a href="{{ site.dcvb_parameters_reference }}barcode-reader-task-settings/section-array.html" class="otherLinkColour">SectionArray</a>
7574
<ul>
@@ -138,6 +137,7 @@
138137
<ul>
139138
<li><a href="{{ site.dcvb_parameters_reference }}barcode-reader-task-settings/stage-decode-barcodes.html#stage" class="otherLinkColour">Stage</a></li>
140139
<li><a href="{{ site.dcvb_parameters_reference }}barcode-reader-task-settings/deblur-modes.html" class="otherLinkColour">DeblurModes</a></li>
140+
<li><a href="{{ site.dcvb_parameters_reference }}barcode-reader-task-settings/return-barcode-zone-clarity.html" class="otherLinkColour">ReturnBarcodeZoneClarity</a></li>
141141
</ul>
142142
</li>
143143
</ul>

performance/speed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ For interactive barcode reading from a video input, you get better speed if:
104104
* the video frames are trimmed around the barcode(s) before submitted for barcode reading;
105105
* the video frames are provided in a way that reduces the waiting time of the barcode reading engine.
106106

107-
The <a href="https://www.dynamsoft.com/camera-enhancer/docs/core/introduction/" target="_blank">Dynamsoft Camera Enhancer SDK</a> (DCE) is designed to do all the above like this:
107+
The Dynamsoft Camera Enhancer SDK (DCE) is designed to do all the above like this:
108108

109109

110110
* it comes with camera control and is able to find and open the best suited camera by default (with support for manual adjustment too);

programming/features/barcode-formats-and-count.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ You can configure the parameter in two different ways, depending on your require
2626
>- Swift
2727
>- Python
2828
>- C#
29+
>- Java
2930
>
3031
>
3132
```javascript
@@ -112,6 +113,28 @@ using (CaptureVisionRouter cvRouter = new CaptureVisionRouter())
112113
cvRouter.UpdateSettings(PresetTemplate.PT_READ_BARCODES, settings, out errorMsg);
113114
}
114115
```
116+
>
117+
```java
118+
CaptureVisionRouter cvRouter = new CaptureVisionRouter();
119+
SimplifiedCaptureVisionSettings settings = null;
120+
try {
121+
// Obtain current runtime settings of `CaptureVisionRouter` instance
122+
settings = cvRouter.getSimplifiedSettings(EnumPresetTemplate.PT_READ_BARCODES);
123+
} catch (CaptureVisionException e) {
124+
settings = new SimplifiedCaptureVisionSettings();
125+
}
126+
// Specify the barcode formats by enumeration values.
127+
// Use "|" to enable multiple barcode formats at one time.
128+
settings.barcodeSettings.barcodeFormatIds = EnumBarcodeFormat.BF_QR_CODE | EnumBarcodeFormat.BF_ONED;
129+
try {
130+
// Update the settings.
131+
cvRouter.updateSettings(EnumPresetTemplate.PT_READ_BARCODES, settings);
132+
} catch (CaptureVisionException e) {
133+
System.out.println("Update settings failed: ErrorCode: " + e.getErrorCode() + ", ErrorString: " + e.getErrorString());
134+
return;
135+
}
136+
//call capture or other tasks
137+
```
115138

116139

117140
* Configure barcode format via `JSON parameter template file`

programming/features/barcode-scan-region.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Dynamsoft Barcode Reader (DBR) will locate the code region and decode the entire
2121
>- C++
2222
>- Python
2323
>- C#
24+
>- Java
2425
>
2526
>
2627
```javascript
@@ -87,6 +88,31 @@ using (CaptureVisionRouter cvRouter = new CaptureVisionRouter())
8788
cvRouter.UpdateSettings(PresetTemplate.PT_READ_BARCODES, settings, out errorMsg);
8889
}
8990
```
91+
>
92+
```java
93+
CaptureVisionRouter cvRouter = new CaptureVisionRouter();
94+
SimplifiedCaptureVisionSettings settings = null;
95+
try {
96+
// Obtain current runtime settings of `CaptureVisionRouter` instance
97+
settings = cvRouter.getSimplifiedSettings(EnumPresetTemplate.PT_READ_BARCODES);
98+
} catch (CaptureVisionException e) {
99+
settings = new SimplifiedCaptureVisionSettings();
100+
}
101+
// Specify the ROI.
102+
settings.roiMeasuredInPercentage = 1;
103+
settings.roi.points[0].set(10, 10);
104+
settings.roi.points[1].set(90, 10);
105+
settings.roi.points[2].set(90, 90);
106+
settings.roi.points[3].set(10, 90);
107+
try {
108+
// Update the settings.
109+
cvRouter.updateSettings(EnumPresetTemplate.PT_READ_BARCODES, settings);
110+
} catch (CaptureVisionException e) {
111+
System.out.println("Update settings failed: ErrorCode: " + e.getErrorCode() + ", ErrorString: " + e.getErrorString());
112+
return;
113+
}
114+
//call capture or other tasks
115+
```
90116

91117
* Configure region via `JSON Template`
92118

programming/features/get-barcode-location.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ The following code snippet shows how to get the coordinates of the barcode:
2626
>- Swift
2727
>- Python
2828
>- C#
29+
>- Java
2930
>
3031
>
3132
```javascript
@@ -167,3 +168,27 @@ using (CaptureVisionRouter cvRouter = new CaptureVisionRouter())
167168
}
168169
}
169170
```
171+
>
172+
```java
173+
CaptureVisionRouter cvRouter = new CaptureVisionRouter();
174+
CapturedResult[] results = cvRouter.captureMultiPages("IMAGE-FILE-PATH", EnumPresetTemplate.PT_READ_BARCODES);
175+
for (CapturedResult result : results) {
176+
if (result.getErrorCode() != EnumErrorCode.EC_OK) {
177+
System.out.println("Error: " + result.getErrorCode() + ", " + result.getErrorString());
178+
}
179+
DecodedBarcodesResult barcodesResult = result.getDecodedBarcodesResult();
180+
if (barcodesResult != null) {
181+
BarcodeResultItem[] items = barcodesResult.getItems();
182+
System.out.println("Decoded " + items.length + " barcodes");
183+
for (int i = 0; i < items.length; i++) {
184+
BarcodeResultItem barcodeItem = items[i];
185+
System.out.println("Result " + (i + 1));
186+
Quadrilateral quad = barcodeItem.getLocation();
187+
System.out.println("Point 0: [" + quad.points[0].getX() + "," + quad.points[0].getY() + "]");
188+
System.out.println("Point 1: [" + quad.points[1].getX() + "," + quad.points[1].getY() + "]");
189+
System.out.println("Point 2: [" + quad.points[2].getX() + "," + quad.points[2].getY() + "]");
190+
System.out.println("Point 3: [" + quad.points[3].getX() + "," + quad.points[3].getY() + "]");
191+
}
192+
}
193+
}
194+
```

programming/features/get-confidence-rotation.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ The following code snippet shows how to get the confidence and rotation angle of
4747
>- Swift
4848
>- Python
4949
>- C#
50+
>- Java
5051
>
5152
>
5253
```javascript
@@ -167,6 +168,27 @@ using (CaptureVisionRouter cvRouter = new CaptureVisionRouter())
167168
}
168169
}
169170
```
171+
>
172+
```java
173+
CaptureVisionRouter cvRouter = new CaptureVisionRouter();
174+
CapturedResult[] results = cvRouter.captureMultiPages("IMAGE-FILE-PATH", EnumPresetTemplate.PT_READ_BARCODES);
175+
for (CapturedResult result : results) {
176+
if (result.getErrorCode() != EnumErrorCode.EC_OK) {
177+
System.out.println("Error: " + result.getErrorCode() + ", " + result.getErrorString());
178+
}
179+
DecodedBarcodesResult barcodesResult = result.getDecodedBarcodesResult();
180+
if (barcodesResult != null) {
181+
BarcodeResultItem[] items = barcodesResult.getItems();
182+
System.out.println("Decoded " + items.length + " barcodes");
183+
for (int i = 0; i < items.length; i++) {
184+
BarcodeResultItem barcodeItem = items[i];
185+
System.out.println("Result " + (i + 1));
186+
System.out.println("Confidence: " + barcodeItem.getConfidence());
187+
System.out.println("Angle: " + barcodeItem.getAngle());
188+
}
189+
}
190+
}
191+
```
170192

171193
[1]: assets/get-confidence-rotation/1d-angle.png
172194

programming/features/get-detailed-info.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ needAutoGenerateSidebar: false
1010

1111
The Dynamsoft Barcode Reader SDK provides APIs for you to get the detailed barcode information like checksum digit, start/stop characters, error correction level, etc. To learn more about what information you can get, see the following items:
1212

13-
- `OneDCodeDetails`: [C++]({{ site.cpp_api }}oned-code-details.html) / [Python]({{ site.python_api }}oned-code-details.html) / [.NET]({{ site.dotnet_api }}oned-code-details.html)
14-
- `QRCodeDetails`: [C++]({{ site.cpp_api }}qr-code-details.html) / [Python]({{ site.python_api }}qr-code-details.html) / [.NET]({{ site.dotnet_api }}qr-code-details.html)
15-
- `PDF417Details`: [C++]({{ site.cpp_api }}pdf417-details.html) / [Python]({{ site.python_api }}pdf417-details.html) / [.NET]({{ site.dotnet_api }}pdf417-details.html)
16-
- `DataMatrixDetails`: [C++]({{ site.cpp_api }}datamatrix-details.html) / [Python]({{ site.python_api }}datamatrix-details.html) / [.NET]({{ site.dotnet_api }}datamatrix-details.html)
17-
- `AztecDetails`: [C++]({{ site.cpp_api }}aztec-details.html) / [Python]({{ site.python_api }}aztec-details.html) / [.NET]({{ site.dotnet_api }}aztec-details.html)
13+
- `OneDCodeDetails`: [C++]({{ site.cpp_api }}oned-code-details.html) / [Python]({{ site.python_api }}oned-code-details.html) / [.NET]({{ site.dotnet_api }}oned-code-details.html) / [Java]({{ site.java_api }}oned-code-details.html)
14+
- `QRCodeDetails`: [C++]({{ site.cpp_api }}qr-code-details.html) / [Python]({{ site.python_api }}qr-code-details.html) / [.NET]({{ site.dotnet_api }}qr-code-details.html) / [Java]({{ site.java_api }}qr-code-details.html)
15+
- `PDF417Details`: [C++]({{ site.cpp_api }}pdf417-details.html) / [Python]({{ site.python_api }}pdf417-details.html) / [.NET]({{ site.dotnet_api }}pdf417-details.html) / [Java]({{ site.java_api }}pdf417-details.html)
16+
- `DataMatrixDetails`: [C++]({{ site.cpp_api }}datamatrix-details.html) / [Python]({{ site.python_api }}datamatrix-details.html) / [.NET]({{ site.dotnet_api }}datamatrix-details.html) / [Java]({{ site.java_api }}datamatrix-details.html)
17+
- `AztecDetails`: [C++]({{ site.cpp_api }}aztec-details.html) / [Python]({{ site.python_api }}aztec-details.html) / [.NET]({{ site.dotnet_api }}aztec-details.html) / [Java]({{ site.java_api }}aztec-details.html)
1818

1919
Here we take QR Code as example and show how to get the version and model of a QR Code.
2020

@@ -45,6 +45,7 @@ Here we take QR Code as example and show how to get the version and model of a Q
4545
>- Swift
4646
>- Python
4747
>- C#
48+
>- Java
4849
>
4950
>
5051
```javascript
@@ -175,3 +176,27 @@ using (CaptureVisionRouter cvRouter = new CaptureVisionRouter())
175176
}
176177
}
177178
```
179+
>
180+
```java
181+
CaptureVisionRouter cvRouter = new CaptureVisionRouter();
182+
CapturedResult[] results = cvRouter.captureMultiPages("IMAGE-FILE-PATH", EnumPresetTemplate.PT_READ_BARCODES);
183+
for (CapturedResult result : results) {
184+
if (result.getErrorCode() != EnumErrorCode.EC_OK) {
185+
System.out.println("Error: " + result.getErrorCode() + ", " + result.getErrorString());
186+
}
187+
DecodedBarcodesResult barcodesResult = result.getDecodedBarcodesResult();
188+
if (barcodesResult != null) {
189+
BarcodeResultItem[] items = barcodesResult.getItems();
190+
System.out.println("Decoded " + items.length + " barcodes");
191+
for (int i = 0; i < items.length; i++) {
192+
BarcodeResultItem barcodeItem = items[i];
193+
System.out.println("Result " + (i + 1));
194+
if (barcodeItem.getFormat() == EnumBarcodeFormat.BF_QR_CODE) {
195+
QRCodeDetails qrDetail = (QRCodeDetails) barcodeItem.getDetails();
196+
System.out.println("Version: " + qrDetail.version);
197+
System.out.println("Model: " + qrDetail.model);
198+
}
199+
}
200+
}
201+
}
202+
```

programming/features/use-runtimesettings-or-templates.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ The following code snippet demonstrates how to specify barcode formats via `Simp
4444
>- Swift
4545
>- Python
4646
>- C#
47+
>- Java
4748
>
4849
>
4950
```javascript
@@ -125,6 +126,28 @@ using (CaptureVisionRouter cvRouter = new CaptureVisionRouter())
125126
cvRouter.UpdateSettings(PresetTemplate.PT_READ_BARCODES, settings, out errorMsg);
126127
}
127128
```
129+
>
130+
```java
131+
CaptureVisionRouter cvRouter = new CaptureVisionRouter();
132+
SimplifiedCaptureVisionSettings settings = null;
133+
try {
134+
// Obtain current runtime settings of `CaptureVisionRouter` instance
135+
settings = cvRouter.getSimplifiedSettings(EnumPresetTemplate.PT_READ_BARCODES);
136+
} catch (CaptureVisionException e) {
137+
settings = new SimplifiedCaptureVisionSettings();
138+
}
139+
// Specify the barcode formats by enumeration values.
140+
// Use "|" to enable multiple barcode formats at one time.
141+
settings.barcodeSettings.barcodeFormatIds = EnumBarcodeFormat.BF_QR_CODE | EnumBarcodeFormat.BF_ONED;
142+
try {
143+
// Update the settings.
144+
cvRouter.updateSettings(EnumPresetTemplate.PT_READ_BARCODES, settings);
145+
} catch (CaptureVisionException e) {
146+
System.out.println("Update settings failed: ErrorCode: " + e.getErrorCode() + ", ErrorString: " + e.getErrorString());
147+
return;
148+
}
149+
//call capture or other tasks
150+
```
128151

129152
**See Also**
130153

@@ -183,6 +206,7 @@ The following steps demonstrates how to specify barcode formats via `JSON Templa
183206
>- Swift
184207
>- Python
185208
>- C#
209+
>- Java
186210
>
187211
>
188212
```javascript
@@ -252,7 +276,25 @@ The following steps demonstrates how to specify barcode formats via `JSON Templa
252276
// more process here
253277
}
254278
```
279+
>
280+
```java
281+
CaptureVisionRouter cvRouter = new CaptureVisionRouter();
282+
try {
283+
String templateFile = "PATH-TO-YOUR-SETTING-FILE";
284+
cvRouter.initSettingsFromFile(templateFile);
285+
// String templateString = "";
286+
// cvRouter.initSettings(templateString);
287+
} catch (CaptureVisionRouterException e) {
288+
System.out.println("Init template failed: ErrorCode: " + e.getErrorCode() + ", ErrorString: " + e.getErrorString());
289+
return;
290+
}
291+
// more process here
292+
```
255293

256294
## Mixed Usage
257295

258296
It's also possible to use a `JSON Template` along with `SimplifiedCaptureVisionSettings`. Typically, you initialize the SDK with a `JSON Template`, the settings in which will be reflected in `SimplifiedCaptureVisionSettings`, then you can further fine-tune `SimplifiedCaptureVisionSettings` to apply to the actual reading process.
297+
298+
> NOTE: If your JSON template contains complex configurations that cannot be represented in `SimplifiedCaptureVisionSettings`, you may encounter an error message like "complex template can't be converted to simplified settings" when calling `getSimplifiedSettings()`. In such cases, you should either:
299+
> - Simplify your JSON template so that it can be converted to `SimplifiedCaptureVisionSettings`, or
300+
> - Continue using the JSON template exclusively without attempting to retrieve or update simplified settings.

programming/usecases/read-postal-codes.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ You can configure the parameter `BarcodeFormatIds` in two different ways, depend
3939
>- Swift
4040
>- Python
4141
>- C#
42+
>- Java
4243
>
4344
>
4445
```c++
@@ -114,6 +115,27 @@ using (CaptureVisionRouter cvRouter = new CaptureVisionRouter())
114115
cvRouter.UpdateSettings(PresetTemplate.PT_READ_BARCODES, settings, out errorMsg);
115116
}
116117
```
118+
>
119+
```java
120+
CaptureVisionRouter cvRouter = new CaptureVisionRouter();
121+
SimplifiedCaptureVisionSettings settings = null;
122+
try {
123+
// Obtain current runtime settings of `CaptureVisionRouter` instance
124+
settings = cvRouter.getSimplifiedSettings(EnumPresetTemplate.PT_READ_BARCODES);
125+
} catch (CaptureVisionException e) {
126+
settings = new SimplifiedCaptureVisionSettings();
127+
}
128+
// Enable all supported types of postal codes.
129+
settings.barcodeSettings.barcodeFormatIds = EnumBarcodeFormat.BF_POSTALCODE;
130+
try {
131+
// Update the settings.
132+
cvRouter.updateSettings(EnumPresetTemplate.PT_READ_BARCODES, settings);
133+
} catch (CaptureVisionException e) {
134+
System.out.println("Update settings failed: ErrorCode: " + e.getErrorCode() + ", ErrorString: " + e.getErrorString());
135+
return;
136+
}
137+
//call capture or other tasks
138+
```
117139

118140
* Configure barcode format via `JSON parameter template file`
119141
* update parameter `BarcodeFormatIds` in JSON template

release-notes/dbr-rn-11.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ noTitleIndex: true
2727

2828
| Versions | Available Editions |
2929
| -------- | ------------------ |
30+
| 11.2.1100 | [Java]({{ site.java_release_notes}}java-11.html#1121100-10282025){:target="_blank"} |
3031
| 11.2.1000 | [C++]({{ site.cpp_release_notes}}cpp-11.html#1121000-10142025){:target="_blank"} / [.NET]({{ site.dotnet_release_notes }}dotnet-11.html#1121000-10142025){:target="_blank"} / [Python]({{ site.python_release_notes}}python-11.html#1121000-10142025){:target="_blank"} / [Java]({{ site.java_release_notes}}java-11.html#1121000-10142025){:target="_blank"} / [Android]({{ site.android_release_notes}}android-11.html#1121000-10162025){:target="_blank"} / [iOS]({{ site.oc_release_notes }}ios-11.html#1121000-10162025){:target="_blank"} |
3132

3233
## 11.0 (03/04/2025)

0 commit comments

Comments
 (0)