Low-Latency GPU Motion Tracking (C++/CUDA/OpenCV) - Test 2

Low-Latency GPU Motion Tracking (C++/CUDA/OpenCV) - Test 2

Brandon Castellano

55 лет назад

13,974 Просмотров

Test 2 of my GPU-based motion tracking program, on a scene from The Shining. This test used a variable number of keypoints again, but with a fairly large search area. While slower than test 1, the response times were still in the low-order millisecond range, and achieved a better speedup versus the CPU.

Using C++, CUDA, and OpenCV (used for video input/output), I created a motion tracking program that works similar to the h.264 motion vector search algorithm, but is heavily parallelized to run on a graphics card. It runs about 40 times faster for a larger search size (16x16 match area, 64x64 search window) as compared to the serial CPU algorithm.

In the above video, the GPU algorithm managed a worst-case latency of just under 8ms (or over 125 FPS *minimum*), whereas the CPU-based algorithm had a worst-case latency of over 250ms (a mere 4 FPS).

The algorithm works similar to the last video, using thresholds between a reference frame, the last tracking point's location, and the current frame to determine the keypoint's new location (full-search, sum of absolute differences of each pixel).

With a constrained search window of 48x48 with 16x16 reference blocks and 64 keypoints, I can get around 4ms average latency (250 FPS).

Test were run with an Intel i7 2600k @ 4.0 GHz (8GB DDR-1866) and a Nvidia GeForce 560 Ti.

Тэги:

#motion-tracking #opencv #c++ #cuda #gpu #Computer
Ссылки и html тэги не поддерживаются


Комментарии: