Skip to content

Commit db09f36

Browse files
Merge pull request #132 from dynamsoft-docs/preview
update to internal commit 7c36394c
2 parents ec69602 + c197080 commit db09f36

File tree

6 files changed

+49
-38
lines changed

6 files changed

+49
-38
lines changed

programming/cplusplus/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ The best way to start with the Dynamsoft Barcode Reader C++ Edition, is followin
3636

3737
- MacOS 64bit: 10.12+ (not included in the trial package, contact us to get the SDK)
3838

39+
- For Embedded Devices:
40+
For embedded or ARM-based platforms, we recommend using a device with performance equivalent to or better than a Raspberry Pi 4 Model B (4GB RAM). Minimum recommended specs:
41+
- Quad-core ARM Cortex-A72 processor (or equivalent)
42+
- 4 GB RAM
43+
- Linux-based OS (e.g., Raspberry Pi OS, Ubuntu Server)
3944

4045
## License Subscription
4146

programming/cplusplus/upgrade-instruction.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,22 +147,22 @@ public:
147147
148148
int main()
149149
{
150-
CCaptureVisionRouter *cvr = new CCaptureVisionRouter;
150+
CCaptureVisionRouter *cvRouter = new CCaptureVisionRouter;
151151
152152
// Create your video source and bind it to the router
153153
MyVideoSource *source = new MyVideoSource;
154-
cvr->SetInput(source);
154+
cvRouter->SetInput(source);
155155
156156
// Create a CCapturedResultReceiver instance
157157
MyBarcodeResultReceiver *barcodesReceiver = new MyCapturedResultReceiver;
158-
cvr->AddResultReceiver(barcodesReceiver);
158+
cvRouter->AddResultReceiver(barcodesReceiver);
159159
160160
// Start capturing
161-
errorCode = cvr->StartCapturing(CPresetTemplate::PT_READ_BARCODES, true, errorMsg, 512);
161+
errorCode = cvRouter->StartCapturing(CPresetTemplate::PT_READ_BARCODES, true, errorMsg, 512);
162162
163163
delete barcodesReceiver;
164164
delete source;
165-
delete cvr;
165+
delete cvRouter;
166166
}
167167
```
168168

programming/cplusplus/user-guide.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ CLicenseManager::InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", errorMs
9696
Create an instance of Capture Vision Router.
9797

9898
```cpp
99-
CCaptureVisionRouter* cvr = new CCaptureVisionRouter;
99+
CCaptureVisionRouter* cvRouter = new CCaptureVisionRouter;
100100
```
101101

102102
### Decode and Output Results
@@ -105,7 +105,7 @@ Decode barcodes from an image file.
105105

106106
```cpp
107107
string imageFile = "[PATH-TO-A-BARCODE-IMAGE]";
108-
CCapturedResult* result = cvr->Capture(imageFile.c_str(), CPresetTemplate::PT_READ_BARCODES);
108+
CCapturedResult* result = cvRouter->Capture(imageFile.c_str(), CPresetTemplate::PT_READ_BARCODES);
109109
if (result->GetErrorCode() != 0) {
110110
cout << "Error: " << result->GetErrorCode() << "," << result->GetErrorString() << endl;
111111
}
@@ -138,7 +138,7 @@ else
138138
if (barcodeResult)
139139
barcodeResult->Release();
140140
result->Release();
141-
delete cvr, cvr = NULL;
141+
delete cvRouter, cvRouter = NULL;
142142
```
143143

144144
### Build and Run the Project
@@ -208,7 +208,7 @@ Set up a `CDirectoryFetcher` object to retrieve image data sources from a direct
208208
```cpp
209209
CDirectoryFetcher *fetcher = new CDirectoryFetcher;
210210
fetcher->SetDirectory("[THE DIRECTORY THAT HOLDS THE IMAGES]");
211-
cvr->SetInput(fetcher);
211+
cvRouter->SetInput(fetcher);
212212
```
213213

214214
### Add a Result Receiver as the Output
@@ -247,7 +247,7 @@ Create and register a `MyCapturedResultReceiver` object as the result receiver.
247247
248248
```cpp
249249
CCapturedResultReceiver *capturedReceiver = new MyCapturedResultReceiver;
250-
cvr->AddResultReceiver(capturedReceiver);
250+
cvRouter->AddResultReceiver(capturedReceiver);
251251
```
252252
253253
### Add an Object to Listen to the Status of the Image Source
@@ -273,24 +273,24 @@ public:
273273
Create and register a `MyImageSourceStateListener` object as the listener.
274274
275275
```cpp
276-
CImageSourceStateListener *listener = new MyImageSourceStateListener(cvr);
277-
cvr->AddImageSourceStateListener(listener);
276+
CImageSourceStateListener *listener = new MyImageSourceStateListener(cvRouter);
277+
cvRouter->AddImageSourceStateListener(listener);
278278
```
279279
280280
### Start the Process
281281
282282
Call the method `StartCapturing()` to start processing all the images in the specified folder.
283283
284284
```cpp
285-
int errorCode = cvr->StartCapturing(CPresetTemplate::PT_READ_BARCODES, true, errorMsg, 512);
285+
int errorCode = cvRouter->StartCapturing(CPresetTemplate::PT_READ_BARCODES, true, errorMsg, 512);
286286
```
287287
288288
During the process, the callback function `OnDecodedBarcodesReceived()` is triggered each time an image finishes processing. After all images are processed, the listener function `OnImageSourceStateReceived()` will return the image source state as `ISS_EXHAUSTED` and the process is stopped with the method `StopCapturing()`.
289289
290290
### Release the Allocated Memory
291291
292292
```cpp
293-
delete cvr, cvr = NULL;
293+
delete cvRouter, cvRouter = NULL;
294294
delete fetcher, fetcher = NULL;
295295
delete listener, listener = NULL;
296296
delete capturedReceiver, capturedReceiver = NULL;

