23 lines
1.2 KiB
Markdown
23 lines
1.2 KiB
Markdown
# qrcode (CameraPreview)
|
||
|
||
Webcam QR-code experiments in C# with OpenCvSharp and ZXing. The camera reads QR codes that point to images, and the program overlays each image onto the code in perspective, so it acts like a simple AR marker.
|
||
|
||
| Folder | What it does |
|
||
|---|---|
|
||
| `qrCamera/` | Opens `/dev/video0` at 1280×720/60 fps, detects QR codes, downloads the image each one links to (cached in `cache/`) and draws it over the code. |
|
||
| `qrCameraAI/` | Rewritten version with tracking: it remembers each code's corners between frames (`TrackedQr`) so the overlay stays stable, and warps the image onto the quad with a perspective transform. |
|
||
| `createqrcodes/` | Makes one QR code per file in `assets/` (with `qrencode`), each pointing to that file's raw URL in this Gitea repo. Output goes to `qr/`. |
|
||
| `assets/` | Images that the QR codes point to. |
|
||
|
||
## Make targets
|
||
|
||
```sh
|
||
make qr # build createqrcodes as a single file -> ./createqr
|
||
make run # run qrCamera
|
||
make runai # run qrCameraAI
|
||
make publish # self-contained publish of qrCamera (publishai for the AI one)
|
||
make clean
|
||
```
|
||
|
||
Requires .NET 10, a V4L2 webcam, OpenCV runtime libraries and `qrencode`.
|