An iOS project to find the number of connected components in an image (after linear thresholding)