Adding the code for dense trajectories.