diff --git a/_includes/sidelist-parameters-organization.html b/_includes/sidelist-parameters-organization.html index 6d4139cd..dcaf6711 100644 --- a/_includes/sidelist-parameters-organization.html +++ b/_includes/sidelist-parameters-organization.html @@ -69,7 +69,6 @@
  • ExpectedBarcodesCount
  • MaxThreadsInOneTask
  • Name
  • -
  • ReturnBarcodeZoneClarity
  • TextResultOrderModes
  • SectionArray diff --git a/performance/speed.md b/performance/speed.md index 616d8a92..5841772d 100644 --- a/performance/speed.md +++ b/performance/speed.md @@ -104,7 +104,7 @@ For interactive barcode reading from a video input, you get better speed if: * the video frames are trimmed around the barcode(s) before submitted for barcode reading; * the video frames are provided in a way that reduces the waiting time of the barcode reading engine. -The Dynamsoft Camera Enhancer SDK (DCE) is designed to do all the above like this: +The Dynamsoft Camera Enhancer SDK (DCE) is designed to do all the above like this: * it comes with camera control and is able to find and open the best suited camera by default (with support for manual adjustment too); diff --git a/programming/features/barcode-formats-and-count.md b/programming/features/barcode-formats-and-count.md index 7d6460f9..0568bcde 100644 --- a/programming/features/barcode-formats-and-count.md +++ b/programming/features/barcode-formats-and-count.md @@ -26,6 +26,7 @@ You can configure the parameter in two different ways, depending on your require >- Swift >- Python >- C# +>- Java > > ```javascript @@ -112,6 +113,28 @@ using (CaptureVisionRouter cvRouter = new CaptureVisionRouter()) cvRouter.UpdateSettings(PresetTemplate.PT_READ_BARCODES, settings, out errorMsg); } ``` +> +```java +CaptureVisionRouter cvRouter = new CaptureVisionRouter(); +SimplifiedCaptureVisionSettings settings = null; +try { + // Obtain current runtime settings of `CaptureVisionRouter` instance + settings = cvRouter.getSimplifiedSettings(EnumPresetTemplate.PT_READ_BARCODES); +} catch (CaptureVisionException e) { + settings = new SimplifiedCaptureVisionSettings(); +} +// Specify the barcode formats by enumeration values. +// Use "|" to enable multiple barcode formats at one time. +settings.barcodeSettings.barcodeFormatIds = EnumBarcodeFormat.BF_QR_CODE | EnumBarcodeFormat.BF_ONED; +try { + // Update the settings. + cvRouter.updateSettings(EnumPresetTemplate.PT_READ_BARCODES, settings); +} catch (CaptureVisionException e) { + System.out.println("Update settings failed: ErrorCode: " + e.getErrorCode() + ", ErrorString: " + e.getErrorString()); + return; +} +//call capture or other tasks +``` * Configure barcode format via `JSON parameter template file` diff --git a/programming/features/barcode-scan-region.md b/programming/features/barcode-scan-region.md index 993a4059..1e62b7f1 100644 --- a/programming/features/barcode-scan-region.md +++ b/programming/features/barcode-scan-region.md @@ -21,6 +21,7 @@ Dynamsoft Barcode Reader (DBR) will locate the code region and decode the entire >- C++ >- Python >- C# + >- Java > > ```javascript @@ -87,6 +88,31 @@ using (CaptureVisionRouter cvRouter = new CaptureVisionRouter()) cvRouter.UpdateSettings(PresetTemplate.PT_READ_BARCODES, settings, out errorMsg); } ``` +> +```java +CaptureVisionRouter cvRouter = new CaptureVisionRouter(); +SimplifiedCaptureVisionSettings settings = null; +try { + // Obtain current runtime settings of `CaptureVisionRouter` instance + settings = cvRouter.getSimplifiedSettings(EnumPresetTemplate.PT_READ_BARCODES); +} catch (CaptureVisionException e) { + settings = new SimplifiedCaptureVisionSettings(); +} +// Specify the ROI. +settings.roiMeasuredInPercentage = 1; +settings.roi.points[0].set(10, 10); +settings.roi.points[1].set(90, 10); +settings.roi.points[2].set(90, 90); +settings.roi.points[3].set(10, 90); +try { + // Update the settings. + cvRouter.updateSettings(EnumPresetTemplate.PT_READ_BARCODES, settings); +} catch (CaptureVisionException e) { + System.out.println("Update settings failed: ErrorCode: " + e.getErrorCode() + ", ErrorString: " + e.getErrorString()); + return; +} +//call capture or other tasks +``` * Configure region via `JSON Template` diff --git a/programming/features/get-barcode-location.md b/programming/features/get-barcode-location.md index dc4f374b..4a194e94 100644 --- a/programming/features/get-barcode-location.md +++ b/programming/features/get-barcode-location.md @@ -26,6 +26,7 @@ The following code snippet shows how to get the coordinates of the barcode: >- Swift >- Python >- C# + >- Java > > ```javascript @@ -167,3 +168,27 @@ using (CaptureVisionRouter cvRouter = new CaptureVisionRouter()) } } ``` +> +```java +CaptureVisionRouter cvRouter = new CaptureVisionRouter(); +CapturedResult[] results = cvRouter.captureMultiPages("IMAGE-FILE-PATH", EnumPresetTemplate.PT_READ_BARCODES); +for (CapturedResult result : results) { + if (result.getErrorCode() != EnumErrorCode.EC_OK) { + System.out.println("Error: " + result.getErrorCode() + ", " + result.getErrorString()); + } + DecodedBarcodesResult barcodesResult = result.getDecodedBarcodesResult(); + if (barcodesResult != null) { + BarcodeResultItem[] items = barcodesResult.getItems(); + System.out.println("Decoded " + items.length + " barcodes"); + for (int i = 0; i < items.length; i++) { + BarcodeResultItem barcodeItem = items[i]; + System.out.println("Result " + (i + 1)); + Quadrilateral quad = barcodeItem.getLocation(); + System.out.println("Point 0: [" + quad.points[0].getX() + "," + quad.points[0].getY() + "]"); + System.out.println("Point 1: [" + quad.points[1].getX() + "," + quad.points[1].getY() + "]"); + System.out.println("Point 2: [" + quad.points[2].getX() + "," + quad.points[2].getY() + "]"); + System.out.println("Point 3: [" + quad.points[3].getX() + "," + quad.points[3].getY() + "]"); + } + } +} +``` diff --git a/programming/features/get-confidence-rotation.md b/programming/features/get-confidence-rotation.md index 3a5ab024..bf4777da 100644 --- a/programming/features/get-confidence-rotation.md +++ b/programming/features/get-confidence-rotation.md @@ -47,6 +47,7 @@ The following code snippet shows how to get the confidence and rotation angle of >- Swift >- Python >- C# + >- Java > > ```javascript @@ -167,6 +168,27 @@ using (CaptureVisionRouter cvRouter = new CaptureVisionRouter()) } } ``` +> +```java +CaptureVisionRouter cvRouter = new CaptureVisionRouter(); +CapturedResult[] results = cvRouter.captureMultiPages("IMAGE-FILE-PATH", EnumPresetTemplate.PT_READ_BARCODES); +for (CapturedResult result : results) { + if (result.getErrorCode() != EnumErrorCode.EC_OK) { + System.out.println("Error: " + result.getErrorCode() + ", " + result.getErrorString()); + } + DecodedBarcodesResult barcodesResult = result.getDecodedBarcodesResult(); + if (barcodesResult != null) { + BarcodeResultItem[] items = barcodesResult.getItems(); + System.out.println("Decoded " + items.length + " barcodes"); + for (int i = 0; i < items.length; i++) { + BarcodeResultItem barcodeItem = items[i]; + System.out.println("Result " + (i + 1)); + System.out.println("Confidence: " + barcodeItem.getConfidence()); + System.out.println("Angle: " + barcodeItem.getAngle()); + } + } +} +``` [1]: assets/get-confidence-rotation/1d-angle.png diff --git a/programming/features/get-detailed-info.md b/programming/features/get-detailed-info.md index 8ef87dbc..c5db9fe8 100644 --- a/programming/features/get-detailed-info.md +++ b/programming/features/get-detailed-info.md @@ -10,11 +10,11 @@ needAutoGenerateSidebar: false 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: -- `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) -- `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) -- `PDF417Details`: [C++]({{ site.cpp_api }}pdf417-details.html) / [Python]({{ site.python_api }}pdf417-details.html) / [.NET]({{ site.dotnet_api }}pdf417-details.html) -- `DataMatrixDetails`: [C++]({{ site.cpp_api }}datamatrix-details.html) / [Python]({{ site.python_api }}datamatrix-details.html) / [.NET]({{ site.dotnet_api }}datamatrix-details.html) -- `AztecDetails`: [C++]({{ site.cpp_api }}aztec-details.html) / [Python]({{ site.python_api }}aztec-details.html) / [.NET]({{ site.dotnet_api }}aztec-details.html) +- `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) +- `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) +- `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) +- `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) +- `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) Here we take QR Code as example and show how to get the version and model of a QR Code. @@ -45,6 +45,7 @@ Here we take QR Code as example and show how to get the version and model of a Q >- Swift >- Python >- C# + >- Java > > ```javascript @@ -175,3 +176,27 @@ using (CaptureVisionRouter cvRouter = new CaptureVisionRouter()) } } ``` +> +```java +CaptureVisionRouter cvRouter = new CaptureVisionRouter(); +CapturedResult[] results = cvRouter.captureMultiPages("IMAGE-FILE-PATH", EnumPresetTemplate.PT_READ_BARCODES); +for (CapturedResult result : results) { + if (result.getErrorCode() != EnumErrorCode.EC_OK) { + System.out.println("Error: " + result.getErrorCode() + ", " + result.getErrorString()); + } + DecodedBarcodesResult barcodesResult = result.getDecodedBarcodesResult(); + if (barcodesResult != null) { + BarcodeResultItem[] items = barcodesResult.getItems(); + System.out.println("Decoded " + items.length + " barcodes"); + for (int i = 0; i < items.length; i++) { + BarcodeResultItem barcodeItem = items[i]; + System.out.println("Result " + (i + 1)); + if (barcodeItem.getFormat() == EnumBarcodeFormat.BF_QR_CODE) { + QRCodeDetails qrDetail = (QRCodeDetails) barcodeItem.getDetails(); + System.out.println("Version: " + qrDetail.version); + System.out.println("Model: " + qrDetail.model); + } + } + } +} +``` diff --git a/programming/features/use-runtimesettings-or-templates.md b/programming/features/use-runtimesettings-or-templates.md index 66d0d69d..03261f34 100644 --- a/programming/features/use-runtimesettings-or-templates.md +++ b/programming/features/use-runtimesettings-or-templates.md @@ -44,6 +44,7 @@ The following code snippet demonstrates how to specify barcode formats via `Simp >- Swift >- Python >- C# + >- Java > > ```javascript @@ -125,6 +126,28 @@ using (CaptureVisionRouter cvRouter = new CaptureVisionRouter()) cvRouter.UpdateSettings(PresetTemplate.PT_READ_BARCODES, settings, out errorMsg); } ``` +> +```java +CaptureVisionRouter cvRouter = new CaptureVisionRouter(); +SimplifiedCaptureVisionSettings settings = null; +try { + // Obtain current runtime settings of `CaptureVisionRouter` instance + settings = cvRouter.getSimplifiedSettings(EnumPresetTemplate.PT_READ_BARCODES); +} catch (CaptureVisionException e) { + settings = new SimplifiedCaptureVisionSettings(); +} +// Specify the barcode formats by enumeration values. +// Use "|" to enable multiple barcode formats at one time. +settings.barcodeSettings.barcodeFormatIds = EnumBarcodeFormat.BF_QR_CODE | EnumBarcodeFormat.BF_ONED; +try { + // Update the settings. + cvRouter.updateSettings(EnumPresetTemplate.PT_READ_BARCODES, settings); +} catch (CaptureVisionException e) { + System.out.println("Update settings failed: ErrorCode: " + e.getErrorCode() + ", ErrorString: " + e.getErrorString()); + return; +} +//call capture or other tasks +``` **See Also** @@ -183,6 +206,7 @@ The following steps demonstrates how to specify barcode formats via `JSON Templa >- Swift >- Python >- C# + >- Java > > ```javascript @@ -252,7 +276,25 @@ The following steps demonstrates how to specify barcode formats via `JSON Templa // more process here } ``` + > + ```java + CaptureVisionRouter cvRouter = new CaptureVisionRouter(); + try { + String templateFile = "PATH-TO-YOUR-SETTING-FILE"; + cvRouter.initSettingsFromFile(templateFile); + // String templateString = ""; + // cvRouter.initSettings(templateString); + } catch (CaptureVisionRouterException e) { + System.out.println("Init template failed: ErrorCode: " + e.getErrorCode() + ", ErrorString: " + e.getErrorString()); + return; + } + // more process here + ``` ## Mixed Usage 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. + +> 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: +> - Simplify your JSON template so that it can be converted to `SimplifiedCaptureVisionSettings`, or +> - Continue using the JSON template exclusively without attempting to retrieve or update simplified settings. diff --git a/programming/usecases/read-postal-codes.md b/programming/usecases/read-postal-codes.md index b1ba0a9c..472ce32e 100644 --- a/programming/usecases/read-postal-codes.md +++ b/programming/usecases/read-postal-codes.md @@ -39,6 +39,7 @@ You can configure the parameter `BarcodeFormatIds` in two different ways, depend >- Swift >- Python >- C# + >- Java > > ```c++ @@ -114,6 +115,27 @@ using (CaptureVisionRouter cvRouter = new CaptureVisionRouter()) cvRouter.UpdateSettings(PresetTemplate.PT_READ_BARCODES, settings, out errorMsg); } ``` +> +```java +CaptureVisionRouter cvRouter = new CaptureVisionRouter(); +SimplifiedCaptureVisionSettings settings = null; +try { + // Obtain current runtime settings of `CaptureVisionRouter` instance + settings = cvRouter.getSimplifiedSettings(EnumPresetTemplate.PT_READ_BARCODES); +} catch (CaptureVisionException e) { + settings = new SimplifiedCaptureVisionSettings(); +} +// Enable all supported types of postal codes. +settings.barcodeSettings.barcodeFormatIds = EnumBarcodeFormat.BF_POSTALCODE; +try { + // Update the settings. + cvRouter.updateSettings(EnumPresetTemplate.PT_READ_BARCODES, settings); +} catch (CaptureVisionException e) { + System.out.println("Update settings failed: ErrorCode: " + e.getErrorCode() + ", ErrorString: " + e.getErrorString()); + return; +} +//call capture or other tasks +``` * Configure barcode format via `JSON parameter template file` * update parameter `BarcodeFormatIds` in JSON template diff --git a/release-notes/dbr-rn-11.md b/release-notes/dbr-rn-11.md index 475e2292..8275f3fd 100644 --- a/release-notes/dbr-rn-11.md +++ b/release-notes/dbr-rn-11.md @@ -27,6 +27,7 @@ noTitleIndex: true | Versions | Available Editions | | -------- | ------------------ | +| 11.2.1100 | [Java]({{ site.java_release_notes}}java-11.html#1121100-10282025){:target="_blank"} | | 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"} | ## 11.0 (03/04/2025)