Extraction of the centerlines