Regardless of the measurement conditions, the degradation of the image quality due to a vibrational error magnetic field, which is generated by the vibration of the mechanical structure of an MRI apparatus, is reduced. In order to do so, error magnetic field image data indicating an error magnetic field distribution is acquired on the basis of an echo signal measured using a pulse sequence having a test gradient magnetic field, a parameter value of a damped vibration function showing a vibrational error magnetic field is calculated using the error magnetic field image data, and a correction magnetic field is calculated on the basis of the calculated parameter value of the damped vibration function showing the vibrational error magnetic field.