feat: LCD kit (segment digits, bars, fonts)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
rickzkmandClaude Sonnet 5.5 committed 2026-10-22 13:17:44 +02:00
1 parent afd649acc5
commit 36e01c4b1c
11 files changed
+448

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
import numpy as np
from PIL import Image
def count_colour(img: Image.Image, colour, box=None) -> int:
"""Number of pixels of `colour` in `img` (optionally only inside `box`)."""
if box is not None:
img = img.crop(box)
return int((np.asarray(img.convert("RGB")) == np.array(colour)).all(axis=2).sum())