|
| 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. |
0 commit comments