Energy function behavior in optimization based image sequence stabilization in presence of moving objects