Initial barcode scanner webapp

Camera-based barcode scanner using ZXing for decoding. Requests wide
video (256x2048), rotates to landscape for decoding, applies contrast
boost and tries both HybridBinarizer and GlobalHistogramBinarizer.
Includes camera selector, manual/auto focus controls, and focus slider.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-21 23:41:23 +00:00
commit b98534214f
6 changed files with 615 additions and 0 deletions

25
Makefile Normal file
View File

@@ -0,0 +1,25 @@
DEST ?= dist
SRC = index.html app.mjs
.PHONY: all build deploy clean
all: build
node_modules/.package-lock.json: package.json
npm install
@touch $@
vendor/zxing.min.js: node_modules/.package-lock.json
@mkdir -p vendor
cp node_modules/@zxing/library/umd/index.min.js vendor/zxing.min.js
build: vendor/zxing.min.js
deploy: build
@mkdir -p $(DEST)/vendor
cp $(SRC) $(DEST)/
cp vendor/zxing.min.js $(DEST)/vendor/
clean:
rm -rf vendor dist