Commit Graph

41 Commits (thrimbletrimmer-solid)

Author SHA1 Message Date
Mike Lang aebbb603fc bus_analyzer: use 0.1s before the end timestamp, not the exact end
Mike Lang dc291d4e64 bus_analyzer: check for new segments more often
to lower latency
Mike Lang 5db7bcda71 bus_analyzer: use last frame of segment, not first
Christopher Usher 8a0ca215cf Updated colour of the dawn sky and dashboard to observed value
Christopher Usher 64f5873b3b Bug fixed
Christopher Usher 656be6c292 Allow for masking digits
Christopher Usher 87b27582c4 Updated colours to observed values
Mike Lang 1956063c67 upgrade to alpine 3.19
- gets us a slightly newer ffmpeg with more transitions
- requires deleting the EXTERNALLY_MANAGED flag file that makes pip not work
Mike Lang bad4f55cab upgrade to alpine:3.18
Mike Lang 6b1989ec4c Revert "Instead of backport libraries, just upgrade to alpine 3.20 (python 1.12)"
and the later attempts to make it work
Mike Lang ca6f589e30 but only AFTER installing pip
Mike Lang cf9cd114ed Stop pip from refusing to work inside our containers
Mike Lang 9960accc0f Instead of backport libraries, just upgrade to alpine 3.20 (python 1.12)
Mike Lang fb8d90f47c Update comment
Christopher Usher 69b2837b84 Change to 1080p pixel coords
Christopher Usher b792b1b555 Now use a sky pixel and a dashboard pixel to determine time-of-day
Can now also identify the score screen

Colours and pixel localtions have been updated for this years stream in
720p but changing to 1080p is a trivial change
Mike Lang 16d11c02bd hacky resize of old odo-last-digit prototypes
They're very time consuming to create, and the bad frame rate makes it harder
as some animation frames get skipped.
Mike Lang 557f8c7f7d fixup coords
Mike Lang 2d2f915a7f New prototypes for 2024 buscam
Mike Lang c1d85863bd pixel coordinates for 2024 buscam
Mike Lang 3606fadaa8 Pin gevent version to work around build issues
Seeing the following error on latest versions of gevent:

 Traceback (most recent call last):
   File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
     return _run_code(code, main_globals, None,
   File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
     exec(code, run_globals)
   File "/usr/lib/python3.9/site-packages/zulip_bots/schedulebot.py", line 2, in <module>
     import gevent.monkey
   File "/usr/lib/python3.9/site-packages/gevent/__init__.py", line 72, in <module>
     from gevent._hub_local import get_hub
   File "/usr/lib/python3.9/site-packages/gevent/_hub_local.py", line 150, in <module>
     import_c_accel(globals(), 'gevent.__hub_local')
   File "/usr/lib/python3.9/site-packages/gevent/_util.py", line 148, in import_c_accel
     mod = importlib.import_module(cname)
   File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
     return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'gevent._gevent_c_hub_local'
Mike Lang b65203ce0e bus_analyzer: Parallelize and fix error handling
Mike Lang c5acfe3ae0 bus_analyzer: Fix listing segments to respect tombstones
Mike Lang 8ac6e71d48 bus_analyzer: Normalize brightness across all digits, not one by one
Mike Lang bd9e22bc1f Revert "bus_analyzer: blank is grey, not black"
This reverts commit 3e0280cf33.

Now that we look at all digits at once for normalization, blank is black
Mike Lang 3e0280cf33 bus_analyzer: blank is grey, not black
Mike Lang 01f93a798a bus_analyzer: Also determine time of day
Mike Lang 78c053000e Upgrade pip in order to make wheels work
Mike Lang 07c9c208cc improve clock OCR by explicitly looking for green pixels
Mike Lang be77f4ea14 bus_analyzer: Also record the clock
Mike Lang 2ae273a75c bus_analyzer: Parse the final odo digit
Mike Lang 907d1ba6f9 Add a blank prototype which invalidates the odo if matched
Mike Lang 19f169e750 bus_analyzer: Move prototypes into subdir and allow non-digits
Mike Lang 5e43446c92 bus_analyzer: Add a testing routine to check analyzer changes
Mike Lang a4eceea958 odo extraction: Look for digit y-level for all main digits together
They should all be at the same y level, and the extra data helps avoid traps
when the digit has few pixels (eg. a 1).
Mike Lang dbf9f5c8de bus_analyzer: Drop the odometer threshold so we don't reject things at night
Mike Lang e38d21fb61 bus analyser: add a frame extraction cli command
Mike Lang b6d71297c6 bus_analyzer: Make dockerfile work
Mike Lang f969921ae3 bus_analyzer: Import existing extractor code and get it working
This was worked on out-of-repo for a while. But now it's ready to be integrated.
Mike Lang 9e988c0d43 Add a "prototype" of each odometer digit
This is an averaged, normalized version of a number of examples of each digit in the odometer.
It does not include the last digit which looks different.

These prototypes are used to recognize the digits in buscam data.
Mike Lang 76daceff19 bus_analyzer: initial implementation