Search

CN-114511725-B - Anti-shake method, device and equipment for face image and readable storage medium

CN114511725BCN 114511725 BCN114511725 BCN 114511725BCN-114511725-B

Abstract

The application provides an anti-shake method, device and equipment for a face image and a readable storage medium. The method comprises the steps of obtaining a plurality of face feature points in a current image frame, determining displacement vectors of the face feature points based on the current image frame and at least two adjacent image frames of the current image frame, determining a clustering space corresponding to the face feature points, clustering the face feature points in the clustering space according to the displacement vectors, wherein the clustering space comprises the face feature points and face feature points in a designated area around the face feature points, and conducting anti-shake processing on the face feature points according to clustering results.

Inventors

  • LU AIYU

Assignees

  • 广州虎牙科技有限公司

Dates

Publication Date
20260505
Application Date
20220211

Claims (10)

  1. 1. An anti-shake method for a face image, the method comprising: Acquiring a plurality of face feature points in a current image frame; Determining displacement vectors of the face feature points based on the current image frame and at least two adjacent image frames of the current image frame, wherein the current image frame and the at least two adjacent image frames have the same target face; Determining a clustering space corresponding to the face feature points, wherein the clustering space comprises the face feature points and face feature points of a designated area around the face feature points; Clustering the face feature points in the clustering space according to the displacement vector to obtain a clustering result; if the number of the face feature points in the clustering result in the non-clustering state is larger than a specified threshold, determining that the target face is in a static state, and performing anti-shake processing on all the obtained face feature points; If the number of the face feature points in the clustering result in the non-clustering state is smaller than or equal to the specified threshold, determining that the target face is in a normal moving state, and performing anti-shake processing on the face feature points in the clustering space.
  2. 2. The method according to claim 1, characterized in that: The step of obtaining a plurality of face feature points in the current image frame comprises the following steps: And mapping the coordinates of the face feature points determined in the 3D image into coordinates in a 2D coordinate system.
  3. 3. The method according to claim 1, characterized in that: the step of clustering the face feature points in the clustering space according to the displacement vector comprises the following steps: And clustering the face feature points in the clustering space according to the direction angle of the displacement vector, wherein the direction angle is not larger than a preset change range.
  4. 4. A method according to claim 3, characterized in that: the preset change range is 20 degrees.
  5. 5. An anti-shake apparatus for face images, the apparatus comprising: The image detection module is used for acquiring a plurality of face feature points in the current image frame; The processing module is used for determining displacement vectors of the face feature points based on the current image frame and at least two adjacent image frames of the current image frame, wherein the current image frame and the at least two adjacent image frames have the same target face; the clustering module is used for determining a clustering space corresponding to the face feature points and clustering the face feature points in the clustering space according to the displacement vector to obtain a clustering result, wherein the clustering space comprises the face feature points and face feature points in a designated area around the face feature points; And the anti-shake processing module is used for determining that the target face is in a static state and carrying out anti-shake processing on all the obtained face feature points if the number of the face feature points in the clustering result in the non-clustering state is larger than a specified threshold value, and determining that the target face is in a normal moving state and carrying out anti-shake processing on only the face feature points in the clustering space if the number of the face feature points in the clustering result in the non-clustering state is smaller than or equal to the specified threshold value.
  6. 6. The apparatus according to claim 5, wherein: The image detection module is used for acquiring a plurality of face features in the current image frame, and comprises the following steps: And mapping the coordinates of the face feature points determined in the 3D image into coordinates in a 2D coordinate system.
  7. 7. The apparatus of claim 5, wherein the clustering module clusters the face feature points in the clustering space according to the displacement vector specifically comprises: And clustering the face feature points in the clustering space according to the direction angle of the displacement vector, wherein the direction angle is not larger than a preset change range.
  8. 8. The apparatus according to claim 7, wherein: the preset change range is 20 degrees.
  9. 9. An apparatus for anti-shake of a face image, comprising: A processor; A memory for storing processor-executable instructions; Wherein the processor is configured to perform the operations of the method of any of claims 1-4.
  10. 10. A computer-readable storage medium having stored thereon computer instructions, characterized by: which when executed by a processor performs the operations of the method of any of claims 1-4.

Description

Anti-shake method, device and equipment for face image and readable storage medium Technical Field The present application relates to the field of image processing technologies, and in particular, to an anti-shake method, an apparatus, a device, and a readable storage medium for a face image. Background With the development of technology, deep learning technology is applied to life/industry aspects in a model obtained by training a big data model. The face application scene is very successful in application because the face itself has the characteristic of structural stability. Regardless of the deep learning algorithm or the traditional face feature point algorithm, the pixel points in the output result are inevitably dithered. The reason for the shake is usually the influence of random noise, image background, or external disturbance factors such as light change when capturing a plurality of images on the result. In the traditional face anti-shake technology, filtering processing is usually carried out through different filtering algorithms, such as Kalman filtering, median filtering, gaussian filtering and the like, but the filtering algorithms usually do not pay attention to whether an output result is originally normal movement of a face feature point or shake, the output result is taken as shake to carry out filtering processing, when the processing is carried out, if the weight of the algorithm for removing shake is large, the processing time is long, image delay is caused, and when the weight is small, unavoidable shake is brought. In theory, when the face is static, the feature points output after the processing of the multiple images by the filtering algorithm are supposed to have no obvious jitter in visual effect, and when the face is moving, the anti-jitter effect is required to be maintained, and meanwhile, the delay cannot be too large, but the current general filtering algorithm cannot be realized. Disclosure of Invention In view of the above, the present application provides an anti-shake method, device, apparatus and readable medium for face images. Specifically, the application is realized by the following technical scheme: in a first aspect, an embodiment of the present application provides an anti-shake method for a face image, where the method includes: Acquiring a plurality of face feature points in a current image frame; determining displacement vectors of the face feature points based on the current image frame and at least two adjacent image frames of the current image frame; Determining a clustering space corresponding to the face feature points, wherein the clustering space comprises the face feature points and face feature points of a designated area around the face feature points; clustering the face feature points in the clustering space according to the displacement vector; And carrying out anti-shake processing on the face feature points according to the clustering result. In a second aspect, an embodiment of the present application provides an anti-shake apparatus for a face image, the apparatus including: The image detection module is used for acquiring a plurality of face feature points in the current image frame; the processing module is used for determining displacement vectors of the acquired face feature points in a current image frame and at least two adjacent frames of the current image frame; The clustering module is used for determining a clustering space corresponding to the face feature points and clustering the face feature points in the clustering space according to the displacement vector, wherein the clustering space comprises the face feature points and face feature points in a designated area around the face feature points; and the anti-shake processing module is used for carrying out anti-shake processing on the face feature points according to the clustering result. In a third aspect, an embodiment of the present application provides an anti-shake apparatus for a face image, the apparatus including: A processor; A memory for storing processor-executable instructions; wherein the processor is configured to perform the operations of any one of the methods of the first aspect. In a fourth aspect, the present application provides a computer readable storage medium having stored thereon computer instructions which, when executed by a processor, perform the operations of any of the methods of the previous first aspect. The application has the beneficial effects that the human face characteristic points are clustered according to the displacement vector by capturing the human face characteristic point displacement vector, whether the human face is moving normally or shaking is judged according to the displacement condition of the human face characteristic points in the cluster, different filtering treatments are respectively carried out for shaking and normal movement of the target human face, so that a good anti-shaking effect under the condition of no delay i