1. An imaging device comprising: an image blur evaluator that evaluates an amount of blurring due to a camera shake; an imaging processor that captures a plurality of secondary images of a same object at different lens positions by driving a photographing lens; an edge contour extraction processor that extracts edge contour components of the secondary images and creates an edge contour extracted image for each of the secondary images; an image divider that divides each edge contour extracted image into a plurality of blocks, wherein a size of each of the blocks changes such that the blocks are relatively large blocks when the amount of blurring is evaluated to be relatively substantial, and are relatively small blocks when the amount of the blurring is evaluated to be moderate, each of the blocks including at least one pixel; and a distance information detector that detects distance information of the object in each of the blocks based on contrast in each of the blocks.