Scene 01: CVKit Template Tracking¶
Script¶
Goal¶
Use IM Player + CVKit Template Match + CVKit Tracking to keep a target locked in video, then convert tracking motion into smooth TCode output.
Main Pipeline¶
IM Player -> CVKit Template Match -> CVKit Tracking -> Python Script (Tracking -> XY) -> Envelope/Filter/Map -> TCode -> Serial Out
Steps¶
- Import the script and start required services (
IM Player,CVKit Template Match,CVKit Tracking,PyEngine). - Select your source video in
IM Playerand verifyvideoShmNameis propagated downstream. - Ensure
CVKit Template Match.shmNameandCVKit Tracking.shmNameare identical. - Keep the control link
CVKit Tracking.isNotTracking -> CVKit Template Match.activeto avoid repeated re-init. - Verify numeric flow through
Tracking -> XYandEnvelope -> 1EUR Filter -> Range Map -> Rate Limiter. - Configure serial settings and enable
Serial Out; useTrack VizandWave Vizfor monitoring.
Key Parameters¶
Tick.tickMs:50(overall update cadence)TCode.intervalMs:50(keep aligned with Tick)Range Map.outMax:0.7(output ceiling)Serial Out.port:COM4in sample (change to your actual device)
Validation¶
CVKit Trackingcontinuously emitstracking.Wave Vizis smooth, without major spikes.TCodeandSerial Outstream continuously;Track Vizmatches expected tracking behavior.
Image Placeholders¶
docs/media/images/scenarios/scene-01-overview.pngdocs/media/images/scenarios/scene-01-tracking.png