fix: restore reliable authenticated live recognition
This commit is contained in:
parent
0e23425ef0
commit
934615b593
40 changed files with 2556 additions and 820 deletions
|
|
@ -276,6 +276,36 @@ class TagPassIntegrationTests(unittest.TestCase):
|
|||
self.assertNotIn("price_tag", result["tracks"][0])
|
||||
engine.shutdown()
|
||||
|
||||
def test_a_panned_shelf_reusing_the_screen_row_is_planned(self):
|
||||
"""The same screen row on a shelf that has moved is a new rail."""
|
||||
session, engine, _ = self.make_tagged_session()
|
||||
session._tags.settings.pass_interval_frames = 0
|
||||
session._tags.settings.settle_observations = 1
|
||||
session._tags.settings.settle_passes = 1
|
||||
|
||||
class Panned:
|
||||
def __init__(self):
|
||||
self.calls = 0
|
||||
|
||||
def register(self, image):
|
||||
self.calls += 1
|
||||
# Content moved up 400 px, so the frame origin moves down the shelf.
|
||||
return (0.0, -400.0) if self.calls == 2 else (0.0, 0.0)
|
||||
|
||||
session._shift_map = Panned()
|
||||
process(session, 1)
|
||||
time.sleep(0.05)
|
||||
before = session._tags.stats()["passes_run"]
|
||||
self.assertGreaterEqual(before, 1)
|
||||
process(session, 2)
|
||||
time.sleep(0.1)
|
||||
self.assertGreaterEqual(session._frame_origin[1], 400.0)
|
||||
self.assertGreater(
|
||||
session._tags.stats()["passes_run"], before,
|
||||
"a shelf 400 px away reuses screen row 0 and must be read again",
|
||||
)
|
||||
engine.shutdown()
|
||||
|
||||
|
||||
class FramePipelineTests(unittest.TestCase):
|
||||
def test_latest_frame_wins_and_drops_are_counted(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue