AIDP algorithm detecting polygons and curves in PGM images.
The polygons and curves must be mutually exclusive and 1 pixel wide.