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: Normal point, 2 neighbors, cross index of 4
- E: End or extreme point, 1 neighbor, cross index of 2
- N: More neighbors, more than 2 neighbors, cross index of 4
- J: Junction point, more than cross index of 4
- L: L corner, 2 neighbors with modulo distance either 2 or 6, cross index of 4
- V: A corner, 2 neighbors, cross index of 2, should always be next to a junction
- B: Border of solid, cross index of 2
- S: Solid, 8 neighbors or 7 where the last on is an even number.

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