A central vectorization problem is how best to handle junctions.
ShapeLogic has approached the problem by developing an extensive catalogue of different pixel types.
P P P J P P N P PNJNP E N
P N VJNPP P N LNP
P N VJNPP
V points are angle junctions (as in the letter "V")
P N VJNPPE P N VJNPPE N P P N VJNPPE NN P P
P P N P JN V
N points have more than 2 neighbors, but can only be traversed in one reasonable way.
P P NN NN P P P P NN NN P P
Edge and inner points are not yet handled in ShapeLogic.
BBBB BSSB BBBB
BBB BSSB BBBB
BBB B BSSBB BBBBB
BBBBB BB BB BBBBB