Skip to content

Commit adb473f

Browse files
committed
add VIN sample folder
1 parent 815e55b commit adb473f

File tree

7 files changed

+56
-3
lines changed

7 files changed

+56
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ If you have any questions, feel free to [contact Dynamsoft support](https://www.
6464
- [show-result-texts-on-the-video/](./scenarios/show-result-texts-on-the-video/) — Overlay decoded text on live video while scanning.
6565
- [batch-inventory/](./scenarios/batch-inventory/) — Batch scanning workflow for inventory collection and export.
6666
- [read-a-drivers-license/](./scenarios/read-a-drivers-license/) — Demo for reading and parsing a driver's license image/data.
67+
- [read-vin/](./scenarios/read-vin/) — Demo for reading and parsing a VIN(vehicle identification number) code.
6768
- [read-and-parse-GS1-AI/](./scenarios/read-and-parse-GS1-AI/) — Example showing GS1 AI parsing and data extraction.
6869
- [scan-qr-code/](./scenarios/scan-qr-code/) — QR code targeted demo and settings.
6970
- [scan-common-1D-and-2D/](./scenarios/scan-common-1D-and-2D/) — Demo configured to detect a wide range of barcode formats.

index.html

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
</style>
3030
<!--
3131
For document, copy start from here
32-
search `href="frameworks` replace to `href="https://demo.dynamsoft.com/Samples/DBR/JS/frameworks`
3332
search `href="scenarios` replace to `href="https://demo.dynamsoft.com/Samples/DBR/JS/scenarios`
3433
-->
3534
<style>
@@ -1272,7 +1271,7 @@ <h3>
12721271
<!-- Scenario Samples -->
12731272
<div class="file">
12741273
<h3>
1275-
Scenario Samples <span class="sample-count">(16)</span>
1274+
Scenario Samples <span class="sample-count">(17)</span>
12761275
<a
12771276
class="button title readme-link section-readme-link"
12781277
href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/main/scenarios/README.md"
@@ -1454,6 +1453,17 @@ <h3>
14541453
></span
14551454
>
14561455
</div>
1456+
<div class="file">
1457+
<span data-balloon-length="large" data-balloon-pos="down" aria-label="Read the VIN(vehicle identification number) code and parse it."
1458+
><a class="button title demo-link" href="scenarios/read-vin/index.html" title="View live demo">Read VIN</a
1459+
><a
1460+
class="button title source-link"
1461+
href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/tree/main/scenarios/read-vin"
1462+
title="View source code on GitHub"
1463+
>Source</a
1464+
></span
1465+
>
1466+
</div>
14571467
<div class="file">
14581468
<span data-balloon-length="large" data-balloon-pos="down" aria-label="Example showing GS1 AI parsing and data extraction."
14591469
><a class="button title demo-link" href="scenarios/read-and-parse-GS1-AI/scan-using-rtu-api/index.html" title="View live demo"

scenarios/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ Included samples
1010
- [show-result-texts-on-the-video/](./show-result-texts-on-the-video/) — Overlay decoded text on live video while scanning.
1111
- [batch-inventory/](./batch-inventory/) — Batch scanning workflow for inventory collection and export.
1212
- [read-a-drivers-license/](./read-a-drivers-license/) — Demo for reading and parsing a driver's license image/data.
13+
- [read-vin/](./read-vin/) — Demo for reading and parsing a VIN(vehicle identification number) code.
1314
- [read-and-parse-GS1-AI/](./read-and-parse-GS1-AI/) — Example showing GS1 AI parsing and data extraction.
1415
- [scan-qr-code/](./scan-qr-code/) — QR code targeted demo and settings.
16+
- [scan-datamatrix-code/](./scan-datamatrix-code/) — DataMatrix code targeted demo and settings.
1517
- [scan-common-1D-and-2D/](./scan-common-1D-and-2D/) — Demo configured to detect a wide range of barcode formats.
1618
- [scan-common-2D-codes/](./scan-common-2D-codes/) — Focused on common 2D barcode formats decoding.
1719
- [scan-1D-Retail/](./scan-1D-Retail/) — 1D retail barcode tuning example.

scenarios/read-a-drivers-license/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A focused demo that decodes and parses barcode data from driver's license images
66

77
- `index.html` — main demo page (camera + image input UI).
88
- `SampleDriversLicense.jpg` — example license image.
9-
- `read_and_parse_dl.json`parsing template / configuration used by the sample.
9+
- `read_dl.json`JSON template used by the sample.
1010
- `style.css` — page styles.
1111

1212
## ✨ Features
File renamed without changes.

scenarios/read-vin/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# 🚗 Read a Vehicle Identification Number (VIN)
2+
3+
This focused demo decodes and parses VIN barcodes from vehicle images or live camera input. It shows how to extract structured VIN data and display results in a simple UI.
4+
5+
## Included files
6+
7+
- `index.html` — main demo page (camera + image/file input UI)
8+
- `SampleVIN.jpg` — example vehicle image with a VIN barcode (if not present, use your own test image)
9+
- `read_vin.json` — JSON template used by the sample. used by the sample
10+
11+
## Features
12+
13+
- Decode VIN barcodes from camera or static image (common 1D/2D formats used for VIN encoding)
14+
- Validate VIN length/characters and show parsing/validation results
15+
- Simple UI for testing images, camera input, and parsing rules
16+
17+
## How it works
18+
19+
- The demo initializes the barcode reader and captures either a selected image or live video frames from the camera.
20+
- When a barcode is detected, the raw text is displayed and validated against VIN rules (length 17, allowed characters). If a parsing template is available, parsed fields are shown alongside the raw VIN.
21+
22+
## Quick start
23+
24+
Opening HTML files directly may not work as expected. Instead, run a local development server. Here’s a quick method using [Visual Studio Code](https://code.visualstudio.com/):
25+
26+
1. Install the [Five Server extension](https://marketplace.visualstudio.com/items?itemName=yandeu.five-server) from the VS Code Marketplace.
27+
28+
2. Right-click on `index.html` and select "Open with Five Server".
29+
30+
## 💡 Tips
31+
32+
- Use high-resolution images or a higher camera resolution for reliable decoding and parsing.
33+
- If a barcode isn't found, try cropping the image to the VIN region or increase camera resolution.
34+
- VIN validation: the demo checks for 17 characters and excludes I, O, Q characters which are not used in VINs.
35+
36+
## Notes
37+
38+
- Serve via localhost or HTTPS to enable camera access.
39+
- Replace the included trial/demo license with a valid Dynamsoft license for extended evaluation.
40+
- See the repository root `README.md` for running instructions and API documentation.

scenarios/read-vin/SampleVIN.png

259 KB
Loading

0 commit comments

Comments
 (0)