Skip to main content
. 2023 Jul 11;23(14):6297. doi: 10.3390/s23146297
Algorithm 2 Independent object recognition
Input: Rt
Output: Ct
1: Ct
2: for unallocatedBlob in Rt:
► A region
in Rt
3: if sizeunallocatedBlob<sizeThresh:
4:      continue
► Disregard small regions
5: for cluster in Clusters:
6:         for blob in cluster:
7:             if distanceblob, unallocatedBlob<distThresh:
8:                 allocate unallocatedBlob to cluster
9:             break                   ► Add region to cluster
if below distance threshold
10:     if unallocatedBlob is unallocated:
11:         allocate unallocatedBlob to Clusters and set as cluster
► Set as new cluster
12: for cluster in Clusters:
13: append weighed mean position of cluster to Ct       ► Append
representative position of blob to Ct