Skip to content

Commit 9a687d2

Browse files
Merge pull request #74 from dynamsoft-docs/preview
Preview
2 parents 6b266d9 + b7f17fc commit 9a687d2

File tree

6 files changed

+148
-117
lines changed

6 files changed

+148
-117
lines changed

_includes/sidelist-programming/programming-cpp.html

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,23 @@
254254
</li>
255255
<li><a>DynamsoftUtility</a>
256256
<ul>
257-
<li><a href="{{ site.dcvb_cpp_api }}utility/directory-fetcher.html" class="otherLinkColour">CDirectoryFetcher</a></li>
258-
<li><a href="{{ site.dcvb_cpp_api }}utility/file-fetcher.html" class="otherLinkColour">CFileFetcher</a></li>
259-
<li><a href="{{ site.dcvb_cpp_api }}utility/image-io.html" class="otherLinkColour">CImageIO</a></li>
260-
<li><a href="{{ site.dcvb_cpp_api }}utility/image-processor.html" class="otherLinkColour">CImageProcessor</a></li>
261-
<li><a href="{{ site.dcvb_cpp_api }}utility/image-drawer.html" class="otherLinkColour">CImageDrawer</a></li>
262-
<li><a href="{{ site.dcvb_cpp_api }}utility/multi-frame-result-cross-filter.html" class="otherLinkColour">CMultiFrameResultCrossFilter</a></li>
263-
<li><a href="{{ site.dcvb_cpp_api }}utility/proactive-image-source-adapter.html" class="otherLinkColour">CProactiveImageSourceAdapter</a></li>
264-
<li><a href="{{ site.dcvb_cpp_api }}utility/utility-module.html" class="otherLinkColour">CUtilityModule</a></li>
257+
<li><a>Classes</a>
258+
<ul>
259+
<li><a href="{{ site.dcvb_cpp_api }}utility/directory-fetcher.html" class="otherLinkColour">CDirectoryFetcher</a></li>
260+
<li><a href="{{ site.dcvb_cpp_api }}utility/file-fetcher.html" class="otherLinkColour">CFileFetcher</a></li>
261+
<li><a href="{{ site.dcvb_cpp_api }}utility/image-io.html" class="otherLinkColour">CImageIO</a></li>
262+
<li><a href="{{ site.dcvb_cpp_api }}utility/image-processor.html" class="otherLinkColour">CImageProcessor</a></li>
263+
<li><a href="{{ site.dcvb_cpp_api }}utility/image-drawer.html" class="otherLinkColour">CImageDrawer</a></li>
264+
<li><a href="{{ site.dcvb_cpp_api }}utility/multi-frame-result-cross-filter.html" class="otherLinkColour">CMultiFrameResultCrossFilter</a></li>
265+
<li><a href="{{ site.dcvb_cpp_api }}utility/proactive-image-source-adapter.html" class="otherLinkColour">CProactiveImageSourceAdapter</a></li>
266+
<li><a href="{{ site.dcvb_cpp_api }}utility/utility-module.html" class="otherLinkColour">CUtilityModule</a></li>
267+
</ul>
268+
</li>
269+
<li><a>Enums</a>
270+
<ul>
271+
<li><a href="{{ site.dcvb_cpp_api }}utility/enum-filter-type.html" class="otherLinkColour">FilterType</a></li>
272+
</ul>
273+
</li>
265274
</ul>
266275
</li>
267276
<li><a>DynamsoftLicense</a>

