Imaging and velocity analysis by target-oriented wavefield inversion