A method for creating a 360 degree panoramic image from multiple images
includes (1) computing a gross rotation error .DELTA.R between a first
image and a calculated first image rotated to be stitched to a last
image, and (2) spreading the gross rotation error .DELTA.R to each pixel
on the panoramic image. Spreading the gross rotation error .DELTA.R
includes (1) computing a rotation angle .theta..sub.0 and rotational axis
n.sub.0 from the gross rotational error .DELTA.R, (2) determining an
angle .alpha. of each pixel, and (3) determining a compensation matrix
R.sub.c for each pixel using the following formula:
R.sub.c(.alpha.)=R(.alpha./2.pi..theta..sub.0). Spreading the gross
rotation error .DELTA.R further includes (4) tracing a pixel on the
panoramic image to a camera optical center of the images to form a first
ray, (5) determining a second ray originating from the camera optical
center that would be rotated by the compensation matrix R.sub.c to
coincide with the first ray, (6) tracing the second ray to a second pixel
on one of the images, and (7) painting the first pixel with color values
of the second pixel.