發送短信 : Detection of head position using chain code algorithm