Briefly, it contours the data array at many different levels, starting at a value close to the peak value in the array and working down to a specified minimum contour level. At each contour level, all contiguous areas of pixels that are above the contour level are found and considered in turn. If such a set of pixels includes no pixels that have already been assigned to a clump (i.e. have already been identified at a higher contour level), then the set is marked as a new clump. If the set includes some pixels that have already been assigned to a clump, then, if all such pixels belong to the same clump, that clump is extended to include all the pixels in the set. If the set includes pixels that have already been assigned to two or more clumps, then the new pixels in the set are shared out between the two or more existing clumps. This sharing is done by assigning each new pixel to the closest clump. Note, this is based on the distance to the nearest pixel already assigned to the clump, not the distance to the central or peak pixel in the clump. The above paper refers to this as a ``friends-of-friends'' algorithm.
This process continues down to the lowest specified contour level, except that new clumps found at the lowest contour level are ignored. However, clumps found at higher contour levels are followed down to the lowest specified contour level.
CUPID