Skip to main content
. 2022 Feb 7;22(3):1262. doi: 10.3390/s22031262
Algorithm 1 The pseudo-code of initial segmentation
Input: the normal of each point N,
  the normals of orientation planes Plane,
  the number of orientation planes numPlanes,
  the number of points numPoints
Output: initial clusters partition
  For i=0 to numPoints-1 do
  bestScore = 0
    For j=0 to numPlanes-1 do
      scoreNormal = N[i]·Plane[j]
      If scoreNormal > bestScore do
        bestScore = scoreNormal
        clusterIndex = j
      End If
    End For
    partition[i]=clusterIndex
  End For