An apparatus for image taking includes a range image sensor, in which a
range image is produced in which a distance is represented with a pixel
value by image taking of a principal object from an image taking
position. An image pickup device receives light reflected by the
principal object, to output an image signal for respective pixels. A
light reception control unit changes over a reception sequence and
reception time, and causes the image pickup device to output image
signals associated with first and second distance ranges. The second
distance range is a distance range where the principal object exists and
is over the first distance range. A first range image and second range
image, are formed according to the image signals. Blank portions are
designated within the second range image by comparison of the first range
image and second range image, to compensate for the blank portions.