A method for simultaneously optimizing a digital image taken in or through a scattering medium and obtaining information regarding optical properties of the scattering medium is provided. Digital image data are received by a computer. The digital image is evaluated according to an objective image quality metric and a resulting image quality value is compared to a previously stored image quality value for the image. A revised optical transfer function is derived by modeling the optical properties of the medium to be used to generate a restored digital image, which is derived from the original image and the revised optical transfer function. The restored digital image is evaluated according to the objective image quality metric and an optimized restored image is identified. The optical properties associated with the optical transfer function producing the optimized restored image represent a close approximation of the true optical properties of the medium.