A motion correction and compensation method for image sensors. A new flag and
an
old flag are used to detect the directions of movement and correct movements. A
value of the new flag is set according to a direction of the present movement.
A value of the old flag is set according to a previous movement. The values of
the new flag and the old flag are compared to determine if the movement of a time
is in the same direction as the movement of a previous time. The value of the old
flag has a value for correcting the movement if movements at different time are
in opposite direction. If movement is determined incorrect according to a reference
image and a new image, previous movement is output and occurrences of incorrect
movements are counted. If the occurrences do not exceed a maximum number, the next
movement is predicted. If the next movement exceeds a maximum movement or the occurrences
exceed a maximum number, the reference image is updated. If the next movement does
not exceed a maximum movement, the reference image is holded.