Search

CN-122002133-A - Image anti-shake system and method thereof, electronic terminal and computer readable storage medium

CN122002133ACN 122002133 ACN122002133 ACN 122002133ACN-122002133-A

Abstract

The application provides an image anti-shake system and a method thereof, an electronic terminal and a computer readable storage medium, wherein the image anti-shake system comprises a detection module and a hardware accelerator, the hardware accelerator is connected with the detection module, and the detection module is used for detecting the global motion of a current video frame relative to a reference video frame to obtain a displacement difference value corresponding to the current video frame; the hardware accelerator is used for carrying out anti-shake processing on the current video frame based on the displacement difference value corresponding to the current video frame. The application carries out electronic anti-shake processing on the current video frame through the inherent hardware accelerator on the control chip without adding a geometric deformation corrector or a special processing unit such as a high-performance digital signal processor which is only on a high-end integrated chip, but fully utilizes the hardware accelerator which is generally integrated on a middle-end chip and a low-end chip to realize the electronic anti-shake processing of the image so as to reduce the optical anti-shake cost.

Inventors

  • CHEN JIANKE
  • WANG TINGNIAO
  • XIE FEN
  • LI HONGYU
  • Fang Xiuzhi
  • WANG SONG

Assignees

  • 浙江大华技术股份有限公司

Dates

Publication Date
20260508
Application Date
20260123

Claims (10)

  1. 1. An image anti-shake system is characterized in that, the image anti-shake system includes: The detection module is used for detecting global motion of a current video frame relative to a reference video frame to obtain a displacement difference value corresponding to the current video frame, wherein the reference video frame is a previous video frame adjacent to the current video frame; and the hardware accelerator is connected with the detection module and is used for carrying out anti-shake processing on the current video frame based on the displacement difference value corresponding to the current video frame.
  2. 2. The image anti-shake system according to claim 1, further comprising: And the preprocessing module is respectively connected with the detection module and the hardware accelerator and is used for preprocessing the displacement difference value of the current video frame, and the preprocessing comprises low-pass filtering processing and/or amplitude limiting processing.
  3. 3. The image shake prevention system according to claim 1, wherein the displacement difference includes a displacement variation in a first direction and a displacement variation in a second direction, the first direction being different from the second direction; The hardware accelerator is configured to correct the current video frame based on a displacement variation of the current video frame in the first direction and/or a displacement variation of the current video frame in the second direction.
  4. 4. The image anti-shake system according to claim 1, further comprising a geometric transformation module, the displacement difference comprising a displacement variation in a first direction and a displacement variation in a second direction, the first direction being different from the second direction; In response to the first direction being a row direction of the current video frame, the hardware accelerator is configured to correct the current video frame based on a displacement variation of the current video frame in the first direction; and in response to the second direction being the column direction of the current video frame, the geometric transformation module is used for correcting the current video frame based on the displacement variation of the current video frame in the second direction.
  5. 5. The image anti-shake system according to claim 3 or 4, wherein a plurality of correction neural networks are deployed on the hardware accelerator, and each correction neural network corresponds to a different preset deviation value; The hardware accelerator is used for comparing the displacement variation of the current video frame corresponding to the target direction with each preset deviation value, and correcting the current video frame in the target direction based on the correction neural network corresponding to the preset deviation value consistent with the displacement variation.
  6. 6. The image anti-shake system according to claim 3 or 4, wherein the geometric transformation module is configured to correct the current video frame in the target direction based on a displacement variation of the current video frame in the target direction.
  7. 7. The image stabilization system of claim 4, wherein the preprocessing module is further configured to correct a memory access starting address alignment calculated according to the displacement difference value to be an integer multiple of an access step size of the geometric transformation module based on a memory access requirement of the geometric transformation module.
  8. 8. An image anti-shake method, which is applicable to the image anti-shake system according to any one of claims 1 to 7, comprising: Acquiring a current video frame; detecting global motion of the current video frame relative to a reference video frame to obtain a displacement difference value corresponding to the current video frame, wherein the reference video frame is a previous video frame adjacent to the current video frame; And performing anti-shake processing on the current video frame based on the current video frame and the displacement difference value corresponding to the current video frame through a hardware accelerator.
  9. 9. An electronic terminal comprising a memory and a processor coupled to each other, the processor configured to execute program instructions stored in the memory, the processor configured to execute program data to implement the steps in the image anti-shake method according to claim 8.
  10. 10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps in the image anti-shake method according to claim 8.

Description

Image anti-shake system and method thereof, electronic terminal and computer readable storage medium Technical Field The present application relates to the field of image processing technologies, and in particular, to an image anti-shake system and method thereof, an electronic terminal, and a computer readable storage medium. Background When the terminal equipment is used for shooting pictures or videos, imaging of the lens of the terminal equipment is not finished instantaneously, and a certain exposure time is provided. During this exposure time, the terminal device may be unstable, resulting in vibration of the terminal device during photographing or video taking, which may cause blurring of the taken photograph or jitter of the video content. Disclosure of Invention The application mainly solves the technical problem of providing an image anti-shake system and a method thereof, an electronic terminal and a computer readable storage medium, and solves the problem of overhigh optical anti-shake cost in the prior art. In order to solve the technical problems, the first technical scheme adopted by the application is to provide an image anti-shake system, which comprises: The detection module is used for detecting the global motion of the current video frame relative to the reference video frame to obtain a displacement difference value corresponding to the current video frame; The hardware accelerator is connected with the detection module and is used for carrying out anti-shake processing on the current video frame based on the displacement difference value corresponding to the current video frame. Wherein, the image anti-shake system further includes: The preprocessing module is respectively connected with the detection module and the hardware accelerator and is used for preprocessing the displacement difference value of the current video frame, and the preprocessing comprises low-pass filtering processing and/or amplitude limiting processing. The image shake prevention system according to claim 1, wherein the displacement difference includes a displacement variation in a first direction and a displacement variation in a second direction, the first direction being different from the second direction; The hardware accelerator is configured to correct the current video frame based on a displacement variation of the current video frame in the first direction and/or a displacement variation of the current video frame in the second direction. The image anti-shake system further comprises a geometric transformation module, wherein the displacement difference value comprises a displacement variation in a first direction and a displacement variation in a second direction, and the first direction is different from the second direction; in response to the first direction being a row direction of the current video frame, the hardware accelerator is configured to correct the current video frame based on a displacement variation of the current video frame in the first direction; And responding to the second direction as the column direction of the current video frame, wherein the geometric transformation module is used for correcting the current video frame based on the displacement variation of the current video frame in the second direction. The hardware accelerator is provided with a plurality of correction neural networks, and each correction neural network corresponds to different preset deviation values respectively; The hardware accelerator is used for comparing the displacement variation of the current video frame corresponding to the target direction with each preset deviation value, and correcting the current video frame in the target direction based on the correction neural network corresponding to the preset deviation value consistent with the displacement variation. The geometric transformation module is used for correcting the current video frame in the target direction based on the displacement variation of the current video frame in the target direction. The preprocessing module is further configured to correct the memory access starting address alignment calculated according to the displacement difference value to be an integer multiple of the access step length of the geometric transformation module based on the memory access requirement of the geometric transformation module. In order to solve the technical problems, the second technical scheme adopted by the application is to provide an image anti-shake method which is applicable to the image anti-shake system and comprises the following steps: Acquiring a current video frame; Detecting global motion of a current video frame relative to a reference video frame to obtain a displacement difference value corresponding to the current video frame; And carrying out anti-shake processing on the current video frame based on the current video frame and the displacement difference value corresponding to the current video frame through a hardware accelerator