A new algorithm is proposed for solving the problems associated with d
iscontinuity sources in phase maps. It is based on the stable-marriage
s algorithm and is implemented as a recursive procedure. With this tec
hnique, discontinuity sources of opposite sign are connected by a set
of cut lines that fulfills a stability criterion and possesses the min
imum cut length of the stable sets. The algorithm is fast and easy to
implement and has proved efficient, as experimental results show.