The goal of phase retrieval is to extract the phase of an optical wave field from intensity measurements. The transport-of-intensity equation (TIE)-based method is a popular deterministic solution and has been applied in various fields such as optical microscopy, electron microscopy, and x-ray imaging. For macro-imaging, a camera is often used to capture the images, and thus the phase modulation of the lens should be considered. A new formulation is proposed to extend TIE for phase retrieval in a lens-based wave propagation model. To obtain the defocus step, a data-collection-reading device is designed by equipping a camera with a micrometer caliper. Simulation and real experiments are conducted to test the proposed method.