A data reader comprising: a housing; a lens system carried in the housing, the lens system including one or more lens elements; an image sensor carried by the housing, the image sensor operable to acquire a set of images of an item in a field-of-view of the data reader , the item bearing an optical label; a driver in operable communication with the lens system , the driver operable to adjust a focus setting of the lens system by moving at least one of the one or more lens elements, wherein the driver adjusts a focus setting of the lens element, and wherein the image sensor acquires the set of images of the item with the lens system at the focus setting; and a decoding engine operable to decode the optical label from the set of images acquired by the image sensor ; characterized by a rangefinder operable to measure a distance between the data reader and the item in the field of view of the data reader ; and a controller operable to determine whether the optical code is decodable or non-decodable from the set of images based on an output signal from the decoding engine , wherein, when the controller determines that the optical code is non-decodable, the controller is further operable to: analyze at least two images from the set of images acquired by the image sensor and determine contrast measurements for each of the at least two images; and identify in each of the at least two images one or more focal planes based on the determined contrast measurements, each of the one or more focal planes corresponding to a focus position of the lens system ; wherein, the driver adjusts the lens system to the focus position corresponding with at least one of the one or more focal planes, and wherein the decoding engine attempts further decoding with the lens system set at the focus position. a housing; a lens system carried in the housing, the lens system including one or more lens elements; an image sensor carried by the housing, the image sensor operable to acquire a set of images of an item in a field-of-view of the data reader , the item bearing an optical label; a driver in operable communication with the lens system , the driver operable to adjust a focus setting of the lens system by moving at least one of the one or more lens elements, wherein the driver adjusts a focus setting of the lens element, and wherein the image sensor acquires the set of images of the item with the lens system at the focus setting; and a decoding engine operable to decode the optical label from the set of images acquired by the image sensor ; characterized by a rangefinder operable to measure a distance between the data reader and the item in the field of view of the data reader ; and a controller operable to determine whether the optical code is decodable or non-decodable from the set of images based on an output signal from the decoding engine , wherein, when the controller determines that the optical code is non-decodable, the controller is further operable to: analyze at least two images from the set of images acquired by the image sensor and determine contrast measurements for each of the at least two images; and identify in each of the at least two images one or more focal planes based on the determined contrast measurements, each of the one or more focal planes corresponding to a focus position of the lens system ; analyze at least two images from the set of images acquired by the image sensor and determine contrast measurements for each of the at least two images; and identify in each of the at least two images one or more focal planes based on the determined contrast measurements, each of the one or more focal planes corresponding to a focus position of the lens system ; wherein, the driver adjusts the lens system to the focus position corresponding with at least one of the one or more focal planes, and wherein the decoding engine attempts further decoding with the lens system set at the focus position. <EOS>