1. A motion detecting apparatus comprising: a generating unit configured to generate an image which has a number of gradations less than that of an original image of a moving image, wherein the original image has units of blocks; a first motion detecting unit configured to perform motion detection of a target block to detect a motion vector, wherein the motion detection is based on the generated image having the number of gradations less than that of the original image; a calculating unit configured to calculate a flatness value indicating a flatness of the target block, wherein the calculating unit calculates the flatness value using a difference value between (1) an average value of pixel values of the target block in the original image and (2) a pixel value of the target block in the original image; and a selecting unit configured to select, as a motion vector for the target block, (1) a motion vector detected by the motion detection of the target block based on the generated image or (2) a reference motion vector, wherein the selecting unit selects the motion vector detected by the motion detection for the target block based on the generated image as the motion vector for the target block, if the flatness value is not smaller than a first threshold, wherein the selecting unit selects the reference motion vector as the motion vector for the target block, if the flatness value is smaller than the first threshold, wherein the reference motion vector is (a) a zero motion vector or (b) a motion vector based on a motion vector of a block neighboring the target block, and wherein the reference motion vector is a vector independent from the motion detection of the target block based on the generated image.