def _prune_blobs(blobs_array, overlap):
 for (blob1, blob2) in itt.combinations(blobs_array, 2):
  if (_blob_overlap(blob1, blob2) > overlap):
   if (blob1[2] > blob2[2]):
    blob2[2] = (-1)
   else:
    blob1[2] = (-1)
 return np.array([b for b in blobs_array if (b[2] > 0)])

def _prune_blobs ( blobs_array , overlap ) : for ( blob1 , blob2 ) in itt . combinations ( blobs_array , 2 ) : if ( _blob_overlap ( blob1 , blob2 ) > overlap ) : if ( blob1 [ 2 ] > blob2 [ 2 ] ) : blob2 [ 2 ] = ( - 1 ) else : blob1 [ 2 ] = ( - 1 ) return np . array ( [ b for b in blobs_array if ( b [ 2 ] > 0 ) ] )
eliminated blobs with area overlap .