| Algorithm 2: Histogram of Oriented Gradient (HOG) |
|
Input: Upper face image, boundary coordinate, size of blob Output: HOG feature of each boundary coordinate image Upper face image x_landmark x coordinate of boundary y_landmark y coordinate of boundary distance size_of_blob/2 for i=0 to length of boundary coordinate do if x_landmark[i] > distance then x_start_blob x_landmark[i] − distance else x_start_blob 0 end if y_landmark[i] > distance then y_start_blob y_landmark[i] − distance else y_start_blob 0 end x_end_blob x_start_blob + size_of_blob y_end_blob y_start_blob + size_of_blob blob image[x_start_blob, x_end_blob][y_start, y_end_blob] hog_feature[i] HOG(blob) end for |