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.
index.html— main demo page (camera + image/file input UI)SampleVIN.jpg— example image with a VIN barcode (or you can use your own test image)read_vin.json— JSON template used by the sample.
- Decode VIN barcodes from camera or static image (common 1D/2D formats used for VIN encoding)
- Validate VIN length/characters and show parsing/validation results
- Simple UI for testing images, camera input, and parsing rules
- The demo initializes the barcode reader and captures either a selected image or live video frames from the camera.
- 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.
Opening HTML files directly may not work as expected. Instead, run a local development server. Here’s a quick method using Visual Studio Code:
-
Install the Five Server extension from the VS Code Marketplace.
-
Right-click on
index.htmland select "Open with Five Server".
- Use high-resolution images or a higher camera resolution for reliable decoding and parsing.
- If a barcode isn't found, try cropping the image to the VIN region or increase camera resolution.
- VIN validation: the demo checks for 17 characters and excludes I, O, Q characters which are not used in VINs.
- Serve via localhost or HTTPS to enable camera access.
- Replace the included trial/demo license with a valid Dynamsoft license for extended evaluation.
- See the repository root
README.mdfor running instructions and API documentation.