Gradient based dominant motion estimation with integral projections for real time video stabilisation