1. An image processing apparatus that performs image processing on a first image and a second image, the image processing apparatus comprising: dividing means for dividing the first image into a plurality of blocks; first motion-vector calculating means for calculating first motion vectors representing movements from the blocks of the first image to corresponding regions of the second image; second motion-vector calculating means for calculating second motion vectors representing movements of the blocks that occur when the blocks are transformed based on a first positional-relationship parameter representing positional relationship between the first image and the second image; difference-vector calculating means for calculating difference vectors representing differences between the first motion vectors and the second motion vectors; region calculating means for calculating a region having a maximum distribution density of end points of difference vectors as a region where end points of difference vectors are concentrated, the region where end points of different vectors are concentrated being a region of a circle centered at a specific point and having a specific radius; and extracting means for extracting blocks associated with end points located in the region having the maximum distribution density of end points as blocks including a non moving object, or extracting blocks associated with end points located outside the region having the maximum distribution density of end points as blocks including a moving object.