A method for generating a panoramic image includes receiving a first
image, dividing the first image into a first portion and a second
portion, rotating the first portion of the first image, saving the
rotated first portion of the first image in a nonvolatile memory,
receiving a second image, dividing the second image into a third portion
and a fourth portion, matching an overlapping region between the second
portion of the first image and the third portion of the second image,
stitching the second portion of the first image and the third portion of
the second image to form a first stitched image, rotating the first
stitched image, and saving the first stitched image in the nonvolatile
memory.