One of the first steps in automatic fundus image analysis is the segmentation of the retinal vasculature, which provides valuable information related to several diseases. In this work, we present an extensive description and evaluation of our method for blood vessel segmentation in fundus images based on a discriminatively trained, fully connected conditional random field model. This task remains a challenge largely due to the desired structures being thin and elongated, a setting that performs particularly poorly using standard segmentation priors, such as a Potts model or total variation. We overcome this difficulty by using a conditional random field model with more expressive potentials, taking advantage of recent results enabling inference of fully connected models almost in real-time. Parameters of the method are learned automatically using a structured output support vector machine, a supervised technique widely used for structured prediction in a number of machine learning applications. The evaluation of our method is performed both quantitatively and qualitatively on DRIVE, STARE, CHASEDB1 and HRF, showing its ability to deal with different types of images and outperforming other techniques, trained using state of the art features.