You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,15 @@ This repository contains multiple samples that demonstrate how to use the [Dynam
8
8
9
9
- Dynamsoft Barcode Reader (DBR), Dynamsoft Document Normalizer (DDN), and Dynamsoft Label Recognizer (DLR) play crucial roles in reading barcodes, structures, and texts from images.
10
10
- 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.
|[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. |
20
20
21
21
### How to build and run a sample
22
22
@@ -54,7 +54,7 @@ npm install
54
54
55
55
3. Prepare iOS
56
56
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:
58
58
59
59
```bash
60
60
cd ios
@@ -89,7 +89,7 @@ npm run ios
89
89
yarn ios
90
90
```
91
91
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.
93
93
This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
94
94
95
95
> Note:
@@ -102,7 +102,7 @@ This is one way to run your app — you can also run it directly from within And
102
102
103
103
[How to enable new architecture in Android](https://reactnative.dev/architecture/landing-page#android)
104
104
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)
106
106
> Note:
107
107
>
108
108
> 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`.
> - 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.
255
255
256
-
### Specify the scan region
256
+
### Specify the Scan Region
257
257
258
258
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.
259
259
@@ -271,9 +271,9 @@ let scanRegion = {
271
271
camera.setScanRegion(scanRegion);
272
272
```
273
273
274
-
## Run the project
274
+
## Run the Project
275
275
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:
277
277
278
278
### For Android
279
279
@@ -285,7 +285,7 @@ npm run android
285
285
yarn android
286
286
```
287
287
288
-
### For IOS
288
+
### For iOS
289
289
290
290
#### Signing
291
291
@@ -300,14 +300,14 @@ npm run ios
300
300
yarn ios
301
301
```
302
302
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.
304
304
This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
305
305
306
-
## How to use the new architecture of React Native (Optional)
306
+
## How to Use the New Architecture of React Native (Optional)
307
307
308
308
[How to enable new architecture in Android](https://reactnative.dev/architecture/landing-page#android)
309
309
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)
311
311
> Note:
312
312
>
313
313
> 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`.
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
128
128
const router =CaptureVisionRouter.getInstance(); //Get the singleton instance of CaptureVisionRouter
129
129
130
130
useEffect(() => {
@@ -133,7 +133,7 @@ export function Scanner() {
133
133
134
134
/**
135
135
* 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.
137
137
* */
138
138
let resultReceiver =router.addResultReceiver({
139
139
@@ -146,11 +146,11 @@ export function Scanner() {
146
146
//...
147
147
}
148
148
},
149
-
})
149
+
});
150
150
151
151
/**
152
152
* 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.
154
154
* */
155
155
camera.open();
156
156
@@ -162,7 +162,7 @@ export function Scanner() {
162
162
163
163
return () => {
164
164
//Remove the receiver when the component is unmounted.
165
-
router.removeResultReceiver(receiver);
165
+
router.removeResultReceiver(resultReceiver);
166
166
167
167
//Close the camera when the component is unmounted.
168
168
camera.close();
@@ -182,13 +182,13 @@ export function Scanner() {
182
182
183
183
## Customize the Document Scanner
184
184
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..
186
186
187
187
The full sample code is available [here](./DetectAndDeskewDocument).
188
188
189
-
## Run the project
189
+
## Run the Project
190
190
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:
192
192
193
193
### For Android
194
194
@@ -200,7 +200,7 @@ npm run android
200
200
yarn android
201
201
```
202
202
203
-
### For IOS
203
+
### For iOS
204
204
205
205
#### Signing
206
206
@@ -215,14 +215,14 @@ npm run ios
215
215
yarn ios
216
216
```
217
217
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.
219
219
This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
220
220
221
-
## How to use the new architecture of React Native (Optional)
221
+
## How to Use the New Architecture of React Native (Optional)
222
222
223
223
[How to enable new architecture in Android](https://reactnative.dev/architecture/landing-page#android)
224
224
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)
226
226
> Note:
227
227
>
228
228
> 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