On the stability of some imaging functionals