A demo that demonstrates techniques for scanning barcodes from a distance (ROI, zoom and resolution tuning) using the Dynamsoft Barcode Reader (JavaScript edition).
index.html— demo page (camera + UI).ReadDistantBarcodes.json— example configuration used by the sample.
- Camera/ROI/decoder tuning for distant targets
- Example configuration for resolution and ROI adjustments
- The demo adjusts camera resolution and ROI to favor distant targets, and exposes decoder parameters to improve detection at smaller apparent sizes.
- The sample shows common trade-offs and provides an example JSON to reproduce settings.
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 a tripod or stable mount for distant scanning.
- Increase camera resolution and narrow ROI to target likely barcode areas.
- Serve on localhost/HTTPS to enable camera access.
- For production, pair software tuning with suitable optics/camera hardware.