segmentation to set of edges with debug output
closed contours identification