Summary: 2D Vectorization (current state of our algorithm)
-
Compute the Delaunay triangulation of black pixels in the drawing (with set max area and min angle).
-
Compute the cross field
C
overT
, and its parametrizationP
. When computing the parametrization, the constrained vertices are partitioned into two groups – those lying onu
-isolines orv
-isolines. (This direction is computed using the combed cross field and the estimated constrained tangent directions. All is saved in the matrixCorners
.) -
Extract the isolines from the parametrization by grouping together all vertices with constant
u
orv
. (This corresponds to grouping the vertices by grid lines of the parametrization.) -
For each
u
-isoline, sort points by theu
coordinate. For eachv
-isoline, sort points by thev
coordinate. -
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) isolinei
, find pointB
in isolinej
such thatA
andB
correspond to the same vertexV
in the triangulationT
. 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