1. Compute the Delaunay triangulation of black pixels in the drawing (with set max area and min angle).

  2. Compute the cross field C over T, and its parametrization P. When computing the parametrization, the constrained vertices are partitioned into two groups – those lying on u-isolines or v-isolines. (This direction is computed using the combed cross field and the estimated constrained tangent directions. All is saved in the matrix Corners.)

  3. Extract the isolines from the parametrization by grouping together all vertices with constant u or v. (This corresponds to grouping the vertices by grid lines of the parametrization.)

  4. For each u-isoline, sort points by the u coordinate. For each v-isoline, sort points by the v coordinate.

  5. Construct connectivity between black pixels using the sorted isolines. The connectivity is composed of the following edges:

    • Edges of the sorted isolines
    • Connections between isolines (green points). For each endpoint A of a (sorted) isoline i, find point B in isoline j such that A and B correspond to the same vertex V in the triangulation T. These connections correspond
    • Intersections (magenta points). For each pair of isolines in orthogonal directions, add their intersection.

Constraining both coordinates to integers

  • this seems promising