Skip to main content
. 2019 Mar 31;19(7):1561. doi: 10.3390/s19071561
Algorithm 3 Pseudo code of the findBestPose function.
  •   1:

    functionfindBestPose(poses TMO, 3D corner points PD)

  •   2:

        calculate transformation from marker origin to each corner, TCM

  •   3:

        for all poses(i) do

  •   4:

            for all 4 corners do

  •   5:

               TCO=TMO·TCM

  •   6:

               PT=TCO·translation

  •   7:

               D2=D2+(PTPD)2

  •   8:

            if D2<score then

  •   9:

               score = D2

  • 10:

               index = i

  • 11:

        return index