1. A motion sensor comprising: an object-area extraction unit that extracts, from each of a first image representing a detection target object and generated by an imaging unit and a second image representing the detection-target object and generated after the first image by the imaging unit, an object area including the detection-target object; a reference-point identification unit that obtains, for each of the first image and the second image, a reference point indicating a boundary between a moving part of the detection-target object and a fixed part of the detection-target object, the moving part moving when the detection-target object performs a certain motion, the fixed part not moving compared to the moving part when the detection-target object performs the certain motion; a moving-part position detection unit that obtains, for each of the first image and the second image, a position of the moving part of the object area in a first area locating on a side including the moving part with respect to the reference point; and a determination unit that determines that the certain motion has been performed, when a difference between the position of the moving part in the first image and the position of the moving part in the second image corresponds to a movement of the detection-target object during the certain motion.