Skip to main content
. 2017 Aug 4;17(8):1796. doi: 10.3390/s17081796
Algorithm 1 Procedures of Contact Point Detection
Input data: foot points in the input depth image
Output data: contact points
Variables
  • -

    i: index of the foot points in the depth image

  • -

    fi: i-th foot point in the depth image

  • -

    ni: normal vector of fi

  • -

    di: distance from the footplate to fi

  • -

    c_size: length of one side of a cell in the 3D voxel grid

Procedures:
  1. Constructing a 3D voxel grid:

    create a 3D voxel grid having a range of −1.0 to 1.0 and divide the grid into cells of equal size.

  2. Computing a normal vector:

    for all fi,

    calculate the normal vector ni and apply a smoothing filter.

  3. Voting normal vectors:

    for all ni,

    assign ni to the cell in the grid

  4. Setting initial clusters:

    set the non-empty cells as the initial clusters and calculate the average normal vector in the initial cluster.

  5. Merging adjacent clusters:

    for all inital clusters,

    calculate the distance between the adjacent cluster and merge them if the distance is smaller than c_size.

  6. Estimating footplate equation:

    find the cluster with the largest number of normal vectors of the foot points and estimate the plane equation using the correspoindng foot points.

  7. Calculating distances of foot points:

    for all fi,

    calculate the distance from the footplate using the plane equation.

  8. Constructing a histogram:

    create a hisgtorm of the distance from the foot points and the footplate.

  9. Detecting the contact points:

    find the bin with the highest frequency and define the points corresponding to the bin as the contact points.