Some diseases, particularly cardiovascular disease, will change the shape and structure of retinal vessels. Observation and detection of retinal vessels play an important role in the diagnosis of diseases. Traditional diagnosis of the retinal vessels that ophthalmologist perform under artificial visual attending. Image segmentation based on Markov random field is a method based on statistical theory, which takes into account the correlation between the local pixels, uses the prior knowledge effectively, has fewer model parameters and is easy to be combined with other methods etc., so this method has been widely researched and applied in the field of image segmentation. This paper which mainly studied the Markov random field is how to specific apply to image segmentation, and the iterated conditional mode and the traditional segmentation (clustering) algorithm segmented and compared in the medical retinal vessel image. The method of MRF can effectively restrain the noise in the vessel segmentation.