This is a function known as tracking. You need software in which you can assign tracking points to different parts of your subject, then run an analysis pass to determine the tracking path. Then, you apply that path to something else, like a circle.
I've used After Effects for this - it will do it, as will most other advanced compositing software. But my experience is with AE.
Possibly the freeware version of Davinci Resolve does this? They keep adding stuff to it. Worth checking out.
From the upper left corner of the U.S.
Photos, Video & Pano r us.
College and workshop instructor in video and audio.
70D, Sigma 8mm, Tokina f2.8 11-16, Canon EF-S f2.8 17-55, Sigma f2.8 50-150 EX OS, Tamron 150-600VC. Gigapan Epic Pro, Nodal Ninja 5 & R10.