"Assessment of retinal vessels is fundamental for the diagnosis of many disorders such as heart diseases, diabetes and hypertension. The imaging of retina using advanced fundus camera has become a standard in computer-assisted diagnosis of opthalmic disorders. Modern cameras produce high quality color digital images, but during the acquisition process the light reflected by the retinal surface generates a luminosity and contrast variation. Irregular illumination can introduce severe distortions in the resulting images, decreasing the visibility of anatomical structures and consequently demoting the performance of the automated segmentation of these structures. In this paper, a novel approach for illumination correction of color fundus images is proposed and applied as preprocessing step for retinal vessel segmentation. Our method builds on the connection between two different phenomena, shadows and haze, and works by removing the haze from the image in the inverted intensity domain. This is shown to be equivalent to correct the nonuniform illumination in the original intensity domain. We tested the proposed method as preprocessing stage of two vessel segmentation methods, one unsupervised based on mathematical morphology, and one supervised based on deep learning Convolutional Neural Networks (CNN). Experiments were performed on the publicly available retinal image database DRIVE. Statistically significantly better vessel segmentation performance was achieved in both test cases when illumination correction was applied."