Visual odometry makes use of an image sequence to estimate the motion of a robot and optionally the structure of the world. The low-cost and small-size of cameras, combined with the high-information content of the images they capture make them ideal for robot platforms. The output of the algorithm is a 3D map of the environment as well as camera/robot trajectory suitable for mobile robots localization and navigation tasks. In this manuscript we explain visual odometry in all of its details, starting with the basic camera projection and ending with non-linear motion and structure refinement. We compare different approaches within this framework and show that relative orientation is superior to using absolute orientation for the pose estimation problem. Secondly, we introduce a novel track selection process that improves the fault tolerance of SBA to short baseline feature tracks.