Linear algorithms for phase retrieval in the Fresnel region