The invention provides a real-time
video image stabilization method and
system for performing intra-frame motion compensation based on an IMU (
Inertial Measurement Unit). The method comprises the following steps: S1, preprocessing data; s2, track
smoothing processing is carried out; s3, performing intra-frame motion compensation: S3.1, initializing line
exposure delay time; s3.2, calculating the
time difference between the current vth line and the
middle line exposure in the current frame image; s3.3, acquiring the smoothed
virtual camera pose of the current frame and the real camera
pose of each layer; s3.4, acquiring a motion compensation matrix for compensating the line of image to the virtual
pose of the frame of image; s3.5, acquiring an
image frame perspective transformation matrix according to the camera internal reference matrix K and the motion compensation matrix; s3.6, performing intra-frame motion compensation on the image
layers to obtain an initial motion compensation matrix
queue; s3.7, carrying out
black edge removal
processing on the motion compensation matrix
queue; obtaining a motion compensation matrix
queue after
black edge removal; and S4,
image transformation output. The
system comprises a data preprocessing module, a track
smoothing module, an intra-frame motion compensation module and an
image transformation output module. The operation efficiency is improved, and the anti-shake real-time performance is improved.