CN-121985221-A - Electronic anti-shake method and system based on IMU and field angle
Abstract
The invention provides an electronic anti-shake method and system based on an IMU and an angle of view, wherein the method comprises the steps of acquiring IMU data in the process of acquiring a real-time video stream by imaging equipment, acquiring angle variation between every two adjacent frames of images according to the IMU data between the two adjacent frames of images, calculating pixel offset between every two adjacent frames of images according to the angle variation, the angle of view and the image resolution, accumulating the pixel offset between every two adjacent frames of images to determine an original motion track and a smooth motion track of the imaging equipment, determining shake compensation quantity according to the original motion track and the smooth motion track, and performing shake compensation on the images according to the shake compensation quantity. According to the invention, the pixel offset and the jitter compensation amount can be rapidly calculated only based on IMU data and the field angles under different focal lengths, the whole volume and the weight of the device can be greatly reduced, and the method is suitable for jitter compensation of different zoom positions.
Inventors
- HUANG CHENG
- WANG XUE
- WANG HUIQING
- TAN ZERONG
- GONG ZHONGYI
Assignees
- 武汉高德智感科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251225
Claims (10)
- 1. An electronic anti-shake method based on an IMU and a view angle is characterized by comprising the following steps: Acquiring IMU data in the process of acquiring a real-time video stream by imaging equipment; acquiring the angle change delta theta between every two adjacent frames of images according to IMU data between the two adjacent frames of images; calculating a pixel offset d between every two adjacent frames of images according to the angle change delta theta between every two adjacent frames of images, the field angle FOV when the imaging device acquires the current video stream and the image resolution; accumulating the pixel offset d between every two adjacent frames of images to determine an original motion track Traj [ n ] and a smooth motion track Traj _s [ n ] of the imaging device; And determining a jitter compensation quantity delta stab [ n ] according to the original motion track Traj [ n ] and the smooth motion track Traj _s [ n ], and carrying out jitter compensation on the image according to the jitter compensation quantity delta stab [ n ].
- 2. The electronic anti-shake method of claim 1 wherein IMU data is collected simultaneously whenever a field-valid signal is obtained.
- 3. The electronic anti-shake method of claim 1, wherein IMU data acquisition frequency f IMU Wherein, f I is the original image data acquisition frequency, K is a positive integer, and the value range is [10,20].
- 4. The electronic anti-shake method according to claim 1, wherein the angle change amount Δθ between every two adjacent frames of images is obtained by: Determining the output time of an image corresponding to each original image data; And carrying out integral calculation on IMU data between two adjacent frames of images to obtain the angle change quantity delta theta between the two adjacent frames of images, wherein delta theta= [ jc ] omega dt, omega is the angular velocity, and t is the time between the two adjacent frames of images.
- 5. The electronic anti-shake method according to claim 4, wherein IMU data between two adjacent frames of images is subjected to zero bias compensation and filtering.
- 6. The electronic anti-shake method according to claim 1, wherein the field angle FOV at which the imaging device acquires the current video stream is acquired by: a mapping relation between the focal length of the imaging equipment and the field angle FOV is built in advance, and the mapping relation comprises different focal lengths and the field angle corresponding to each focal length; Acquiring the position of a zoom motor when the imaging device acquires the current video stream in real time, and determining the current focal length according to the current position of the zoom motor; And determining the field angle corresponding to the current focal length according to the mapping relation between the focal length and the field angle, and taking the field angle as the field angle FOV when the imaging device acquires the current video stream.
- 7. The electronic anti-shake method according to claim 1, wherein the pixel offset between every two adjacent frames of images 。
- 8. The electronic anti-shake method according to claim 1, wherein the original motion trajectory N is the total number of images in the current video stream, i represents the ith frame of image; and if n < m, the smooth motion trail If n is greater than or equal to m, then Where m is the number of smooth frames.
- 9. The electronic anti-shake method according to claim 8, wherein the shake compensation amount 。
- 10. An electronic anti-shake system, comprising: The IMU is used for synchronously acquiring IMU data while acquiring a field effective signal; A field angle acquisition unit for determining a field angle FOV when the imaging device acquires the current video stream; The angle calculation unit is used for acquiring the angle change delta theta between every two adjacent frame images according to the IMU data between the two adjacent frame images; An offset calculating unit for calculating a pixel offset d between each adjacent two-frame image from the angle change amount Δθ between each adjacent two-frame image, the field angle FOV, and the image resolution; A compensation amount calculating unit for accumulating the pixel offset d between every two adjacent frames of images to determine an original motion trajectory Traj n of the imaging device, performing a smoothing filter process on the original motion trajectory Traj n to obtain a smoothed motion trajectory Traj _s n of the imaging device, and determining a jitter compensation amount Δstab n according to the original motion trajectory Traj n and the smoothed motion trajectory Traj _s n; and a shake compensation unit for performing shake compensation on the image according to the shake compensation amount Δstab [ n ], and outputting the compensated image.
Description
Electronic anti-shake method and system based on IMU and field angle Technical Field The invention relates to the technical field of image processing, in particular to an electronic anti-shake method and system based on an IMU and a view angle. Background At present, in the use process of infrared imaging equipment, equipment shakes due to the action of external force, and then imaging effect is affected, so that imaging quality is required to be ensured through corresponding anti-shake image stabilization measures. The anti-shake technology in the prior art mainly comprises optical anti-shake, mechanical anti-shake and electronic anti-shake, wherein: The optical anti-shake is to sense shake of equipment through a sensor such as a gyroscope in a lens of the imaging equipment, and then reversely compensate the shake by moving one or more groups of lenses in the lens, but the optical anti-shake is mainly applicable to an application environment with smaller shake amplitude, and a high-precision sensor needs to be configured, so that the implementation technology is difficult, the mechanical structure is complex, and the hardware cost is high; The mechanical anti-shake is mainly realized based on a mechanical structure, the shake condition of equipment is recorded through a sensor such as a gyroscope, the servo motor system is further reversely compensated and adjusted according to the shake condition, the anti-shake effect is achieved in a cradle head mechanical transmission mode, but the mechanical anti-shake image stabilization precision is not high, the general volume of external cradle head equipment is large, and the design requirement of miniaturization is not met; The electronic anti-shake is realized by a software algorithm, which analyzes continuously shot image frames, calculates the shake locus of the equipment by using the algorithm, and further carries out anti-shake processing on the image. For example, motion estimation is performed based on image gray level projection or feature matching, and then compensation is performed, the process is large in operation amount and long in time consumption, and cannot be suitable for a scene of rapid motion of equipment, or inter-frame motion is rapidly estimated based on a homography matrix, but the homography matrix needs to be calculated to be clear of relative positions of camera internal parameters and a camera and an IMU (Inertial Measurement Unit, an inertial measurement unit), and camera internal parameters under different focal lengths also change in the zooming process of a lens of an imaging equipment, so that the camera internal parameters need to be calibrated for multiple times, and operation is complex. Disclosure of Invention The invention aims to provide an electronic anti-shake method and an electronic anti-shake system based on an IMU and a view angle, which can rapidly complete the calculation of pixel offset and shake compensation amount only based on IMU data and the view angles under different focal lengths, can greatly reduce the whole volume and weight of equipment, and are suitable for shake compensation of different zoom positions. In order to achieve the above purpose, the present invention provides the following technical solutions: in one aspect, an electronic anti-shake method based on an IMU and a field angle is provided, which includes the steps of: Acquiring IMU data in the process of acquiring a real-time video stream by imaging equipment; acquiring the angle change delta theta between every two adjacent frames of images according to IMU data between the two adjacent frames of images; calculating a pixel offset d between every two adjacent frames of images according to the angle change delta theta between every two adjacent frames of images, the field angle FOV when the imaging device acquires the current video stream and the image resolution; accumulating the pixel offset d between every two adjacent frames of images to determine an original motion track Traj [ n ] and a smooth motion track Traj _s [ n ] of the imaging device; And determining a jitter compensation quantity delta stab [ n ] according to the original motion track Traj [ n ] and the smooth motion track Traj _s [ n ], and carrying out jitter compensation on the image according to the jitter compensation quantity delta stab [ n ]. Preferably, IMU data is acquired simultaneously whenever a field effective signal is acquired. Preferably, IMU data acquisition frequency f IMUWherein, f I is the original image data acquisition frequency, K is a positive integer, and the value range is [10,20]. Preferably, the angle change amount Δθ between every two adjacent frames of images is obtained by: Determining the output time of an image corresponding to each original image data; And carrying out integral calculation on IMU data between two adjacent frames of images to obtain the angle change quantity delta theta between the two adjacent frames of images, wherein delta the