Patent ID: 8761522

Claim:
An image processing apparatus comprising: a reduction unit configured to generate image data on a plurality of ranks by reducing image data to generate image data on another rank, and generate base block data on a plurality of ranks by reducing base block data to generate base block data on another rank; an evaluation unit configured to calculate an evaluation value of sharpness of the image data; and a motion vector detection unit configured to set a plurality of pieces of target block data on a plurality of positions, that have the same size as base block data on the same rank, on the image data, acquire correlation between the target block data and the base block data having the same size for each of the plurality of positions, and detect a motion vector based on the acquired correlations, wherein, when the evaluation value of image data on a second rank generated by reducing image data on a first rank is equal to or more than a predetermined threshold value, the motion vector detection unit detects a first motion vector in the image data on the second rank, sets a first detection area in the image data on the first rank based on the detected first motion vector, and sets the plurality of pieces of target block data on a plurality of positions shifted by a first amount in the first detection area to detect a second motion vector in the image data on the first rank, and wherein, when the evaluation value of the image data on the second rank is not equal to or more than the predetermined threshold value, the motion vector detection unit sets the plurality of pieces of target block data on a plurality of positions shifted by a second amount that is larger than the first amount in the image data on the first rank, detects a third motion vector in the image data on the first rank based on correlations between each target block data and the base block data, sets a second detection area in the image data on the first rank based on the detected third motion vector, and sets the plurality of pieces of target block data on a plurality of positions shifted by a third amount that is less than the second amount in the second detection area to detect a fourth motion vector in the image data on the first rank.