Skip to main content
. 2021 Feb 6;21(4):1155. doi: 10.3390/s21041155
Algorithm 2 Algorithm for straight index finger detection.
Input: range of θ as θu and θl
Input: range of γ as γu and γl
Input: index finger joints as I=[I1,I2,I3,I4]
  1: for i each joint of index finger do
  2:  for j = 0 to 180 do
  3:   compute I[i](Z,Y) as the Hough transform of each j degree ⟶Ht(γ,θ)
  4:  end for
  5:  calculate intersection of Ht(γ,θ) and γ0⟶(γp,θp)
  6:  if θu<θp⩽θl and γu<γp⩽γl then
  7:   set index finger straight
  8:  else
  9:   set index finger not straight
10:  end if
11: end for