Patent ID: 8363118

Claim:
An image processing device including a correction unit configured to compare a reference image with a target image, and correct an offset of the target image from the reference image that is caused by motion of an imaging device capturing the target image, for each region of the target image, the device comprising: a division unit configured to divide the target image into a plurality of the regions; a setting unit configured to set at least one of the plurality of regions as a local region; a coordinate transformation coefficient calculation unit configured to calculate a coordinate transformation coefficient for each of the plurality of regions; a correction amount calculation unit configured to, for at least one point of interest in the local region set by the setting unit, calculate a correction amount that is used when the offset of the target image is corrected using the coordinate transformation coefficient for the local region calculated by the coordinate transformation coefficient calculation unit, and a correction amount that is used when the offset of the target image is corrected using the coordinate transformation coefficient for one of the plurality of regions neighboring the local region; and a determination unit configured to determine whether or not a difference between the correction amount obtained from the coordinate transformation coefficient for the local region calculated by the correction amount calculation unit, and the correction amount obtained from the coordinate transformation coefficient for the neighboring region calculated by the correction amount calculation unit, falls within a predetermined limit value, wherein the coordinate transformation coefficient calculation unit, when the determination unit determines that the correction amount difference does not fall within the predetermined limit value, newly calculates a coordinate transformation coefficient for each of the plurality of regions so that the correction amount difference falls within the predetermined limit value, and the correction unit corrects the offset of the target image for each of the plurality of regions using the correction amount obtained for the each of the plurality of regions using the newly calculated coordinate transformation coefficient.