Image processing tools and phase retrieval algorithms