Disclosed herein are a method and apparatus for generating a panoramic image. The method includes configuring a
data set for training a
deep learning network based on K images, extracting an encoding feature map, a skip connection feature map, and a decoding feature map based on K / 2 images, among the images, estimating multiple homographies based on the encoding feature map, estimating a flow adjustment map, a preprocessing blending map, a weight map, and a post-
processing blending map based on the decoding feature map, deriving a flow map based on the multiple homographies and the flow adjustment map, generating a preprocessed
image based on the preprocessing blending map, generating multiple warped images based on the preprocessed image and the flow map, generating a matching
image based on the warped images and the weight map, and correcting the matching
image based on the matching image and the post-
processing blending map.