programming/cplusplus/user-guide/document-scanner.md

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ In this guide, you will learn step by step on how to build a document scanner so
1919
- [For Windows](#for-windows)
2020
- [For Linux](#for-linux)
2121
- [Include the Library](#include-the-library)
22-
- [Initialize a Capture Vision Router Instance](#initialize-a-capture-vision-router-instance)
22+
- [Initialize the License Key](#initialize-the-license-key)
23+
- [Create a CaptureVisionRouter Instance](#create-a-capturevisionrouter-instance)
2324
- [Detect and Save the Normalized Document](#detect-and-save-the-normalized-document)
2425
- [Release the Allocated Memory](#release-the-allocated-memory)
2526
- [Build and Run the Project](#build-and-run-the-project)
@@ -34,12 +35,14 @@ To find out whether your environment is supported, please read the [System Requi
3435

3536
If you haven't downloaded the SDK yet, <a href="https://download2.dynamsoft.com/dcv/dynamsoft-capture-vision-cpp-3.0.1000.250304.zip" target="_blank">download the `C/C++ Package`</a> now and unpack the package into a directory of your choice.
3637

38+
> [!IMPORTANT]
3739
> For this tutorial, we unpack it to a pseudo directory `[INSTALLATION FOLDER]`, change it to your unpacking path for the following content.
3840
3941
## Build Your Own Application
4042

4143
In this section, we'll walk through the key steps needed to build an application that capture a document from an image file.
4244

45+
> [!TIP]
4346
>You can download the complete source code from [here](https://github.com/Dynamsoft/capture-vision-cpp-samples/tree/main/Samples/DocumentScanner).
4447
4548
### Create A New Project
@@ -86,7 +89,8 @@ In this section, we'll walk through the key steps needed to build an application
8689
rm -f $(OBJECT) $(TARGET) -r $(DS_LIB_PATH)/Templates
8790
```
8891

89-
>Note: The variable `DS_LIB_PATH` should be set to the correct directory where the library files are located.
92+
> [!IMPORTANT]
93+
> The variable `DS_LIB_PATH` should be set to the correct directory where the library files are located.
9094

9195
### Include the Library
9296

@@ -120,32 +124,36 @@ In this section, we'll walk through the key steps needed to build an application
120124
#endif
121125
```
122126

123-
### Initialize a Capture Vision Router Instance
127+
### Initialize the License Key
124128

125-
1. Initialize the license key
129+
If this is your first time using the library, you will need to obtain a trial license key. We recommend getting your own 30-day trial license through the following modal:
126130

127-
```cpp
128-
int errorcode = 0;
129-
char error[512];
130-
errorcode = CLicenseManager::InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", error, 512);
131-
if (errorcode != ErrorCode::EC_OK && errorcode != ErrorCode::EC_LICENSE_CACHE_USED)
132-
{
133-
cout << "License initialization failed: ErrorCode: " << errorcode << ", ErrorString: " << error << endl;
134-
}
135-
else
136-
{
137-
// codes from following steps...
138-
}
139-
```
131+
{% include trialLicense.html %}
140132

141-
>Note:
142-
> The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work. When it expires, you can request a 30-day free trial license from the <a href="https://www.dynamsoft.com/customer/license/trialLicense?utm_source=guide&product=dcv&package=c_cpp" target="_blank">Customer Portal</a>.
133+
Open the `DocumentScanner.cpp` file and add the following code inside the `Main` method to initialize the license for using the SDK in the application:
143134

144-
2. Create an instance of Dynamsoft Capture Vision Router
135+
```cpp
136+
int errorcode = 0;
137+
char error[512];
138+
errorcode = CLicenseManager::InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", error, 512);
139+
if (errorcode != ErrorCode::EC_OK && errorcode != ErrorCode::EC_LICENSE_CACHE_USED)
140+
{
141+
cout << "License initialization failed: ErrorCode: " << errorcode << ", ErrorString: " << error << endl;
142+
}
143+
else
144+
{
145+
// codes from following steps...
146+
}
147+
```
145148

146-
```cpp
147-
CCaptureVisionRouter* router = new CCaptureVisionRouter();
148-
```
149+
> [!NOTE]
150+
> The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work. Please replace it with your own 30-day trial license.
151+
152+
### Create a CaptureVisionRouter Instance
153+
154+
```cpp
155+
CCaptureVisionRouter* router = new CCaptureVisionRouter();
156+
```
149157

150158
### Detect and Save the Normalized Document
151159

@@ -156,6 +164,7 @@ In this section, we'll walk through the key steps needed to build an application
156164
CCapturedResult* result = router->Capture(imageFile.c_str(), CPresetTemplate::PT_DETECT_AND_NORMALIZE_DOCUMENT);
157165
```
158166

167+
> [!IMPORTANT]
159168
> Please change the `[PATH-TO-THE-IMAGE-FILE]` to a real image file path.
160169

161170
2. Save the normalized result as an image file
@@ -230,6 +239,5 @@ delete router, router = NULL;
230239
```
231240

232241

233-
> Note:
234-
>
242+
> [!IMPORTANT]
235243
> Please change all `[INSTALLATION FOLDER]` in above code snippet to your unpacking path.

programming/cplusplus/user-guide/mrz-scanner.md

Lines changed: 86 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,14 @@ To find out whether your environment is supported, please read the [System Requi
4141

4242
If you haven't downloaded the SDK yet, <a href="https://download2.dynamsoft.com/dcv/dynamsoft-capture-vision-cpp-3.0.1000.250304.zip" target="_blank">download the `C/C++ Package`</a> now and unpack the package into a directory of your choice.
4343

44+
> [!IMPORTANT]
4445
> For this tutorial, we unpack it to a pseudo directory `[INSTALLATION FOLDER]`, change it to your unpacking path for the following content.
4546
4647
## Build Your Own Application
4748

4849
In this section, we’ll walk through the key steps needed to build an application that reads the machine-readable zone (MRZ) from an image file.
4950

51+
> [!TIP]
5052
>You can download the complete source code from [here](https://github.com/Dynamsoft/capture-vision-cpp-samples/tree/main/Samples/MRZScanner).
5153
5254
### Create A New Project
@@ -105,105 +107,110 @@ In this section, we’ll walk through the key steps needed to build an applicati
105107

106108
Add headers and libs in `MRZScanner.cpp`.
107109

108-
```cpp
109-
#include <iostream>
110-
#include <string>
111-
#include "[INSTALLATION FOLDER]/Include/DynamsoftCaptureVisionRouter.h"
112-
#include "[INSTALLATION FOLDER]/Include/DynamsoftUtility.h"
113-
114-
using namespace std;
115-
using namespace dynamsoft::cvr;
116-
using namespace dynamsoft::dlr;
117-
using namespace dynamsoft::dcp;
118-
using namespace dynamsoft::license;
119-
using namespace dynamsoft::utility;
120-
121-
// The following code only applies to Windows.
122-
#if defined(_WIN64) || defined(_WIN32)
123-
#ifdef _WIN64
124-
#pragma comment(lib, "[INSTALLATION FOLDER]/Dist/Lib/Windows/x64/DynamsoftCaptureVisionRouterx64.lib")
125-
#pragma comment(lib, "[INSTALLATION FOLDER]/Dist/Lib/Windows/x64/DynamsoftCorex64.lib")
126-
#pragma comment(lib, "[INSTALLATION FOLDER]/Dist/Lib/Windows/x64/DynamsoftLicensex64.lib")
127-
#pragma comment(lib, "[INSTALLATION FOLDER]/Dist/Lib/Windows/x64/DynamsoftUtilityx64.lib")
128-
#else
129-
#pragma comment(lib, "[INSTALLATION FOLDER]/Dist/Lib/Windows/x86/DynamsoftCaptureVisionRouterx86.lib")
130-
#pragma comment(lib, "[INSTALLATION FOLDER]/Dist/Lib/Windows/x86/DynamsoftCorex86.lib")
131-
#pragma comment(lib, "[INSTALLATION FOLDER]/Dist/Lib/Windows/x86/DynamsoftLicensex86.lib")
132-
#pragma comment(lib, "[INSTALLATION FOLDER]/Dist/Lib/Windows/x86/DynamsoftUtilityx86.lib")
133-
#endif
110+
```cpp
111+
#include <iostream>
112+
#include <string>
113+
#include "[INSTALLATION FOLDER]/Include/DynamsoftCaptureVisionRouter.h"
114+
#include "[INSTALLATION FOLDER]/Include/DynamsoftUtility.h"
115+
116+
using namespace std;
117+
using namespace dynamsoft::cvr;
118+
using namespace dynamsoft::dlr;
119+
using namespace dynamsoft::dcp;
120+
using namespace dynamsoft::license;
121+
using namespace dynamsoft::utility;
122+
123+
// The following code only applies to Windows.
124+
#if defined(_WIN64) || defined(_WIN32)
125+
#ifdef _WIN64
126+
#pragma comment(lib, "[INSTALLATION FOLDER]/Dist/Lib/Windows/x64/DynamsoftCaptureVisionRouterx64.lib")
127+
#pragma comment(lib, "[INSTALLATION FOLDER]/Dist/Lib/Windows/x64/DynamsoftCorex64.lib")
128+
#pragma comment(lib, "[INSTALLATION FOLDER]/Dist/Lib/Windows/x64/DynamsoftLicensex64.lib")
129+
#pragma comment(lib, "[INSTALLATION FOLDER]/Dist/Lib/Windows/x64/DynamsoftUtilityx64.lib")
130+
#else
131+
#pragma comment(lib, "[INSTALLATION FOLDER]/Dist/Lib/Windows/x86/DynamsoftCaptureVisionRouterx86.lib")
132+
#pragma comment(lib, "[INSTALLATION FOLDER]/Dist/Lib/Windows/x86/DynamsoftCorex86.lib")
133+
#pragma comment(lib, "[INSTALLATION FOLDER]/Dist/Lib/Windows/x86/DynamsoftLicensex86.lib")
134+
#pragma comment(lib, "[INSTALLATION FOLDER]/Dist/Lib/Windows/x86/DynamsoftUtilityx86.lib")
134135
#endif
135-
```
136+
#endif
137+
```
136138

137139
### Initialize the License Key
138140

141+
If this is your first time using the library, you will need to obtain a trial license key. We recommend getting your own 30-day trial license through the following modal:
142+
143+
{% include trialLicense.html %}
144+
139145
Open the `MRZScanner.cpp` file and add the following code inside the `Main` method to initialize the license for using the SDK in the application:
140146

141-
```cpp
142-
int errorcode = 0;
143-
char error[512];
144-
errorcode = CLicenseManager::InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", error, 512);
145-
if (errorcode != ErrorCode::EC_OK && errorcode != ErrorCode::EC_LICENSE_CACHE_USED)
146-
{
147-
cout << "License initialization failed: ErrorCode: " << errorcode << ", ErrorString: " << error << endl;
148-
}
149-
else
150-
{
151-
// codes from following steps...
152-
}
153-
```
147+
```cpp
148+
int errorcode = 0;
149+
char error[512];
150+
errorcode = CLicenseManager::InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", error, 512);
151+
if (errorcode != ErrorCode::EC_OK && errorcode != ErrorCode::EC_LICENSE_CACHE_USED)
152+
{
153+
cout << "License initialization failed: ErrorCode: " << errorcode << ", ErrorString: " << error << endl;
154+
}
155+
else
156+
{
157+
// codes from following steps...
158+
}
159+
```
154160

155-
>Note:
156-
> The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work. When it expires, you can request a 30-day free trial license from the <a href="https://www.dynamsoft.com/customer/license/trialLicense?utm_source=guide&product=mrz&package=c_cpp" target="_blank">Customer Portal</a>.
161+
> [!NOTE]
162+
> The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work. Please replace it with your own 30-day trial license.
157163
158164
### Create a CaptureVisionRouter Instance
159165

160-
```cpp
161-
CCaptureVisionRouter* router = new CCaptureVisionRouter();
162-
```
166+
```cpp
167+
CCaptureVisionRouter* router = new CCaptureVisionRouter();
168+
```
163169

164170
### Invoke the Capturing
165171

166-
```cpp
167-
string imageFile = "[PATH-TO-THE-IMAGE-FILE]";
168-
CCapturedResult* result = router->Capture(imageFile.c_str(), "ReadPassportAndId");
169-
```
172+
```cpp
173+
string imageFile = "[PATH-TO-THE-IMAGE-FILE]";
174+
CCapturedResult* result = router->Capture(imageFile.c_str(), "ReadPassportAndId");
175+
```
170176
171-
> Please change the `[PATH-TO-THE-IMAGE-FILE]` to a real image file path.
177+
> [!IMPORTANT]
178+
> Please change the `[PATH-TO-THE-IMAGE-FILE]` to a real image file path.
172179
173180
### Filter and Get MRZ Details
174181
175-
```cpp
176-
cout << "File: " << imageFile << endl;
177-
if (result->GetErrorCode() != 0) {
178-
cout << "Error: " << result->GetErrorCode() << "," << result->GetErrorString() << endl;
179-
}
180-
CParsedResult* dcpResult = result->GetParsedResult();
181-
if (dcpResult == NULL || dcpResult->GetItemsCount() == 0)
182-
{
183-
cout << "No MRZ results." << endl;
184-
}
185-
else
182+
```cpp
183+
cout << "File: " << imageFile << endl;
184+
if (result->GetErrorCode() != 0) {
185+
cout << "Error: " << result->GetErrorCode() << "," << result->GetErrorString() << endl;
186+
}
187+
CParsedResult* dcpResult = result->GetParsedResult();
188+
if (dcpResult == NULL || dcpResult->GetItemsCount() == 0)
189+
{
190+
cout << "No MRZ results." << endl;
191+
}
192+
else
193+
{
194+
int lCount = dcpResult->GetItemsCount();
195+
cout << "Detected " << lCount << " MRZ Result(s)." << endl;
196+
for (int i = 0; i < lCount; i++)
186197
{
187-
int lCount = dcpResult->GetItemsCount();
188-
cout << "Detected " << lCount << " MRZ Result(s)." << endl;
189-
for (int i = 0; i < lCount; i++)
198+
const CParsedResultItem *item = dcpResult->GetItem(i);
199+
string docType = item->GetCodeType();
200+
cout << "DocumentType: " << docType << endl;
201+
if (docType == "MRTD_TD3_PASSPORT")
202+
{
203+
cout << "DocumentID: " << item->GetFieldValue("passportNumber") << endl;
204+
}
205+
else
190206
{
191-
const CParsedResultItem *item = dcpResult->GetItem(i);
192-
string docType = item->GetCodeType();
193-
cout << "DocumentType: " << docType << endl;
194-
if (docType == "MRTD_TD3_PASSPORT")
195-
{
196-
cout << "DocumentID: " << item->GetFieldValue("passportNumber") << endl;
197-
}
198-
else
199-
{
200-
cout << "DocumentID: " << item->GetFieldValue("documentNumber") << endl;
201-
}
202-
//get more field values
203-
//cout << "DocumentID: " << item->GetFieldValue("[FIELD-NAME]") << endl;
207+
cout << "DocumentID: " << item->GetFieldValue("documentNumber") << endl;
204208
}
209+
//get more field values
210+
//cout << "DocumentID: " << item->GetFieldValue("[FIELD-NAME]") << endl;
205211
}
206-
```
212+
}
213+
```
207214

208215
### Release the Allocated Memory
209216

@@ -247,6 +254,5 @@ delete router, router = NULL;
247254
>./MRZScanner
248255
```
249256

250-
> Note:
251-
>
257+
> [!IMPORTANT]
252258
> Please change all `[INSTALLATION FOLDER]` in above code snippet to your unpacking path.

programming/dotnet/user-guide/mrz-scanner.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ using Dynamsoft.DCP;
6161

6262
### Initialize the License Key
6363

64+
If this is your first time using the library, you will need to obtain a trial license key. We recommend getting your own 30-day trial license through the following modal:
65+
66+
{% include trialLicense.html %}
67+
6468
Open the `Program.cs` file and add the following code inside the `Main` method to initialize the license for using the SDK in the application:
6569

6670
```csharp
@@ -71,7 +75,7 @@ if (errorCode != (int)EnumErrorCode.EC_OK && errorCode != (int)EnumErrorCode.EC_
7175
Console.WriteLine("License initialization error: " + errorMsg);
7276
```
7377

74-
> The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work. When it expires, you can request a 30-day free trial license from the <a href="https://www.dynamsoft.com/customer/license/trialLicense?utm_source=guide&product=mrz&package=dotnet" target="_blank">Customer Portal</a>.
78+
> The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work. Please replace it with your own 30-day trial license.
7579
7680
### Create a CaptureVisionRouter Instance
7781

programming/python/release-notes/python-3.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: default-layout
3-
title: Release Notes v2.x - Dynamsoft Capture Vision Bundle Python Edition
4-
description: This is the release notes page of Dynamsoft Capture Vision Bundle Python Edition v2.x.
3+
title: Release Notes v3.x - Dynamsoft Capture Vision Bundle Python Edition
4+
description: This is the release notes page of Dynamsoft Capture Vision Bundle Python Edition v3.x.
55
keywords: release notes, python
66
needGenerateH3Content: false
77
---

0 commit comments

Comments
 (0)