supervision/examples
Jirka Borovec 16814acff3
feat(utils): add `TkImageWindow` to unblock switch to `opencv-python-headless` (#2320)
- Added `sv.ImageWindow`, a Tkinter/Pillow-based desktop image viewer with BGR, grayscale, and BGRA support, keyboard polling, left-click callbacks, context-manager usage, window-state checks, and clean close handling
- Added responsive image resizing with optional aspect-ratio preservation and correctly mapped mouse coordinates after scaling or letterboxing
- Updated compatible runnable examples to use `sv.ImageWindow`, while retaining OpenCV display APIs for worker-thread streaming examples that are incompatible with Tkinter
- Improved `sv.cv2_to_pillow` to support grayscale and BGRA images
- Updated webcam guidance to clarify capture ownership and explicit `VideoCapture` cleanup
- Fixed image-window event handling to prevent stale keypresses, ghost windows, close-time races, and blocked waits after the window closes

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-07-15 15:06:55 +02:00
..
compact_mask Optimize mask annotation ROI blending (#2368) 2026-07-01 15:55:21 +02:00
count_people_in_zone feat(utils): add `TkImageWindow` to unblock switch to `opencv-python-headless` (#2320) 2026-07-15 15:06:55 +02:00
heatmap_and_track chore: port example typing refinements (#2358) 2026-06-27 09:08:54 +02:00
speed_estimation feat(utils): add `TkImageWindow` to unblock switch to `opencv-python-headless` (#2320) 2026-07-15 15:06:55 +02:00
time_in_zone feat(utils): add `TkImageWindow` to unblock switch to `opencv-python-headless` (#2320) 2026-07-15 15:06:55 +02:00
tracking chore: update `mdformat` hook arguments to disable wrapping (#2307) 2026-06-09 16:15:05 +02:00
traffic_analysis feat(utils): add `TkImageWindow` to unblock switch to `opencv-python-headless` (#2320) 2026-07-15 15:06:55 +02:00
README.md Chore CI by adding checks for links and references (#2113) 2026-02-02 17:01:19 +01:00

README.md

Examples

Here, you'll find end-to-end examples that show how to solve common computer vision problems using Supervision.

For more information and examples, visit our documentation and explore our how-to guides and cookbooks. Join our Discord and meet other Supervision power users!