Skip to main content
. 2022 Jun 19;22(12):4633. doi: 10.3390/s22124633
Algorithm 1: Landmark Detection and Feature Extraction
Input: Upper facial image
Output: Landmark coordinate and HOG feature landmarks

t  [0, 20π50 , 2×20π50 , 3×20π50 ,, 20π]
x  cost
y  sin4t2
points (x, y)

for i=0 to (length of t) − 3 do
   startPoint points[i]
   midPoint points[i+1]
   endPoint points[i+2]
   connectedLineIntensity[i] connect(startPoint, midPoint, endPoint)
end for

height height of peak
fwhm full width of half maximum

for each lineIntensity in connectedLineIntensity do
   (indices, properties) findPeaks(lineIntensity)
end for

for i=0 to length of properties do
   if prominence of properties[i] >= height
    and width of properties[i]>=fwhm then
     property properties[i]
     landmarks[i] property[leftBase]
   end
end for

for i=0 to length of landmarks do
  landmarkHOG[i] histogramofOrientedGradient(landmarks[i])
  features[i] (landmark[i], landmarkHOG[i])
end for