Patent ID: 8651384

Claim:
A code reading apparatus comprising: a liquid lens; a focus drive section which applies an applied voltage to the liquid lens to adjust a focal distance of the liquid lens; a storage section which stores an applied voltage table showing a relationship between the focal distance of the liquid lens and the applied voltage to the liquid lens; an image pickup section which obtains image data in an image pickup direction in which the liquid lens faces; a light emitting section which emits a laser light beam in the image pickup direction; a laser focus section which controls the image pickup section to obtain image data of a subject in a state in which the laser light beam is emitted, and finds a distance from the liquid lens to the subject based on a position of a bright point formed by the laser light beam in the obtained image data, so as to perform laser focus adjustment; a contrast focus section which controls the image pickup section to obtain image data of the subject while changing the focal distance of the liquid lens within a preset change range, so as to perform contrast focus adjustment such that the subject is brought into focus based on a magnitude of contrast of the subject included in the obtained image data; and a correction section which corrects a content of the applied voltage table based on the distance from the liquid lens to the subject found by the laser focus section and a corresponding applied voltage with which the subject is brought into focus by the contrast focus section; wherein the contrast focus section sets, as the preset change range, a range centering on a provisional corresponding applied voltage determined based on the applied voltage table for the found distance.