Skip to content

Add adjustable wheel crops with a live preview - #95

Merged
oleost merged 4 commits into
oleost:betafrom
grandalos:wheel-crops-preview
Dec 4, 2026
Merged

oleost merged 4 commits into
oleost:betafrom
grandalos:wheel-crops-preview

Conversation

@grandalos

Copy link
Copy Markdown

Why

On my water meter under infrared illumination, the wheel reader sometimes confused a 2 with a 7 on one of the fractional wheels. On the frames I tested, adjusting that wheel’s crop helped keep dividers and neighboring digits out of the model input.

What changed

  • Add optional per-wheel crop bounds for mechanical counters in the setup wizard and sensor settings. A wheel uses its existing equal-width field until its crop is customized.
  • Show the selected wheel’s outline and an enlarged crop that update as you edit the bounds. Both views use the same camera frame until you refresh it, so it’s easy to see exactly what each edit changes.
  • Use the saved crops in the wheel reader, previews, and benchmarks, and carry them through sensor export and import.

I tried to keep the visual design consistent with VisionState’s existing interface. If you think anything about the layout or interaction should change, please let me know. I’m happy to adjust it.

Verification

  • Tried the crop settings on my water meter in Home Assistant under IR.
  • On beta, ran Ruff, Pyright, the frontend checks and build, and the reading, pointer-dial, reading-export, and documentation test suites (172 passed).
  • Ran the mechanical-counter wizard and live crop preview end-to-end tests on desktop Chromium, the Android profile, and iPhone WebKit (six passed).

@grandalos

Copy link
Copy Markdown
Author

this is how my meter wheels looks like

meter

and how I had to adjust it to be readable 99% of time

meter2

oleost and others added 2 commits December 4, 2026 18:45
Why a crop per wheel in SCOPE, the new component and endpoint in ARCHITECTURE,
a pointer from the wheel reader plan, when to use the crops in DOCS. A sensor's
export carries the crops and fewer wheels than a crop's wheel is refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oleost
oleost merged commit 42dd230 into oleost:beta Dec 4, 2026
6 checks passed
@oleost

oleost commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Thanks! Merged into beta. I added a few lines of docs (DOCS.md and the design notes) and a test that the crops survive export/import and are kept when the number of digits doesn't match. It will be in the next beta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants