  We consider mean-field models for data--clustering problems starting from a
generalization of the bounded confidence model for opinion dynamics. The
microscopic model includes information on the position as well as on additional
features of the particles in order to develop specific clustering effects. The
corresponding mean--field limit is derived and properties of the model are
investigated analytically. In particular, the mean--field formulation allows
the use of a random subsets algorithm for efficient computations of the
clusters. Applications to shape detection and image segmentation on standard
test images are presented and discussed.
