A method for panoramic video stabilization, comprising: receiving a panoramic video to be processed, the panoramic video including a plurality of two dimensional - 2D - panoramic images; conducting inter frame motion estimation with respect to each two neighboring 2D panoramic images in the panoramic video so as to obtain a corresponding inter frame motion estimation result between the same two neighboring 2D panoramic images; acquiring, based on the respective inter frame motion estimation results obtained between the plurality of 2D panoramic images, a historical motion trajectory of the panoramic video, and carrying out smoothing of the historical motion trajectory; calculating, based on the historical motion trajectory after smoothing, a rotation matrix for motion compensation pertaining to each 2D panoramic image in the panoramic video; and performing reconstruction on each 2D panoramic image in the panoramic video by way of the corresponding rotation matrix for motion compensation so as to attain a panoramic video after image stabilization, and outputting the panoramic video after image stabilization, wherein, the calculating, based on the historical motion trajectory after smoothing, a rotation matrix for motion compensation pertaining to each 2D panoramic image in the panoramic video includes setting a first 2D panoramic image in the plurality of 2D panoramic images as a reference 2D panoramic image; determining, based on the historical motion trajectory after smoothing, that a change of a current 2D panoramic image relative to a previous 2D panoramic image is unconscious noise motion or conscious camera motion; if the change is unconscious noise motion, calculating the rotation matrix for motion compensation of the current 2D panoramic image relative to the previous 2D panoramic image, if the change is conscious camera motion, updating the reference 2D panoramic image by replacing the reference 2D panoramic image with a later 2D panoramic image, and calculating, based on the reference 2D panoramic image after update and the current 2D panoramic image, the rotation matrix for motion compensation between the reference 2D panoramic image after update and the current 2D panoramic image. receiving a panoramic video to be processed, the panoramic video including a plurality of two dimensional - 2D - panoramic images; conducting inter frame motion estimation with respect to each two neighboring 2D panoramic images in the panoramic video so as to obtain a corresponding inter frame motion estimation result between the same two neighboring 2D panoramic images; acquiring, based on the respective inter frame motion estimation results obtained between the plurality of 2D panoramic images, a historical motion trajectory of the panoramic video, and carrying out smoothing of the historical motion trajectory; calculating, based on the historical motion trajectory after smoothing, a rotation matrix for motion compensation pertaining to each 2D panoramic image in the panoramic video; and performing reconstruction on each 2D panoramic image in the panoramic video by way of the corresponding rotation matrix for motion compensation so as to attain a panoramic video after image stabilization, and outputting the panoramic video after image stabilization, wherein, the calculating, based on the historical motion trajectory after smoothing, a rotation matrix for motion compensation pertaining to each 2D panoramic image in the panoramic video includes setting a first 2D panoramic image in the plurality of 2D panoramic images as a reference 2D panoramic image; determining, based on the historical motion trajectory after smoothing, that a change of a current 2D panoramic image relative to a previous 2D panoramic image is unconscious noise motion or conscious camera motion; if the change is unconscious noise motion, calculating the rotation matrix for motion compensation of the current 2D panoramic image relative to the previous 2D panoramic image, if the change is conscious camera motion, updating the reference 2D panoramic image by replacing the reference 2D panoramic image with a later 2D panoramic image, and calculating, based on the reference 2D panoramic image after update and the current 2D panoramic image, the rotation matrix for motion compensation between the reference 2D panoramic image after update and the current 2D panoramic image.