I am working on a tracking solution that needs to run in real time. So far ive been developing image tracking which works fine (aside from some performance and accuracy issues). However, in order to track an object, I need to use SLAM. From what ive read so far, I need to use the features2D algorithms to collect keypoints from different angles and camera positions, and use them to build a 3D map of the object itself. I understand how to collect keypoints from a frame, but how do i figure out the angle at which the camera is positioned? I first thought of using the gyroscope, but that is not always available, and not really accurate. Ive been searching for source code regarding SLAM and a more detailed (practical) documentation on SLAM but i cant find anything. There is no example code anywhere. Any documentation i find talks more about the math and theory behind using slam instead of actually using slam.