When correcting the acoustic wave refraction occurring on the interface between mediums having different sound speeds by Snells law, an applicable back-projection method is limited to a time domain method. An image data generating method performed to receive and convert an acoustic wave generated by irradiating a subject with light into a first electrical signal with an acoustic wave receiver via a medium having a sound speed different from that of the subject, and to generate image data based on the first electrical signal is provided, wherein a second electrical signal obtained when the acoustic wave is received at each virtual reception point is generated based on the first electrical signal through an integral calculation performed by using an advanced Greens function, and image data is generated based on the second electrical signal.