Files
csaxs_bec/tests
Mirko HollerandClaude Sonnet 5 6bf4f3e716 feat(vision): add per-camera ROI cropping to VisionInterface
set_roi()/get_roi() (plus a roi constructor argument -- a single tuple for
every configured camera, or a per-camera-name mapping) crop a camera's frame
to (x, y, width, height) before any mode processing, publishing, or scoring
happens. Applied centrally in _get_camera_frame(), the one method both
get_raw_frame() and get_last_processed_image()/refresh() go through, so
SampleVisionMonitor.save_reference()/score() pick it up automatically with
no changes needed there -- both already call get_raw_frame(), never the
camera directly. An out-of-bounds ROI raises VisionInterfaceError rather
than silently clamping.

New vision_toolkit.crop_to_roi() is the underlying pure-function primitive.

Also declares device_manager explicitly in VisionInterface's own __init__,
same bug and fix as SampleVisionMonitor's previous commit -- the device
server never injected it into either class before.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C9zgK28uPoZWJFkJWV4P1G
2026-09-06 20:14:28 -03:00
..
2026-06-24 12:55:32 +02:00