We focus on a variational approach to image segmentation based on the
Ambrosio-Tortorelli functional. To make the procedure more effective with
respect to standard algorithms, we combine the functional minimization
with the the employment of an optimal discretization. More precisely, we
perform a finite element approximation of the Ambrosio-Tortorelli func-
tional on a triangular adapted mesh able to follow exactly the contours
present in the images, in the spirit of a mesh adaptation-aided image seg-
mentation. This challenging goal is reached via a rigorous a posteriori
error analysis enriched with anisotropic information. The benefits due to
the proposed algorithm are evident both in terms of increased resolution
in the edge detection and in a considerable reduction of the computational
costs, as confirmed by an extensive numerical investigation.