A C++ video tracking library that runs on a CPU
Sky Tracker is a C++17 library for following targets through video. Give it a box, from an operator click or your own detector, then call update() on every frame: it returns the target's centre, box, speed and state in 1.4 to 3 ms per 1080p frame on one CPU core. No GPU, no cloud, no network at runtime.
Where OpenCV's trackers let go
Same clip, same start box: an FPV camera chases a racing quad into a building. CSRT, KCF and MOSSE lose it and MIL ends up on the wall. Sky Tracker's correlation profile stays on it, at 4.3 ms a frame.
The full comparisonruns every tracker on 242 labelled clips.
Link it, lock on, update
cmake_minimum_required(VERSION 3.16)project(my_app LANGUAGES CXX)set(CMAKE_CXX_STANDARD 17)find_package(sky_tracker REQUIRED)add_executable(my_app main.cpp)target_link_libraries(my_app PRIVATE sky_tracker::sky_tracker)#include <sky_tracker/sdk.hpp>namespace st = sky_tracker::sdk;st::Tracker tracker("correlation");// Point at your own frame buffer: no copy for Gray8 or Bgr8.st::FrameView frame;frame.data = capture.pixels();frame.width = capture.width();frame.height = capture.height();frame.format = st::PixelFormat::Bgr8;// The first box comes from an operator click or your detector.tracker.lock(frame, st::Rect{x, y, w, h});while (capture.grab()) { const st::TrackResult r = tracker.update(frame, dtSeconds); panTilt.drive(r.centerX - frame.width / 2.0f, r.centerY - frame.height / 2.0f);}The docs cover the C++, Python and Node.js SDKs and the command line, including how to drive a pan-tilt head through brief occlusions.
What you get
One header
sdk.hpp is the whole public API, with no OpenCV types in it. A static library and a CMake package: find_package(sky_tracker).
Your frames, no copy
Pass Gray8, Bgr8 or Rgb8 buffers straight from your capture code. update() is synchronous: no hidden threads in your control loop.
Three profiles
default for small, fast targets in the sky; correlation for any target, with an optional 1.8 MB neural check; legacy-adaptive, the 0.2.x adaptive-quality tracker.
Several targets
MultiTracker follows several selected targets with stable IDs, and keeps two boxes from claiming the same object when targets cross.
Same core everywhere
The Python package, the Node.js package and the command-line tool run this same library, so results match across languages.
Offline licence
A licence key is checked on the device. Nothing contacts a network at runtime, and one key covers every device.
Speed
| Profile | 1920×1080 | 1280×720 | 640×512 |
|---|---|---|---|
default | 150 fps | 410 fps | 1,000 fps |
correlation | 170 fps | 220 fps | 1,000 fps |
correlation with ML | 56 fps | 67 fps | 100 fps |
legacy-adaptive | 75 fps | 57 fps | 290 fps |
Frames per second through the whole pipeline, video decoding included, one target, on an Apple M3 Pro with no GPU. Runs vary by about ±15%. The tracker's own update takes 1.4 ms (default) and 3 ms (correlation) per 1080p frame. Details in thepublished benchmarks.
Platforms
- Windows x64, macOS on Apple silicon, and Linux x86_64 and ARM64.
- NVIDIA Jetson Nano and TX2 (JetPack 4.6): a C++ package that ships its own OpenCV 4.12.
- Raspberry Pi 4 and 5 with a 64-bit OS, and Jetson Orin on JetPack 6: the ARM64 Python wheels.
- Python 3.10 to 3.13 wheels on PyPI, a Node.js package, and a command-line tool.
The speeds above are desktop figures. We have not yet timed Raspberry Pi or Jetson boards, so measure on your device at the resolution you need.
Questions
Does it need OpenCV?
Yes, OpenCV 4 with the core, imgproc and video modules, plus dnn (4.7 or later) for the ML option. The public header carries no OpenCV types, but a static library links against one OpenCV build, so tell us which version you use and we build to match.
Does it detect objects?
No. It tracks a target you select: from an operator click, a radar or telemetry cue, or a box from your own detector. Once locked, it follows the target without running a detector on every frame.
Is it thread-safe?
Each Tracker is used by one thread at a time. Give every camera or thread its own instance; they share nothing.
Does it need a GPU?
No. Every profile runs on one CPU core. The ML option runs its small neural network on the CPU too.
How is it licensed?
One-time licences: Personal for individuals (non-commercial), Commercial for companies, including shipping it inside your own products, royalty-free. Every device and every 1.x update. Students get a free one-year licence. Source code or a site licence: email us.
Try it on your own footage
The free desktop demo tracks ten seconds of any video with every profile, on macOS, Windows and Linux.