In this paper, we describe an unsupervised segmentation method for contours which proves quite adapted for the images obtained by electronic acquisition. We present two statistical models for the norm of the gradient of the gray level at the pixels of an image, one for contour points and one for points outside contours. We also describe a Markov model with constraint which incorporates those two statistical distributions as likelihood together with a simple a priori model. Our model is suitable for an Iterative Conditional Estimation (ICE) procedure for the estimation of the parameters and an Iterated Conditional Modes (ICM) algorithm, or a simulated annealing, for the segmentation. A preliminary step proceeds to the segmentation of the image into sub-regions and uses a Markov model without constraint based on the gray level distribution on the image.