Skip to content

Commit dbc4e73

Browse files
committed
Update README.md
1 parent 473f189 commit dbc4e73

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

5.others/debug/README.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,53 @@ This sample is designed to:
44

55
1. Print detailed logs in the browser console to better assist in troubleshooting.
66
2. Check if your device and browser are compatible with the camera and to what extent.
7-
3. Collect video frames for analysis.
7+
3. Collect video frames for analysis. (Require to host the sample locally)
88

9-
*Quick Debug*: [https://dynamsoft.github.io/barcode-reader-javascript-samples/5.others/debug/public/index.html](https://dynamsoft.github.io/barcode-reader-javascript-samples/5.others/debug/public/index.html)
9+
You can directly debug 1 and 2 in this link: [https://dynamsoft.github.io/barcode-reader-javascript-samples/5.others/debug/public/index.html](https://dynamsoft.github.io/barcode-reader-javascript-samples/5.others/debug/public/index.html)
10+
11+
Item 3 we will introduce in detail.
1012

1113
## Collect the video frames for analysis
1214

13-
When you encounter unreadable barcodes via a video input, you can use this sample to take a few sample frames to share with the Dynamsoft Support Team for debugging purposes.
15+
Barcode reading is a one-time job, the application either succeeds or fails to read the barcode(s). For the failed cases, it's possible to make them successful by adjusting some of the many settings provided by the Dynamsoft Barcode Reader JavaScript SDK (hereafter called "the library"). However, adjusting the settings could be a bit overwhelming for the users. Therefore, Dynamsoft provides this debug sample which allows a user to collect runtime video frames to be sent to the Dynamsoft Team. Since these frames represent the actual usage scenario, the team can test them to see how the settings can be optimized to best process them.
16+
17+
The following shows how to host the sample and collect frames.
18+
19+
### Download the sample
20+
21+
The sample can be downloaded from
1422

15-
Since the video is usually playing on mobile devices, having these frames uploaded to a self-hosted local server is most convenient, the following shows how to use the sample.
23+
<a target_="blank" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/tree/main/5.others/debug" alt="Debug Sample on GitHub">Debug Sample on GitHub</a>
24+
25+
Note that the entire folder is required. To download only the files in this folder, try using "https://downgit.github.io/#/home".
1626

1727
### Set up a local server
1828

29+
Since the video is usually playing on mobile devices, having these frames uploaded to a self-hosted local server is most convenient, therefore, we first need to set up a local server.
30+
1931
We make use of the web server that comes with [Express](https://expressjs.com/).
2032

21-
### Install Express
33+
* Install dependencies
2234

23-
Run the following script to install Express.
35+
Run the following script to install all dependencies.
2436

2537
`npm install`
2638

27-
### Start the server
39+
* Start the server
2840

2941
We defined the web server logic in the file "app.js", to start it, run the following script:
3042

3143
`node app.js`
3244

33-
Note that we have enabled SSL on this server at the port 4443.
45+
Note that we have used self-signed certificates to enable SSL on the port 4443.
3446

3547
### Use the sample page
3648

3749
Once the server is up and running, open the page on the device that will do the barcode reading. The URL for the sample is "https://{your-local-ip}:4443/". For example, suppose your ip is 192.168.1.1, the site can be visited at [https://192.168.1.1:4443/](https://192.168.1.1:4443/).
3850

39-
> Note that the device should be in the same WiFi network as the server machine.
51+
> Note that the device should be in the same WiFi network as the server machine.
52+
53+
You will see a warning when you visit the page. This is caused by self-signing. Ignore and keep processing.
4054

4155
Click the button "show scanner" and try to read barcodes as you normally do, the frames will then be uploaded to the folder "debug\public\collect" as images (.png) on the server. When you have collected enough frames, don't forget to turn off the scanner, otherwise, new frames will continue to flood in.
4256

0 commit comments

Comments
 (0)