Figure-ground separation for vector graphics with contour detection