Practical example of OpenCV AI algorithms in C++

I would like to learn how to write AI algorithms to analyze videos using OpenCV and C++ (I’m open to implementing other needed libraries but that’s the base I’m starting with).

My goal is to write a simple tracking algorithm on my own, so I’m looking for some nice examples of AI-based image processing, analyzing, or on-run detection implementations. I’m aware of OpenCV build-in implementations of some tracking algorithms, but they are a little too complex and badly described for me - I try to understand them either way but would prefer a better method. I think my first milestone is to create a TLD-like algorithm that catches images and learns to recognize them from live video. I would like to learn how to create algorithms that would learn and improve on runtime, also I’m working on device that’s have better GPUs compatibilities than CPUs so implementations that take advantage of that would be nice, but I’m just starting with AI in CV so I understand if I should maybe start from something easier.

I’m looking for more practical examples or tutorials, not some many pages thesis with no code at all. I’m more of a visual person - pictures explaining how things work and visualization of steps (inner workings) of algorithms would be great for me.

Any hints on how to approach the topic?