A central problem in vectorizing is how to handle the junction.
The approach that ShapeLogic is taking is to have a somewhat extensive catalogue of different type of pixels.
P P P J P P N P PNJNP E N
P N VJNPP P N LNP
P N VJNPP
P N VJNPPE P N VJNPPE N P P N VJNPPE NN P P
P P N P JN V
Is points that has more neighbors but really are only can be traversed in one way.
P P NN NN P P P P NN NN P P
Edge and inner points are not handled in ShapeLogic yet.
BBBB BSSB BBBB
BBB BSSB BBBB
BBB B BSSBB BBBBB
BBBBB BB BB BBBBB