A device, method and a computer program product are shown for correcting
the focus error in an optical device, wherein in a first position of the
optical device at least one focus detector is focused onto a given image
plane of the target subject and the distance (d.sub.1) between the
optical device and the given image plane is locked and wherein in a
second position of the optical device following a reorientation of the
optical device for achieving the desired framing of the image the shutter
is released, the method comprising sensing a distance vector parallel to
the focus plane after reorientation between the first position and the
second position after reorientation, calculating a focus correction value
(d.sub.e) from the sensed distance vector and adding the focus correction
value (d.sub.e) as a corrective to the locked focus distance (d.sub.1).