Patent ID: 7457476

Claim:
A method for exposure time control in an optical sensor device of the type having an illuminating light source and an image sensor for capturing a sequence of images under exposure of light from said light source, wherein said sequence of images contain a position-coding pattern for decoding a sequence of positions of the optical sensor device, said method comprising capturing said sequence of images by repeatedly capturing images as the optical sensor device is moved, and transferring each captured image in said sequence of images to a processor for decoding the position of the optical sensor device, and, said method further comprising forming an exposure time control loop for controlling the exposure time for subsequently captured images in said sequence of images, wherein each iteration of the control loop involves: capturing a current image in said sequence of images under exposure of light from said light source during an exposure time calculated during the preceding iteration; determining an actual luminance condition value in said current image; calculating an error between a set value and said actual luminance condition value; and calculating a current exposure time as a function of the preceding exposure time and said error, said current exposure time being used for capturing a subsequent image in said sequence of images.