|
1 | 1 | --- |
2 | 2 | layout: default-layout |
3 | 3 | title: Dynamsoft Barcode Reader iOS API Reference - Main Page |
4 | | -description: This is the main page of Dynamsoft Barcode Reader SDK API Reference for iOS Language. |
| 4 | +description: Main API reference page for Dynamsoft Barcode Reader SDK for iOS. |
5 | 5 | keywords: BarcodeReader, api reference, iOS |
| 6 | +noTitleIndex: false |
| 7 | +needGenerateH3Content: true |
| 8 | +needAutoGenerateSidebar: true |
6 | 9 | --- |
7 | 10 |
|
8 | | -# SDK Overview: Modules and Main APIs |
| 11 | +# API Overview |
| 12 | + |
| 13 | +Dynamsoft Barcode Reader (DBR) SDK is built on the Dynamsoft Capture Vision (DCV) architecture. |
| 14 | + |
| 15 | +<style> |
| 16 | + svg { |
| 17 | + max-width: 100%; |
| 18 | + height: auto; |
| 19 | + } |
| 20 | + |
| 21 | + .clickable { |
| 22 | + fill: transparent; |
| 23 | + cursor: pointer; |
| 24 | + } |
| 25 | + |
| 26 | + .clickable:hover { |
| 27 | + fill: rgba(0, 123, 255, 0.2); |
| 28 | + stroke: #007bff; |
| 29 | + stroke-width: 2; |
| 30 | + } |
| 31 | +</style> |
| 32 | +<svg viewBox="0 0 1397 768"> |
| 33 | + <image href="../../assets/architecture-cvr.png" width="1397" height="768"/> |
| 34 | + <a href="{{ site.dce_ios }}primary-api/camera-enhancer.html"> |
| 35 | + <rect class="clickable" |
| 36 | + x="110" y="310" |
| 37 | + width="305" height="180" /> |
| 38 | + </a> |
| 39 | + <a href="{{ site.dcvb_ios_api }}capture-vision-router/capture-vision-router.html"> |
| 40 | + <rect class="clickable" |
| 41 | + x="500" y="350" |
| 42 | + width="370" height="105" /> |
| 43 | + </a> |
| 44 | + <a href="{{ site.dcvb_ios_api }}capture-vision-router/auxiliary-classes/captured-result-receiver.html"> |
| 45 | + <rect class="clickable" |
| 46 | + x="1005" y="360" |
| 47 | + width="120" height="160" /> |
| 48 | + </a> |
| 49 | + <a href="{{ site.dcvb_ios_api }}capture-vision-router/auxiliary-classes/intermediate-result-receiver.html"> |
| 50 | + <rect class="clickable" |
| 51 | + x="1150" y="360" |
| 52 | + width="120" height="160" /> |
| 53 | + </a> |
| 54 | + <a href="{{ site.dbr_ios_api }}barcode-reader-module.html"> |
| 55 | + <rect class="clickable" |
| 56 | + x="480" y="570" |
| 57 | + width="210" height="150" /> |
| 58 | + </a> |
| 59 | + <a href="{{ site.dcp_ios_api }}code-parser.html"> |
| 60 | + <rect class="clickable" |
| 61 | + x="700" y="570" |
| 62 | + width="210" height="150" /> |
| 63 | + </a> |
| 64 | + <a href="{{ site.dcvb_ios_api }}capture-vision-router/settings.html"> |
| 65 | + <rect class="clickable" |
| 66 | + x="520" y="90" |
| 67 | + width="140" height="170" /> |
| 68 | + </a> |
| 69 | + <a href="{{ site.dcvb_ios_api }}capture-vision-router/auxiliary-classes/simplified-capture-vision-settings.html"> |
| 70 | + <rect class="clickable" |
| 71 | + x="680" y="90" |
| 72 | + width="140" height="170" /> |
| 73 | + </a> |
| 74 | +</svg> |
9 | 75 |
|
10 | | -This page provides an overview of the various modules and highlights the most essential APIs that form the backbone of Dynamsoft Barcode Reader SDK. |
11 | | - |
12 | | -## Modules Summary |
13 | | - |
14 | | -The Dynamsoft Barcode Reader (DBR) SDK is built on the Dynamsoft Capture Vision (DCV) framework, which includes multiple modules working together to achieve barcode reading. The hierarchical structure diagram below illustrates the various modules of the DBR SDK (with modules at the top depending on those below). |
15 | | - |
16 | | -<div align="center"> |
17 | | - <p><img src="../../assets/dcv-dbr-dependency.png" width="70%" alt="region-def"></p> |
18 | | - <p>Modules hierarchical of the DBR SDK</p> |
19 | | -</div> |
| 76 | +## Main APIs |
20 | 77 |
|
21 | | -The table below describes details the functionalities of these modules: |
| 78 | +| Category | Library | Description | |
| 79 | +| -------- | ------- | ----------- | |
| 80 | +| Orchestration | DynamsoftCaptureVisionRouter | Core Capture Vision Router APIs for configuring settings, starting or stopping capture, and registering receivers. | |
| 81 | +| Input & UI Enhancement | DynamsoftCameraEnhancer | APIs for camera control, image enhancement, and camera UI. | |
| 82 | +| Functional Modules | DynamsoftBarcodeReader<br>DynamsoftCodeParser | APIs for functional modules, mainly for decoded results and result processing. | |
| 83 | +| Infrastructure & Utility | DynamsoftLicense<br>DynamsoftCore<br>DynamsoftUtility | Licensing, basic structures, intermediate results, and utility APIs. | |
22 | 84 |
|
23 | | -| File | Description | |
24 | | -|:-----|:------------| |
25 | | -| `DynamsoftBarcodeReader`(DBR) | The Dynamsoft Barcode Reader module recognizes and decodes multiple barcode formats such as QR codes, Code 39, Code 128, and Data Matrix, among many others. | |
26 | | -| `DynamsoftCore`(Core) | The Dynamsoft Core module lays the foundation for Dynamsoft SDKs based on the DCV (Dynamsoft Capture Vision) architecture. It encapsulates the basic classes, interfaces, and enumerations shared by these SDKs. | |
27 | | -| `DynamsoftCaptureVisionRouter`(CVR) | The Dynamsoft Capture Vision Router module is the cornerstone of the Dynamsoft Capture Vision (DCV) architecture. It focuses on coordinating batch image processing and provides APIs for setting up image sources and result receivers, configuring workflows with parameters, and controlling processes. | |
28 | | -| `DynamsoftImageProcessing`(DIP) | The Dynamsoft Image Processing module facilitates digital image processing and supports operations for other modules, including the Barcode Reader, Label Recognizer, and Document Normalizer. | |
29 | | -| `DynamsoftLicense`(License) | The Dynamsoft License module manages the licensing aspects of Dynamsoft SDKs based on the DCV (Dynamsoft Capture Vision) architecture. | |
30 | | -| `DynamsoftCameraEnhancer`(DCE) | The Dynamsoft Camera Enhancer module controls the camera, transforming it into an image source for the DCV (Dynamsoft Capture Vision) architecture through ISA implementation. It also enhances image quality during acquisition and provides basic viewers for user interaction. | |
31 | | -| `DynamsoftUtility`(Utility) | The Dynamsoft Utility module defines auxiliary classes, including the ImageManager, and implementations of the CRF (Captured Result Filter) and ISA (Image Source Adapter) . These are shared by all Dynamsoft SDKs based on the DCV (Dynamsoft Capture Vision) architecture. | |
32 | | -| `DynamsoftCodeParser`(DCP) | The Dynamsoft Code Parser module converts data strings, typically encrypted in barcodes and machine-readable zones, into human-readable information. | |
33 | | -| `DynamsoftCodeParserDedicator`(DCPD) | The Dynamsoft Code Parser Dedicator module provides auxiliary functionality to enhance and extend the capabilities of DCP module. | |
| 85 | +### CaptureVisionRouter |
34 | 86 |
|
35 | | -## Main APIs |
| 87 | +The main class [`DSCaptureVisionRouter`]({{ site.dcvb_ios_api }}capture-vision-router/capture-vision-router.html) acts as the SDK entry point and provides the following essential APIs: |
36 | 88 |
|
37 | | -### Capture Vision Router |
| 89 | +#### Configure Settings |
38 | 90 |
|
39 | | -The main class [`DSCaptureVisionRouter`]({{ site.dcvb_ios_api }}capture-vision-router/capture-vision-router.html) acts as the SDK entry point and provides the following essential APIs: |
| 91 | +| API | Description | |
| 92 | +| --- | ----------- | |
| 93 | +| [`initSettingsFromFile`]({{ site.dcvb_ios_api }}capture-vision-router/settings.html#initsettingsfromfile) | Load settings from a custom template file. | |
| 94 | +| [`DSSimplifiedCaptureVisionSettings`]({{ site.dcvb_ios_api }}capture-vision-router/auxiliary-classes/simplified-capture-vision-settings.html) | Access commonly used settings through a `DSSimplifiedCaptureVisionSettings` object. | |
40 | 95 |
|
41 | | -- [Set input]({{ site.dcvb_ios_api }}capture-vision-router/multiple-file-processing.html#setinput) |
42 | | -- [Config barcode reader settings]({{ site.dcvb_ios_api }}capture-vision-router/settings.html) |
43 | | -- [Add result receiver]({{ site.dcvb_ios_api }}capture-vision-router/multiple-file-processing.html#addresultreceiver) |
44 | | -- [Start video stream barcode processing]({{ site.dcvb_ios_api }}capture-vision-router/multiple-file-processing.html#startcapturing) |
| 96 | +#### Start/Stop Capture |
45 | 97 |
|
46 | | -### Image Source Adapter |
| 98 | +| API | Description | |
| 99 | +| --- | ----------- | |
| 100 | +| [`startCapturing`]({{ site.dcvb_ios_api }}capture-vision-router/multiple-file-processing.html#startcapturing) | Start processing input frames with the selected template. | |
| 101 | +| [`stopCapturing`]({{ site.dcvb_ios_api }}capture-vision-router/multiple-file-processing.html#stopcapturing) | Stop the current capture process. | |
47 | 102 |
|
48 | | -The [`DSImageSourceAdapter`]({{ site.dcvb_ios_api }}core/basic-structures/image-source-adapter.html) class is an abstract class representing an adapter for image sources, providing a framework for fetching, buffering, and managing images from various sources. It serves as the input for the [`DSCaptureVisionRouter`]({{ site.dcvb_ios_api }}capture-vision-router/capture-vision-router.html). You can either use the typical implementations of [`DSImageSourceAdapter`]({{ site.dcvb_ios_api }}core/basic-structures/image-source-adapter.html) or implement your own. |
| 103 | +#### Receive Results |
49 | 104 |
|
50 | | -Class [`DSCameraEnhancer`]({{ site.dce_ios }}primary-api/camera-enhancer.html) is one of the typical implementations of [`DSImageSourceAdapter`]({{ site.dcvb_ios_api }}core/basic-structures/image-source-adapter.html). It is a class that not only implements the video frame obtaining APIs but also enable you to improve the video quality by adjusting the camera settings. |
| 105 | +Implement [`DSCapturedResultReceiver`]({{ site.dcvb_ios_api }}capture-vision-router/auxiliary-classes/captured-result-receiver.html) to receive capture results. |
51 | 106 |
|
52 | | -### Captured Result Receiver |
| 107 | +| API | Description | |
| 108 | +| --- | ----------- | |
| 109 | +| [`onDecodedBarcodesReceived`]({{ site.dcvb_ios_api }}capture-vision-router/auxiliary-classes/captured-result-receiver.html#ondecodedbarcodesreceived) | Callback for receiving barcode decoding results as a [`DSDecodedBarcodesResult`](decoded-barcodes-result.md) object. | |
| 110 | +| [`onParsedResultReceived`]({{ site.dcvb_ios_api }}capture-vision-router/auxiliary-classes/captured-result-receiver.html#onparsedresultreceived) | Callback for receiving parsed results as a [`DSParsedResult`]({{ site.dcp_ios_api }}parsed-result.html) object. | |
| 111 | +| [`onCapturedResultReceived`]({{ site.dcvb_ios_api }}capture-vision-router/auxiliary-classes/captured-result-receiver.html#oncapturedresultreceived) | Callback for receiving all result types as a [`DSCapturedResult`]({{ site.dcvb_ios_api }}capture-vision-router/auxiliary-classes/captured-result.html) object. | |
53 | 112 |
|
54 | | -To receive the results of video streaming barcode decoding, you need to implement the [`DSCapturedResultReceiver`]({{ site.dcvb_ios_api }}capture-vision-router/auxiliary-classes/captured-result-receiver.html) with the callback method [`onDecodedBarcodesReceived`]({{ site.dcvb_ios_api }}capture-vision-router/auxiliary-classes/captured-result-receiver.html#ondecodedbarcodesreceived). The result you received in the callback method is a [`DSDecodedBarcodesResult`](decoded-barcodes-result.md) object, which contains all the decoded barcodes from the processed video frame. |
| 113 | +### Input - CameraEnhancer |
55 | 114 |
|
56 | | -- [`onDecodedBarcodesReceived`]({{ site.dcvb_ios_api }}capture-vision-router/auxiliary-classes/captured-result-receiver.html#ondecodedbarcodesreceived): The callback method for you to receive the barcode decoding results with a [`DSDecodedBarcodesResult`](decoded-barcodes-result.md) object. |
57 | | -- [`DSDecodedBarcodesResult`](decoded-barcodes-result.md): An object that contains all the [`DSBarcodeResultItem`](barcode-result-item.md) that obtained from a video frame. |
58 | | -- [`DSBarcodeResultItem`](barcode-result-item.md): The basic item that represents a single barcode with the decoded text and other information. |
| 115 | +[`DSCameraEnhancer`]({{ site.dce_ios }}primary-api/camera-enhancer.html) is a built-in implementation of [`DSImageSourceAdapter`]({{ site.dcvb_ios_api }}core/basic-structures/image-source-adapter.html). It combines camera control, image enhancement, and a UI system designed for the Dynamsoft Capture Vision architecture. |
59 | 116 |
|
60 | | -### Camera View |
| 117 | +### Result |
61 | 118 |
|
62 | | -[`DSCameraView`]({{ site.dce_ios }}auxiliary-api/dcecameraview.html) is a view class that design for visualizing the real time video streaming and the barcode decoding result. If the [`DSCameraEnhancer`]({{ site.dce_ios }}primary-api/camera-enhancer.html) is set as the input of your CVR, the decoded barcodes will be highlighted automatically on the [`DSCameraView`]({{ site.dce_ios }}auxiliary-api/dcecameraview.html). |
| 119 | +| Result | Basic Item | Type | |
| 120 | +| ------ | ---------- | ---- | |
| 121 | +| [`DSDecodedBarcodesResult`](decoded-barcodes-result.md) | [`DSBarcodeResultItem`](barcode-result-item.md) | `CRIT_BARCODE` | |
| 122 | +| [`DSParsedResult`]({{ site.dcp_ios_api }}parsed-result.html) | [`DSParsedResultItem`]({{ site.dcp_ios_api }}parsed-result-item.html) | `CRIT_PARSED_RESULT` | |
0 commit comments