The second constraint here is the boundary condition: the dis-
placements at image borders should be equal to zero.
B. The Warping Algorithm
In order to get the same results as in the 1D case and to keep
the edge pixels unwarped, the proximity value should be equal
to the 1D proximity function depending on the distance to the
edge. However, the distance to the closest edge as an argument
of the proximity functionis not efficient as it may produce
gaps between close edges. Also it blurs edge ends.
We suggest the following method for calculating the prox-
imity function: