Implementation of the FindBlobs() algorithm