Active contours algorithm.