Underwater imaging is affected by the absorption and scattering of light, the acquired images typically suffer from color deviation, low contrast, and significant scattering. The existing underwater imaging models mainly focus on the scattering and absorption of underwater light, while neglecting the attenuation of light as it travels from the water surface to underwater scenes, resulting in less than satisfactory restoration outcomes. To address this challenge, we introduce an underwater image restoration method incorporating a modified optical model and employing contrast optimization. Concretely, we first devise a novel quadtree scoring formula to calculate the background color (illuminance) in the Retinex model and correct the background color deviation based on light scattering characteristics. Then we calculate the reflectance and combine it with the Jaffe-McGlamery model to establish a new optical modified model to adapt to complicated underwater imaging environments. On this basis, we propose the dual-space background light fusion estimation method and transmission optimization method to accurately solve the model parameters. Finally, we employ a maximum contrast optimization strategy, iteratively selecting double thresholds for histogram stretching to achieve high-contrast images. Extensive experiments on different datasets demonstrate that the proposed method is effective in qualitative and quantitative evaluation, color accuracy test, ablation experiment and applications, and is superior to the state-of-the-art methods in balancing color deviation, enhancing contrast, and deblurring.