An image processing apparatus that performs image processing on a first
image and a second image includes a dividing unit dividing the first
image into a plurality of blocks; a first motion-vector calculator
calculating first motion vectors representing movements from the blocks
of the first image to corresponding regions of the second image; a second
motion-vector calculator 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; a
difference-vector calculator calculating difference vectors representing
differences between the first motion vectors and the second motion
vectors; and an extracting unit extracting blocks including a moving
object or blocks including a non-moving object based on distribution
density of end points of the difference vectors.