Ant colony optimization (ACO) has been proposed as a promising tool for regularization in image classification. The algorithm is applied here in a different way than the classical transposition of the graph color affectation problem. The ants collect information through the image, from one pixel to the others. The choice of the path is a function of the pixel label, favoring paths within the same image segment. We show that this corresponds to an automatic adaptation of the neighborhood to the segment form, and that it outperforms the fixed-form neighborhood used in classical Markov random field regularization techniques. The performance of this new approach is illustrated on a simulated image and on actual remote sensing images.