programming/dotnet/user-guide.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ if (errorCode != (int)EnumErrorCode.EC_OK && errorCode != (int)EnumErrorCode.EC_
9292
### Create a CaptureVisionRouter Instance
9393

9494
```csharp
95-
using (CaptureVisionRouter cvr = new CaptureVisionRouter())
95+
using (CaptureVisionRouter cvRouter = new CaptureVisionRouter())
9696
{
9797
//code for invoking the barcode capturing
9898
}
@@ -101,10 +101,10 @@ using (CaptureVisionRouter cvr = new CaptureVisionRouter())
101101
### Invoke the Barcode Capturing
102102

103103
```csharp
104-
using (CaptureVisionRouter cvr = new CaptureVisionRouter())
104+
using (CaptureVisionRouter cvRouter = new CaptureVisionRouter())
105105
{
106106
string imageFile = "[PATH-TO-THE-IMAGE-FILE]";
107-
CapturedResult? result = cvr.Capture(imageFile, PresetTemplate.PT_READ_BARCODES);
107+
CapturedResult? result = cvRouter.Capture(imageFile, PresetTemplate.PT_READ_BARCODES);
108108
//code for filtering and getting barcode details
109109
}
110110
```
@@ -218,18 +218,18 @@ Create a class `MyImageSourceStateListener` to implement the `IImageSourceStateL
218218
```csharp
219219
class MyImageSourceStateListener : IImageSourceStateListener
220220
{
221-
private CaptureVisionRouter? cvr = null;
222-
public MyImageSourceStateListener(CaptureVisionRouter cvr)
221+
private CaptureVisionRouter? cvRouter = null;
222+
public MyImageSourceStateListener(CaptureVisionRouter cvRouter)
223223
{
224-
this.cvr = cvr;
224+
this.cvRouter = cvRouter;
225225
}
226226
public void OnImageSourceStateReceived(EnumImageSourceState state)
227227
{
228228
if (state == EnumImageSourceState.ISS_EXHAUSTED)
229229
{
230-
if (cvr != null)
230+
if (cvRouter != null)
231231
{
232-
cvr.StopCapturing();
232+
cvRouter.StopCapturing();
233233
}
234234
}
235235
}
@@ -239,19 +239,19 @@ class MyImageSourceStateListener : IImageSourceStateListener
239239
### Register the Input, Output Listener and ImageSource State Listener to the CaptureVisionRouter Instance
240240

241241
```csharp
242-
cvr.SetInput(fetcher);
242+
cvRouter.SetInput(fetcher);
243243
CapturedResultReceiver receiver = new MyCapturedResultReceiver();
244-
cvr.AddResultReceiver(receiver);
245-
MyImageSourceStateListener listener = new MyImageSourceStateListener(cvr);
246-
cvr.AddImageSourceStateListener(listener);
244+
cvRouter.AddResultReceiver(receiver);
245+
MyImageSourceStateListener listener = new MyImageSourceStateListener(cvRouter);
246+
cvRouter.AddImageSourceStateListener(listener);
247247
```
248248

249249
### Start the Capturing Process
250250

251251
Call the method `StartCapturing()` to start processing all the images in the specified folder.
252252

253253
```csharp
254-
errorCode = cvr.StartCapturing(PresetTemplate.PT_READ_BARCODES, true, out errorMsg);
254+
errorCode = cvRouter.StartCapturing(PresetTemplate.PT_READ_BARCODES, true, out errorMsg);
255255
if (errorCode != (int)EnumErrorCode.EC_OK)
256256
{
257257
Console.WriteLine("error: " + errorMsg);

programming/python/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ The best way to start with the Dynamsoft Barcode Reader Python Edition, is follo
3838
- Python 3.5 (for versions below DBR 7.5)
3939
- Python 2.7 (for versions below DBR 7.2.2.3)
4040

41+
- For Embedded Devices:
42+
For embedded or ARM-based platforms, we recommend using a device with performance equivalent to or better than a Raspberry Pi 4 Model B (4GB RAM). Minimum recommended specs:
43+
- Quad-core ARM Cortex-A72 processor (or equivalent)
44+
- 4 GB RAM
45+
- Linux-based OS (e.g., Raspberry Pi OS, Ubuntu Server)
46+
4147
## API Reference
4248

4349
For an overview of the APIs, see the [API Reference]({{ site.dbr_python_api }}).

programming/python/user-guide.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ else:
8080
### Create a CaptureVisionRouter Instance
8181

8282
```python
83-
cvr = CaptureVisionRouter()
83+
cvr_instance = CaptureVisionRouter()
8484
```
8585

8686
### Invoke the Barcode Capturing
8787

8888
```python
89-
result = cvr.capture("[PATH-TO-THE-IMAGE-FILE]", EnumPresetTemplate.PT_READ_BARCODES.value)
89+
result = cvr_instance.capture("[PATH-TO-THE-IMAGE-FILE]", EnumPresetTemplate.PT_READ_BARCODES.value)
9090
```
9191

9292
> Please change the `[PATH-TO-THE-IMAGE-FILE]` to a real barcode image file path.
@@ -181,31 +181,31 @@ Create a class `MyImageSourceStateListener` to implement the `ImageSourceStateLi
181181

182182
```python
183183
class MyImageSourceStateListener(ImageSourceStateListener):
184-
def __init__(self, cvr:CaptureVisionRouter) -> None:
184+
def __init__(self, cvr_instance:CaptureVisionRouter) -> None:
185185
super().__init__()
186-
self.cvr = cvr
186+
self.cvr_instance = cvr_instance
187187
def on_image_source_state_received(self, state: int) -> None:
188188
if state == EnumImageSourceState.ISS_EXHAUSTED:
189-
if self.cvr != None:
190-
self.cvr.stop_capturing()
189+
if self.cvr_instance != None:
190+
self.cvr_instance.stop_capturing()
191191
```
192192

193193
### Register the Input, Output Listener and ImageSource State Listener to the CaptureVisionRouter Instance
194194

195195
```python
196-
cvr.set_input(fetcher)
196+
cvr_instance.set_input(fetcher)
197197
receiver = MyCapturedResultReceiver()
198-
cvr.add_result_receiver(receiver)
199-
listener = MyImageSourceStateListener(cvr)
200-
cvr.add_image_source_state_listener(listener)
198+
cvr_instance.add_result_receiver(receiver)
199+
listener = MyImageSourceStateListener(cvr_instance)
200+
cvr_instance.add_image_source_state_listener(listener)
201201
```
202202

203203
### Start the Capturing Process
204204

205205
Call the method `start_capturing()` to start processing all the images in the specified folder.
206206

207207
```python
208-
errorCode, errorMsg = cvr.start_capturing("", True)
208+
errorCode, errorMsg = cvr_instance.start_capturing("", True)
209209
if errorCode != EnumErrorCode.EC_OK:
210210
print("error:", errorMsg)
211211
```

0 commit comments

Comments
 (0)