1. A method, stored in a memory and executing on a processor, for compensating for ghosts in a computed seismic image based on a reverse time migration (RTM) of seismic data, said method comprising: obtaining the seismic data acquired with one or more seismic sources and one or more seismic receivers placed to explore an underground formation; modifying a first boundary condition of a first RTM acoustic wave equation associated with a source wavefield; modifying a second boundary condition of a second RTM acoustic wave equation associated with a recorded wavefield; solving said first RTM acoustic wave equation and said second RTM acoustic wave equation and generating a ghost compensated computed seismic image; and displaying said ghost compensated computed seismic image as a structural representation of the underground formation.