Skip to content

Commit 26d5366

Browse files
update
1 parent 6c630ad commit 26d5366

File tree

4 files changed

+68
-68
lines changed

4 files changed

+68
-68
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ This repository contains multiple samples that demonstrate how to use the [Dynam
88

99
- Dynamsoft Barcode Reader (DBR), Dynamsoft Document Normalizer (DDN), and Dynamsoft Label Recognizer (DLR) play crucial roles in reading barcodes, structures, and texts from images.
1010
- Dynamsoft Code Parser (DCP) is utilized to extract meaningful fields from text/bytes results, ensuring optimal data parsing capabilities.
11-
- To view and edit the output results, Dynamsoft Camera Enhancer (DCE) provide a suite of robust viewing and editing functions.
11+
- To view and edit the output results, Dynamsoft Camera Enhancer (DCE) provides a suite of robust viewing and editing functions.
1212

1313
## Samples
1414

15-
| Sample Name | Description |
16-
|------------------------------------------------------------------------------| ----------- |
17-
| [ScanSingleBarcode](./ScanSingleBarcode) | This sample illustrates the simplest way to recognize single barcode from video streaming. |
18-
| [DetectAndDeskewDocument](./DetectAndDeskewDocument) | This sample illustrates how to detect and deskew an document from video streaming. |
19-
| [ScanMRZ](./ScanMRZ) | This sample illustrates how to scan passport and ID cards from video streaming. |
15+
| Sample Name | Description |
16+
|--------------------------------------------------------| ----------- |
17+
| [ScanSingleBarcode](./ScanSingleBarcode) | This sample illustrates the simplest way to recognize single barcode from video streaming. |
18+
| [DetectAndDeskewDocument](./DetectAndDeskewDocument) | This sample illustrates how to detect and deskew a document from video streaming. |
19+
| [ScanMRZ](./ScanMRZ) | This sample illustrates how to scan passport and ID cards from video streaming. |
2020

2121
### How to build and run a sample
2222

@@ -54,7 +54,7 @@ npm install
5454

5555
3. Prepare iOS
5656

57-
You must install the necessary native frameworks from cocoapods to run the application. In order to do this, the `pod install` command needs to be run as such:
57+
You must install the necessary native frameworks from CocoaPods to run the application. In order to do this, the `pod install` command needs to be run as such:
5858

5959
```bash
6060
cd ios
@@ -89,7 +89,7 @@ npm run ios
8989
yarn ios
9090
```
9191

92-
If everything is set up _correctly_, you should see your new app running in your device.
92+
If everything is set up _correctly_, you should see your new app running on your device.
9393
This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
9494

9595
> Note:
@@ -102,7 +102,7 @@ This is one way to run your app — you can also run it directly from within And
102102

103103
[How to enable new architecture in Android](https://reactnative.dev/architecture/landing-page#android)
104104

105-
[How to enable new architecture in IOS](https://reactnative.dev/architecture/landing-page#ios)
105+
[How to enable new architecture in iOS](https://reactnative.dev/architecture/landing-page#ios)
106106
> Note:
107107
>
108108
> If you enable new architecture and want to run Android via `Windows`, You may encounter some build errors due to the `Windows Maximum Path Length Limitation`.

barcode-reader-integration-guide.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -85,24 +85,24 @@ npm install
8585
yarn install
8686
```
8787

88-
For iOS, you must install the necessary native frameworks from cocoapods by running the pod install command as below:
88+
For iOS, you must install the necessary native frameworks from CocoaPods by running the pod install command as below:
8989

9090
```bash
9191
cd ios
9292
pod install
9393
```
9494

95-
## Configure native projects
95+
## Configure Native Projects
9696

97-
The Dynamsoft Capture Vision SDK need the camera permission to use the camera device, so it can capture from video stream.
97+
The Dynamsoft Capture Vision SDK needs the camera permission to use the camera device, so it can capture from video stream.
9898

9999
### Android
100100

101101
For Android, we have defined camera permission within the SDK, you don't need to do anything.
102102

103-
### IOS
103+
### iOS
104104

105-
For IOS, you need to include the camera permission in `ios/your-project-name/Info.plist` inside the `<dist>` element:
105+
For iOS, you need to include the camera permission in `ios/your-project-name/Info.plist` inside the `<dist>` element:
106106

107107
```
108108
<key>NSCameraUsageDescription</key>
@@ -121,7 +121,7 @@ The first step in code configuration is to initialize a valid license via `Licen
121121
import {LicenseManager} from 'dynamsoft-capture-vision-react-native';
122122

123123
LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9")
124-
.then(()=>{/*Init license sussessfully.*/})
124+
.then(()=>{/*Init license successfully.*/})
125125
.catch(error => console.error("Init License failed.", error));
126126
```
127127

@@ -132,7 +132,7 @@ LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9")
132132
133133
### Request Camera Permission
134134

135-
Before open camera to start scanning barcodes, you need request camera permission from system.
135+
Before opening camera to start scanning barcodes, you need to request camera permission from system.
136136

137137
```typescript jsx
138138
import {CameraEnhancer} from 'dynamsoft-capture-vision-react-native';
@@ -157,7 +157,7 @@ import {CameraEnhancer, CameraView, CaptureVisionRouter, DecodedBarcodesResult,
157157

158158
export function Scanner() {
159159
const cameraView = useRef<CameraView>(null); // Create a reference to the CameraView component using useRef.
160-
const camera = CameraEnhancer.getInstance(); //Get the sington instance of CameraEnhancer
160+
const camera = CameraEnhancer.getInstance(); //Get the singleton instance of CameraEnhancer
161161
const router = CaptureVisionRouter.getInstance(); //Get the singleton instance of CaptureVisionRouter
162162

163163
useEffect(() => {
@@ -166,17 +166,17 @@ export function Scanner() {
166166

167167
/**
168168
* Adds a CapturedResultReceiver object to listen the captured result.
169-
* In this sample, we only listen DecodedBarcodesResult generated by Dyanmsoft Barcode Reader module.
169+
* In this sample, we only listen DecodedBarcodesResult generated by Dynamsoft Barcode Reader module.
170170
* */
171171
let resultReceiver = router.addResultReceiver({
172172
onDecodedBarcodesReceived: (result: DecodedBarcodesResult) => {
173173
//Handle the `result`
174174
},
175-
})
175+
});
176176

177177
/**
178178
* Open the camera when the component is mounted.
179-
* Please remember request camera permission before it.
179+
* Please remember to request camera permission before it.
180180
* */
181181
camera.open();
182182

@@ -189,7 +189,7 @@ export function Scanner() {
189189

190190
return () => {
191191
//Remove the receiver when the component is unmounted.
192-
router.removeResultReceiver(receiver);
192+
router.removeResultReceiver(resultReceiver);
193193

194194
//Close the camera when the component is unmounted.
195195
camera.close();
@@ -241,7 +241,7 @@ router.startCapturing(EnumPresetTemplate.PT_READ_SINGLE_BARCODE);
241241

242242
```typescript jsx
243243
import {CaptureVisionRouter} from "dynamsoft-capture-vision-react-native";
244-
let router = CaptureVisionRouter.getInstance()
244+
let router = CaptureVisionRouter.getInstance();
245245

246246
//Use require to get the jsonString or you can directly use initSettings("{raw Json String}")
247247
router.initSettings(JSON.stringify(require('./settings.json')));
@@ -253,7 +253,7 @@ router.startCapturing();
253253
>
254254
> - A template file is a JSON file that includes a series of algorithm parameter settings. It is always used to customize the performance for different usage scenarios. [Contact us](https://www.dynamsoft.com/company/contact/) to get a customized template for your barcode scanner.
255255
256-
### Specify the scan region
256+
### Specify the Scan Region
257257

258258
You can also limit the scan region of the SDK so that it doesn't exhaust resources trying to read from the entire image or frame.
259259

@@ -271,9 +271,9 @@ let scanRegion = {
271271
camera.setScanRegion(scanRegion);
272272
```
273273

274-
## Run the project
274+
## Run the Project
275275

276-
Go to your project folder, Open a _new_ terminal and run the following command:
276+
Go to your project folder, open a _new_ terminal and run the following command:
277277

278278
### For Android
279279

@@ -285,7 +285,7 @@ npm run android
285285
yarn android
286286
```
287287

288-
### For IOS
288+
### For iOS
289289

290290
#### Signing
291291

@@ -300,14 +300,14 @@ npm run ios
300300
yarn ios
301301
```
302302

303-
If everything is set up _correctly_, you should see your new app running in your device.
303+
If everything is set up _correctly_, you should see your new app running on your device.
304304
This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
305305

306-
## How to use the new architecture of React Native (Optional)
306+
## How to Use the New Architecture of React Native (Optional)
307307

308308
[How to enable new architecture in Android](https://reactnative.dev/architecture/landing-page#android)
309309

310-
[How to enable new architecture in IOS](https://reactnative.dev/architecture/landing-page#ios)
310+
[How to enable new architecture in iOS](https://reactnative.dev/architecture/landing-page#ios)
311311
> Note:
312312
>
313313
> If you enable new architecture and want to run Android via `Windows`, You may encounter some build errors due to the `Windows Maximum Path Length Limitation`.

document-scanner-integration-guide.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,24 +46,24 @@ npm install
4646
yarn install
4747
```
4848

49-
For iOS, you must install the necessary native frameworks from cocoapods by running the pod install command as below:
49+
For iOS, you must install the necessary native frameworks from CocoaPods by running the pod install command as below:
5050

5151
```bash
5252
cd ios
5353
pod install
5454
```
5555

56-
## Configure native projects
56+
## Configure Native Projects
5757

58-
The Dynamsoft Capture Vision SDK need the camera permission to use the camera device, so it can capture from video stream.
58+
The Dynamsoft Capture Vision SDK needs the camera permission to use the camera device, so it can capture from video stream.
5959

6060
### Android
6161

6262
For Android, we have defined camera permission within the SDK, you don't need to do anything.
6363

64-
### IOS
64+
### iOS
6565

66-
For IOS, you need to include the camera permission in `ios/your-project-name/Info.plist` inside the `<dist>` element:
66+
For iOS, you need to include the camera permission in `ios/your-project-name/Info.plist` inside the `<dist>` element:
6767
```
6868
<key>NSCameraUsageDescription</key>
6969
<string></string>
@@ -81,7 +81,7 @@ The first step in code configuration is to initialize a valid license via `Licen
8181
import {LicenseManager} from 'dynamsoft-capture-vision-react-native';
8282

8383
LicenseManager.initLicense("your-license-key")
84-
.then(()=>{/*Init license sussessfully.*/})
84+
.then(()=>{/*Init license successfully.*/})
8585
.catch(error => console.error("Init License failed.", error));
8686
```
8787

@@ -92,7 +92,7 @@ LicenseManager.initLicense("your-license-key")
9292
9393
## Request Camera Permission
9494

95-
Before open camera to start document scanning, you need request camera permission from system.
95+
Before opening camera to start document scanning, you need to request camera permission from system.
9696

9797
```typescript jsx
9898
import {CameraEnhancer} from 'dynamsoft-capture-vision-react-native';
@@ -124,7 +124,7 @@ import {
124124

125125
export function Scanner() {
126126
const cameraView = useRef<CameraView>(null); // Create a reference to the CameraView component using useRef.
127-
const camera = CameraEnhancer.getInstance(); //Get the sington instance of CameraEnhancer
127+
const camera = CameraEnhancer.getInstance(); //Get the singleton instance of CameraEnhancer
128128
const router = CaptureVisionRouter.getInstance(); //Get the singleton instance of CaptureVisionRouter
129129

130130
useEffect(() => {
@@ -133,7 +133,7 @@ export function Scanner() {
133133

134134
/**
135135
* Adds a CapturedResultReceiver object to listen the captured result.
136-
* In this sample, we only listen onDetectedQuadsReceived or onNormalizedImagesReceived generated by Dyanmsoft Document Normalizer module.
136+
* In this sample, we only listen onDetectedQuadsReceived or onNormalizedImagesReceived generated by Dynamsoft Document Normalizer module.
137137
* */
138138
let resultReceiver = router.addResultReceiver({
139139

@@ -146,11 +146,11 @@ export function Scanner() {
146146
//...
147147
}
148148
},
149-
})
149+
});
150150

151151
/**
152152
* Open the camera when the component is mounted.
153-
* Please remember request camera permission before it.
153+
* Please remember to request camera permission before it.
154154
* */
155155
camera.open();
156156

@@ -162,7 +162,7 @@ export function Scanner() {
162162

163163
return () => {
164164
//Remove the receiver when the component is unmounted.
165-
router.removeResultReceiver(receiver);
165+
router.removeResultReceiver(resultReceiver);
166166

167167
//Close the camera when the component is unmounted.
168168
camera.close();
@@ -182,13 +182,13 @@ export function Scanner() {
182182

183183
## Customize the Document Scanner
184184

185-
If you want to detect document boundary and adjust the boundary manually, you can `startCapturing` with `EnumPresetTemplate.PT_DETECT_DOCUMENT_BOUNDARIES` template. The `DetectedQuadsResult` will then be received through the `onDetectedQuadsReceived` callback. You case use the [Editor component](./DetectAndDeskewDocument/src/Editor.tsx) to learn how to draw `DetectQuadResult` on the original image and and interactively edit the quads.
185+
If you want to detect document boundary and adjust the boundary manually, you can `startCapturing` with `EnumPresetTemplate.PT_DETECT_DOCUMENT_BOUNDARIES` template. The `DetectedQuadsResult` will then be received through the `onDetectedQuadsReceived` callback. You can use the [Editor component](./DetectAndDeskewDocument/src/Editor.tsx) to learn how to draw `DetectQuadResult` on the original image and interactively edit the quads..
186186

187187
The full sample code is available [here](./DetectAndDeskewDocument).
188188

189-
## Run the project
189+
## Run the Project
190190

191-
Go to your project folder, Open a _new_ terminal and run the following command:
191+
Go to your project folder, open a _new_ terminal and run the following command:
192192

193193
### For Android
194194

@@ -200,7 +200,7 @@ npm run android
200200
yarn android
201201
```
202202

203-
### For IOS
203+
### For iOS
204204

205205
#### Signing
206206

@@ -215,14 +215,14 @@ npm run ios
215215
yarn ios
216216
```
217217

218-
If everything is set up _correctly_, you should see your new app running in your device.
218+
If everything is set up _correctly_, you should see your new app running on your device.
219219
This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
220220

221-
## How to use the new architecture of React Native (Optional)
221+
## How to Use the New Architecture of React Native (Optional)
222222

223223
[How to enable new architecture in Android](https://reactnative.dev/architecture/landing-page#android)
224224

225-
[How to enable new architecture in IOS](https://reactnative.dev/architecture/landing-page#ios)
225+
[How to enable new architecture in iOS](https://reactnative.dev/architecture/landing-page#ios)
226226
> Note:
227227
>
228228
> If you enable new architecture and want to run Android via `Windows`, You may encounter some build errors due to the `Windows Maximum Path Length Limitation`.

0 commit comments

Comments
 (0)