Hand gesture detection in the hand movement test for the early diagnosis of dementia