added connected components segmentation class