Our purpose is to correct digital CCD-recorded Scheimpflug photographs, imaging both the anterior and posterior corneal surface, the anterior chamber, and the anterior eye lens surface for optical distortions. In a ray-tracing algorithm the imaging of the posterior corneal surface in a given Scheimpflug photograph is corrected by applying Snell's law on parallel incident rays entering through the anterior corneal surface. Once the posterior corneal surface is corrected, the procedure is repeated, again with parallel incident rays entering through both the anterior and now corrected posterior corneal surface, to correct the imaging of the anterior eye lens surface. The refractive indices necessary for Snell's law are taken from Gullstrand's exact schematic eye model. Due to the optical/refractive correction, the digital Scheimpflug photograph decreases in size perpendicular to the direction of the optical axis. As a consequence the curvature radii of both the posterior corneal surface and the anterior lens surface are reduced significantly, as compared to the original digital Scheimpflug photograph. Furthermore, the corneal thickness and the anterior chamber depth are increased. The presented refractive correction method enables us to extract from Scheimpflug photographs the following quantities rather realistically: structure coordinates and curvature radii of both the posterior corneal surface and the anterior lens surface, corneal thickness, and anterior chamber depth. This method can readily be applied to other imaged quantities, such as the posterior eye lens surface, the lens thickness, and the pupillary opening.