Spatio-temporal constraints for on-line 3D object recognition in videos