A new snake-based segmentation technique of a single object (simply connected) in the presence of inhomogeneous Gaussian noise is proposed, in which the mean in each region is modeled as a polynomial function of the coordinates and which is thus adapted to inhomogeneous illumination. It is shown that the minimization of the stochastic complexity of the image, which can be implemented efficiently, allows one to automatically estimate not only the number and the position of the nodes of the polygonal contour used to describe the object but also the degree of the polynomials that model the variations of the mean.