1. A method, comprising: receiving a target image, wherein the target image is a distorted magnetic resonance image comprising distortions in y-coordinates of pixels of the target image based on application of phase encoding gradient pulse along a y-axis and frequency encoding gradient pulse along an x-axis in an interleaved fashion; receiving a reference image, wherein the reference image is an undistorted magnetic resonance image; selecting an image registration method for registering the target image to the reference image, wherein the image registration method uses an image transformation to reduce distortions, wherein the image transformation consists of modifying the y-coordinates of the pixels based on corresponding pixels of the reference image using a polynomial function; performing image registration of the target image with the reference image, wherein the image registration provides a plurality of optimized parameters of the image transformation; and generating a corrected image based on the target image and the plurality of optimized parameters of the image transformation.