Motion estimation method, electronic equipment and computer readable medium

By predicting the initial motion vector based on motion vectors of adjacent pixel points, narrowing the search range, the problems of complex calculations and waste of resources are solved in the existing motion estimation algorithm, and the efficiency and effect of motion estimation are improved.

CN119277103APending Publication Date: 2025-01-07SANECHIPS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310785294.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

Existing motion estimation algorithms, such as block matching algorithms, optical flow algorithms and Bayesian algorithms, have problems with high computational complexity, waste of hardware resources and poor noise resistance, especially in terms of improving block matching search efficiency, fast search The algorithm has a large amount of calculation and poor estimation effect.

Method used

By predicting the initial motion vector based on the motion vector of adjacent pixel points, narrowing the search range, searching for the best matching pixel points in the previous frame of image, determining the motion type, reducing the calculation amount and saving hardware resources, while improving the estimation effect.

Benefits of technology

It realizes reducing the calculation amount, saving hardware resources, improving the accuracy and efficiency of motion estimation, and enhancing the estimation effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119277103A_ABST
    Figure CN119277103A_ABST
Patent Text Reader

Abstract

The invention provides a motion estimation method, electronic equipment and a computer readable medium, and the method comprises the steps: for each first pixel point in a current frame image, predicting an initial motion vector of the first pixel point according to a motion vector of a second pixel point adjacent to the first pixel point; according to the predicted initial motion vector of the first pixel point, searching a first optimal matching pixel point in the previous frame of image; and determining the motion type of the first pixel point according to the first optimal matching pixel point.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image processing technology, and in particular to a motion estimation method, an electronic device, and a computer-readable medium. Background Art

[0002] The main motion estimation algorithms include block matching algorithm (BMA), optical flow algorithm, pixel recursive algorithm, Bayesian algorithm, etc. Among them, BMA is the most widely used; the optical flow algorithm is complex in calculation, not suitable for hardware implementation and has poor anti-noise performance; the pixel recursive algorithm estimates the motion of each pixel with high accuracy, but the calculation is large and the displacement tracking ability is poor; the Bayesian algorithm is too computationally intensive.

[0003] The principle of BMA is simple and easy to implement, and it is widely used in motion estimation. In order to improve the search efficiency of block matching, a variety of fast search algorithms have emerged, but these fast search algorithms have large computational complexity, resulting in a waste of hardware resources and poor estimation results. Summary of the invention

[0004] Embodiments of the present application provide a motion estimation method, an electronic device, and a computer-readable medium.

[0005] In a first aspect, an embodiment of the present application provides a motion estimation method, including: for each first pixel in a current frame image, predicting an initial motion vector of the first pixel based on a motion vector of a second pixel adjacent to the first pixel; searching for a first best matching pixel in the previous frame image based on the predicted initial motion vector of the first pixel; and determining the motion type of the first pixel based on the first best matching pixel.

[0006] In a second aspect, an embodiment of the present application provides a motion estimation device, comprising: a motion estimation module, used to predict the initial motion vector of each first pixel in a current frame image based on the motion vector of a second pixel adjacent to the first pixel; searching for a first best matching pixel in a previous frame image based on the predicted initial motion vector of the first pixel; and a motion judgment module, used to determine the motion type of the first pixel based on the first best matching pixel.

[0007] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor; a memory, wherein at least one program is stored in the memory, and when the at least one program is executed by the at least one processor, any one of the above-mentioned motion estimation methods is implemented.

[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable medium, on which a computer program is stored, and when the computer program is executed by a processor, any one of the above-mentioned motion estimation methods is implemented.

[0009] The motion estimation method provided in the embodiment of the present application predicts the initial motion vector of the first pixel point based on the motion vector of the second pixel point adjacent to the first pixel point, and searches for the first best matching pixel point in the previous frame image based on the predicted initial motion vector of the first pixel point, thereby narrowing the search range, reducing the amount of calculation, saving hardware resources, and improving the estimation effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 A flowchart of a motion estimation method provided by an embodiment of the present application;

[0011] Figure 2 A schematic diagram of predicting a motion vector of a first pixel point according to a motion vector of a second pixel point adjacent to the first pixel point according to an embodiment of the present application;

[0012] Figures 3 to 5 A flowchart of a motion estimation method provided for an example of an embodiment of the present application;

[0013] Figure 6 A block diagram of a motion estimation device provided by another embodiment of the present application;

[0014] Figure 7 A block diagram of the composition of an electronic device provided in accordance with another embodiment of the present application. DETAILED DESCRIPTION

[0015] In order to enable those skilled in the art to better understand the technical solution of the present application, the motion estimation method, electronic device, and computer-readable medium provided by the present application are described in detail below in conjunction with the accompanying drawings.

[0016] Example embodiments will be described more fully below with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. On the contrary, the purpose of providing these embodiments is to make this application thorough and complete and to enable those skilled in the art to fully understand the scope of this application.

[0017] In the absence of conflict, the embodiments of the present application and the features therein may be combined with each other.

[0018] As used herein, the term "and / or" includes any and all combinations of at least one of the associated listed items.

[0019] The terms used herein are only used to describe specific embodiments and are not intended to limit the present application. As used herein, the singular forms "a", "an" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of at least one other feature, whole, step, operation, element, component and / or its group is not excluded.

[0020] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this application, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined herein.

[0021] Figure 1 A flowchart of a motion estimation method provided by one embodiment of the present application.

[0022] First, refer to Figure 1 , an embodiment of the present application provides a motion estimation method, comprising:

[0023] Step 100, for each first pixel in the current frame image, predict the initial motion vector of the first pixel according to the motion vector of the second pixel adjacent to the first pixel; search for the first best matching pixel in the previous frame image according to the predicted initial motion vector of the first pixel.

[0024] In the embodiment of the present application, the motion vector of the first pixel is initialized by utilizing the principle that physically adjacent neighborhood blocks of the same motion have similar motions, thereby reducing unnecessary search calculations, saving computing resources, and improving computing efficiency.

[0025] In some exemplary embodiments, Figure 2 As shown, the second pixel point may be a pixel point located on the left side of the first pixel point and adjacent to the first pixel point in the current frame image, that is, a left pixel point.

[0026] In some exemplary embodiments, Figure 2 As shown, the second pixel point may be a pixel point located above and adjacent to the first pixel point in the current frame image, that is, an upper pixel point.

[0027] In some exemplary embodiments, Figure 2 As shown, the second pixel point can be a pixel point located on the left side and adjacent to the first pixel point in the current frame image, and a pixel point located above and adjacent to the first pixel point, that is, a left pixel point and an above pixel point.

[0028] In some exemplary embodiments, predicting the initial motion vector of the first pixel point according to the motion vector of a second pixel point adjacent to the first pixel point includes: using the motion vector of the second pixel point as the predicted initial motion vector of the first pixel point.

[0029] In some exemplary embodiments, searching for a first best matching pixel point in the previous frame image based on the predicted initial motion vector of the first pixel point includes: performing a coarse search in the previous frame image based on the predicted initial motion vector of the first pixel point to obtain a second best matching pixel point; and performing a fine search in the previous frame image based on the second best matching pixel point to obtain a first best matching pixel point.

[0030] In some exemplary embodiments, performing a coarse search in the previous frame image according to the predicted initial motion vector of the first pixel point to obtain the second best matching pixel point includes: performing a coarse search in the search window of the previous frame image according to the predicted initial motion vector of the first pixel point to obtain the second best matching pixel point.

[0031] In some exemplary embodiments, performing a detailed search in the previous frame image according to the second best matching pixel point to obtain the first best matching pixel point includes: performing a detailed search in the search window of the previous frame image according to the second best matching pixel point to obtain the first best matching pixel point.

[0032] In some exemplary embodiments, performing a rough search in the previous frame image according to the predicted motion vector of the first pixel point to obtain the second best matching pixel point includes: determining the center pixel point of the adaptive cross search template according to the predicted motion vector of the first pixel point; calculating the phase difference between the first neighborhood block and the third neighborhood block with the center pixel point of the adaptive cross search template as the center pixel point in the previous frame image; wherein the first neighborhood block is a neighborhood block with the first pixel point as the center pixel point in the current frame image; determining four first search pixels in the previous frame image according to the first search arm length and the center pixel point of the adaptive search template; wherein the first search arm length is greater than 1; calculating the phase difference between the first neighborhood block and the third neighborhood block with the first search pixel point as the center pixel point The method comprises the following steps: calculating the phase difference between the first neighborhood block and the third neighborhood block, and the phase difference between the first neighborhood block and the fourth neighborhood block; updating the central pixel point of the adaptive cross search template according to the phase difference between the first neighborhood block and the third neighborhood block, and the phase difference between the first neighborhood block and the fourth neighborhood block, and continuing to perform the step of calculating the phase difference between the first neighborhood block and the third neighborhood block with the central pixel point of the adaptive cross search template as the central pixel point, until the central pixel point of the adaptive cross search template does not change, and taking the central pixel point of the adaptive cross search template as the second best matching pixel point; or until the number of searches is greater than or equal to the first preset threshold, and taking the central pixel point of the neighborhood block with the lowest phase difference between the first neighborhood block and the third neighborhood block, and the phase difference between the first neighborhood block and the fourth neighborhood block as the second best matching pixel point.

[0033] In some exemplary embodiments, determining the center pixel point of the adaptive cross search template based on the predicted initial motion vector of the first pixel point includes: determining the position information of the center pixel point of the adaptive cross search template based on the position information of the first pixel point in the current frame image and the predicted initial motion vector of the first pixel point.

[0034] In some exemplary embodiments, the position information of the central pixel of the adaptive cross search template is determined as the sum of the position information of the first pixel in the current frame image and the predicted motion vector of the first pixel.

[0035] In some exemplary embodiments, determining the center pixel of an adaptive cross search template based on a predicted initial motion vector of a first pixel includes: calculating a phase difference between a first neighborhood block with the first pixel as the center pixel and a second neighborhood block with the third pixel as the center pixel in a current frame image; wherein a position of the third pixel in a previous frame image is the same as a position of the first pixel in a current frame image; determining position information of a fifth pixel in a previous frame image based on position information of the first pixel in the current frame image and the predicted initial motion vector of the first pixel; calculating a phase difference between the first neighborhood block and a seventh neighborhood block with the fifth pixel as the center pixel; and taking the center pixel of a neighborhood block with the lowest phase difference among the phase difference between the first neighborhood block and the second neighborhood block and the phase difference between the first neighborhood block and the seventh neighborhood block as the center pixel of an adaptive cross search target.

[0036] In some exemplary embodiments, determining the position information of the fifth pixel in the previous frame image based on the position information of the first pixel in the current frame image and the predicted initial motion vector of the first pixel includes: determining the position information of the fifth pixel in the previous frame image as the sum of the position information of the first pixel in the current frame image and the predicted motion vector of the first pixel.

[0037] In some exemplary embodiments, when the second pixel point includes a left pixel point and an upper pixel point, the predicted initial motion vector of the first pixel point includes a motion vector of the left pixel point and a motion vector of the upper pixel point. Then, there are two position information of the fifth pixel point, namely, the sum of the position information of the left pixel point and the motion vector of the left pixel point, and the sum of the position information of the upper pixel point and the motion vector of the upper pixel point. Therefore, it is necessary to calculate the phase difference between the first neighborhood block and the two seventh neighborhood blocks respectively, and then take the central pixel point of the neighborhood block with the lowest phase difference among the phase difference between the first neighborhood block and the second neighborhood block and the phase difference between the first neighborhood block and the two seventh neighborhood blocks as the central pixel point of the adaptive cross search target.

[0038] In some exemplary embodiments, the difference between two neighboring blocks may be the Sum of Absolute Difference (SAD) of the two neighboring blocks.

[0039] In some exemplary embodiments, the SAD of two neighborhood blocks may be the sum of the absolute values ​​of the differences in pixel values ​​of the Y channels of each pixel in the two neighborhood blocks.

[0040] In some exemplary embodiments, the smaller the SAD between two neighboring blocks is, the lower the difference between the two neighboring blocks is.

[0041] In some exemplary embodiments, the search arm length may be an initialization value.

[0042] In some exemplary embodiments, Figure 2 As shown, assuming that the search arm length is A, the four first search pixel points are four pixel points obtained by translating the first pixel point to the left by A pixels, to the right by A pixels, upward by A pixels, and downward by A pixels; wherein A is an integer greater than 1.

[0043] In some exemplary embodiments, before determining four search pixels in the previous frame image based on the first search arm length and the center pixel of the adaptive search template, the method further includes: determining the search arm length based on the predicted initial motion vector of the first pixel.

[0044] In some exemplary embodiments, determining the search arm length based on the predicted initial motion vector of the first pixel point includes: determining the search arm length as the second maximum value between the initialization value of the search arm length and the first maximum value; wherein the first maximum value is the maximum value of the relative displacement in the x direction and the relative displacement in the y direction in the motion vector of the predicted first pixel point.

[0045] In some exemplary embodiments, when calculating the phase difference between the first neighborhood block and the fourth neighborhood block with the first search pixel as the center pixel, the phase difference between the first neighborhood block and the fourth neighborhood block with each of the four first search pixels as the center pixel can be calculated separately, that is, all four first search pixels participate in the search process; the phase difference between the first neighborhood block and the fourth neighborhood block with the first search pixel that has not been searched among the four first search pixels as the center pixel can be calculated separately, that is, only the first search pixel that has not been searched participates in the search process; the phase difference between the first neighborhood block and the fourth neighborhood block with the first search pixel that is located in the search window among the four first search pixels as the center pixel can be calculated separately, that is, only the first search pixel that is located in the search window participates in the search process.

[0046] In some exemplary embodiments, a check bitmap may be used to record whether a certain pixel point has been searched before. For example, after the first search is completed, the four first search pixels points are all pixels points that have been searched before.

[0047] In some exemplary embodiments, updating the central pixel point of the adaptive cross search template according to the phase difference between the first neighborhood block and the third neighborhood block, and the phase difference between the first neighborhood block and the fourth neighborhood block includes: updating the central pixel point of the adaptive cross search template to the central pixel point of the neighborhood block with the lowest phase difference.

[0048] In some exemplary embodiments, calculating the phase difference between the first neighborhood block and the third neighborhood block having the center pixel of the adaptive cross search template as the center pixel includes: calculating the SAD of the Y channels of the first neighborhood block and the third neighborhood block as the phase difference between the first neighborhood block and the third neighborhood block.

[0049] Calculating the phase difference between the first neighborhood block and a fourth neighborhood block having the first search pixel as a center pixel includes: calculating the SAD of the Y channels of the first neighborhood block and the fourth neighborhood block as the phase difference between the first neighborhood block and the fourth neighborhood block.

[0050] In some exemplary embodiments, the SAD of the Y channels of the two neighborhood blocks may be the sum of the absolute values ​​of the differences of the pixel values ​​of the Y channels of the two neighborhood blocks on a pixel-by-pixel basis.

[0051] In some exemplary embodiments, the smaller the SAD of the Y channels of two neighboring blocks is, the lower the phase difference between the two neighboring blocks is.

[0052] In some exemplary embodiments, performing a detailed search in the previous frame image according to the second best matching pixel point to obtain the first best matching pixel point includes: taking the second best matching pixel point as the center pixel point of the adaptive cross search template, calculating the phase difference between the first neighborhood block and the third neighborhood block with the center pixel point of the adaptive cross search template in the previous frame image as the center pixel point; wherein the first neighborhood block is a neighborhood block with the first pixel point as the center pixel point in the current frame image; determining four second search pixels in the previous frame image according to the second search arm length and the center pixel point of the adaptive search template; wherein the second search arm length is equal to 1; calculating the first neighborhood block and the fifth neighborhood block with the second search pixel point as the center pixel point updating the central pixel point of the adaptive cross search template according to the phase difference between the first neighborhood block and the third neighborhood block, and the phase difference between the first neighborhood block and the fifth neighborhood block, and continuing to perform the step of calculating the phase difference between the first neighborhood block and the third neighborhood block with the central pixel point of the adaptive cross search template as the central pixel point, until the central pixel point of the adaptive cross search template does not change, and the central pixel point of the adaptive cross search template is used as the first best matching pixel point; or until the number of searches is greater than or equal to a second preset threshold, and the central pixel point of the neighborhood block with the lowest phase difference between the first neighborhood block and the third neighborhood block, and the phase difference between the first neighborhood block and the fifth neighborhood block is used as the first best matching pixel point.

[0053] In some exemplary embodiments, when calculating the phase difference between the first neighborhood block and the fifth neighborhood block with the second search pixel as the center pixel, the phase difference between the first neighborhood block and the fifth neighborhood block with each of the four second search pixels as the center pixel can be calculated separately, that is, all four second search pixels participate in the search process; the phase difference between the first neighborhood block and the fifth neighborhood block with the second search pixel that has not been searched among the four second search pixels as the center pixel can also be calculated separately, that is, only the second search pixel that has not been searched participates in the search process; the phase difference between the first neighborhood block and the fifth neighborhood block with the second search pixel that is located in the search window among the four second search pixels as the center pixel can also be calculated separately, that is, only the second search pixel that is located in the search window participates in the search process.

[0054] In some exemplary embodiments, a check bitmap may be used to record whether a certain pixel point has been searched before. For example, after the first search is completed, the four second search pixels points are all pixels points that have been searched before.

[0055] In some exemplary embodiments, updating the central pixel point of the adaptive cross search template according to the phase difference between the first neighborhood block and the third neighborhood block, and the phase difference between the first neighborhood block and the fifth neighborhood block includes: updating the central pixel point of the adaptive cross search template to the central pixel point of the neighborhood block with the lowest phase difference.

[0056] Step 101: determine the motion type of a first pixel point according to a first best matching pixel point.

[0057] In some exemplary embodiments, determining the motion type of the first pixel point according to the first best matching pixel point includes: determining the motion type of the first pixel point according to the phase difference between the first neighborhood block and a sixth neighborhood block with the first best pixel point as the center pixel point.

[0058] In some exemplary embodiments, determining the motion type of the first pixel point according to the phase difference between the first neighborhood block and the sixth neighborhood block with the first best pixel point as the center pixel point includes at least one of the following:

[0059] When the phase difference between the first neighborhood block and the sixth neighborhood block is lower than the zero motion threshold, determining the motion type of the first pixel point is stationary;

[0060] When the phase difference between the first neighborhood block and the sixth neighborhood block is higher than the zero motion threshold and lower than the first abnormal motion threshold, determining that the motion type of the first pixel is normal motion;

[0061] When the phase difference between the first neighborhood block and the sixth neighborhood block is higher than the zero motion threshold and lower than the first abnormal motion threshold, and the first best pixel is located within the search window, determining that the motion type of the first pixel is normal motion;

[0062] When the phase difference between the first neighborhood block and the sixth neighborhood block is higher than the first abnormal motion threshold, or the first optimal pixel is outside the search window, the motion type of the first pixel is determined to be abnormal motion.

[0063] In some exemplary embodiments, the first abnormal motion threshold is determined according to the local adjustment information of the first pixel and the size of the first neighborhood block. The estimation effect can be improved by modulating the first abnormal motion threshold through the local adjustment information.

[0064] In some exemplary embodiments, the zero motion threshold is calculated according to the formula abn_th=local_factor×patch_cnt×abn_coef; wherein abn_th is the first abnormal motion threshold, local_factor is the local adjustment information, patch_cnt is the size of the first neighborhood block, and abn_coef is the abnormal motion modulation parameter.

[0065] In some exemplary embodiments, the local adjustment information includes at least one of the following: noise level information, brightness information, and texture information.

[0066] In some exemplary embodiments, the zero motion threshold is calculated according to the formula abn_th=noise_level×luma_factor×edge_factor×patch_cnt×abn_coef; wherein abn_th is the first abnormal motion threshold, noise_level is the noise level information, luma_factor is the brightness information, edge_factor is the texture information, patch_cnt is the size of the first neighborhood block, and abn_coef is the abnormal motion modulation parameter.

[0067] In some exemplary embodiments, determining the motion type of the first pixel point based on the first best matching pixel point includes: determining the motion vector of the first pixel point based on relative position information of the first best matching pixel point and the first pixel point; and determining the motion type of the first pixel point based on the motion vector of the first pixel point.

[0068] In some exemplary embodiments, determining the motion vector of the first pixel point based on the relative position information of the first best matching pixel point and the first pixel point includes: determining the motion vector of the first pixel point as the difference between the position information of the first best matching pixel point and the position information of the first pixel point.

[0069] In some exemplary embodiments, determining the motion type of the first pixel point according to the motion vector of the first pixel point includes: determining the motion vector amplitude of the first pixel point according to the motion vector of the first pixel point; and determining the motion type of the first pixel point according to the motion vector amplitude of the first pixel point.

[0070] In some exemplary embodiments, determining the motion type of the first pixel point according to the motion vector magnitude of the first pixel point includes at least one of the following:

[0071] When the motion vector amplitude of the first pixel point is less than the still threshold, determining the motion type of the first pixel point is still;

[0072] When the motion vector amplitude of the first pixel point is greater than or equal to the static threshold and less than or equal to the second abnormal motion threshold, determining the motion type of the first pixel point is normal motion;

[0073] When the motion vector amplitude of the first pixel point is greater than or equal to the static threshold and less than or equal to the second abnormal motion threshold, determining the motion type of the first pixel point is normal motion;

[0074] When the motion vector amplitude of the first pixel is greater than or equal to the second abnormal motion threshold, the motion type of the first pixel is determined to be abnormal motion.

[0075] In some exemplary embodiments, for each first pixel in the current frame image, before predicting the motion vector of the first pixel according to the motion vector of the second pixel adjacent to the first pixel, the method further includes: performing pre-noise reduction processing on the previous frame image; performing pre-noise reduction processing on the current frame image. By performing simple noise reduction processing on the current frame image and the previous frame image through pre-noise reduction processing, the influence of noise on the motion estimation result is reduced, and the estimation effect is improved.

[0076] In some exemplary embodiments, a pre-noise reduction algorithm may be used to perform pre-noise reduction processing on the previous frame of image.

[0077] In some exemplary embodiments, a pre-noise reduction algorithm may be used to perform pre-noise reduction processing on the Y channel of the previous frame of image.

[0078] In some exemplary embodiments, a pre-noise reduction algorithm may be used to perform pre-noise reduction processing on the current frame image.

[0079] In some exemplary embodiments, a pre-noise reduction algorithm may be used to perform pre-noise reduction processing on the Y channel of the current frame image.

[0080] In some exemplary embodiments, the pre-noise reduction algorithm may be a mean filter algorithm.

[0081] In some exemplary embodiments, for each first pixel in the current frame image, before predicting the motion vector of the first pixel based on the motion vector of a second pixel adjacent to the first pixel, the method further includes: performing brightness detection on the current frame image to obtain brightness information of the current frame image.

[0082] In some exemplary embodiments, brightness detection is performed on the Y channel of the current frame image to obtain brightness information of the current frame image.

[0083] In some exemplary embodiments, a brightness detection algorithm may be used to perform brightness detection on the Y channel of the current frame image to obtain brightness information of the current frame image.

[0084] In some exemplary embodiments, the brightness detection algorithm may be a mean filter algorithm.

[0085] In some exemplary embodiments, the brightness detection algorithm and the pre-noise reduction algorithm are the same algorithm. After the current frame image is pre-noise reduction processed, there is no need to perform brightness detection on the current frame image after the pre-noise reduction process. The Y channel of the current frame image after the pre-noise reduction process is the brightness information of the current frame image.

[0086] In some exemplary embodiments, the brightness information of the current frame image includes brightness information of each pixel of the Y channel of the current frame image.

[0087] In some exemplary embodiments, for each first pixel in the current frame image, before predicting the motion vector of the first pixel based on the motion vector of a second pixel adjacent to the first pixel, the method further includes: performing texture detection on the current frame image to obtain texture information.

[0088] In some exemplary embodiments, texture detection is performed on the Y channel of the current frame image to obtain texture information.

[0089] In some exemplary embodiments, a texture detection algorithm may be used to perform texture detection on the Y channel of the current frame image to obtain texture information.

[0090] In some exemplary embodiments, the texture information of the current frame image includes texture information of each pixel point of the Y channel of the current frame image.

[0091] In some exemplary embodiments, before predicting the initial motion vector of the first pixel point according to the motion vector of the second pixel point adjacent to the first pixel point, the method further includes: determining the phase difference between the first neighborhood block with the first pixel point as the center pixel point and the second neighborhood block with the third pixel point as the center pixel point; wherein the position of the third pixel point in the previous frame image is the same as the position of the first pixel point in the current frame image; when the phase difference between the first neighborhood block and the second neighborhood block is lower than the zero motion threshold, determining the motion vector of the first pixel point to be 0 and determining the motion type of the first pixel point to be stationary; when the phase difference between the first neighborhood block and the second neighborhood block is higher than the zero motion threshold, continuing to perform the step of predicting the initial motion vector of the first pixel point according to the motion vector of the second pixel point adjacent to the first pixel point. When it is detected that the first pixel point is stationary, the search is stopped to reduce the waste of computing resources caused by motion estimation of stationary objects and improve computing efficiency.

[0092] In some exemplary embodiments, the zero motion threshold is determined according to the local adjustment information of the first pixel and the size of the first neighborhood block. The estimation effect can be improved by modulating the zero motion threshold through the local adjustment information.

[0093] In some exemplary embodiments, the zero motion threshold is calculated according to the formula zmp_th=local_factor×patch_cnt×zmp_coef; wherein zmp_th is the zero motion threshold, local_factor is the local adjustment information, patch_cnt is the size of the first neighborhood block, and zmp_coef is the zero motion modulation parameter.

[0094] In some exemplary embodiments, the local adjustment information includes at least one of the following: noise level information, brightness information, and texture information.

[0095] In some exemplary embodiments, the zero motion threshold is calculated according to the formula zmp_th=noise_level×luma_factor×edge_factor×patch_cnt×zmp_coef; wherein zmp_th is the zero motion threshold, noise_level is the noise level information, luma_factor is the brightness information, edge_factor is the texture information, patch_cnt is the size of the first neighborhood block, and zmp_coef is the zero motion modulation parameter.

[0096] In some exemplary embodiments, after determining the motion vector of the first pixel point based on the relative position information of the first best matching pixel point and the first pixel point, the method further includes: updating the motion vector of a fourth pixel point adjacent to the first pixel point based on the motion vector of the first pixel point.

[0097] In some exemplary embodiments, updating the motion vector of a fourth pixel adjacent to the first pixel according to the motion vector of the first pixel includes: calculating the phase difference between a first adjacent neighborhood block and a second adjacent neighborhood block; wherein the first adjacent neighborhood block is a neighborhood block with the fourth pixel as the center pixel in the current frame; the second adjacent neighborhood block is a neighborhood block with the pixel determined according to the motion vector of the fourth pixel as the center pixel in the previous frame image; calculating the phase difference between the first adjacent neighborhood block and a third adjacent neighborhood block; wherein the third adjacent neighborhood block is a neighborhood block with the pixel determined according to the motion vector of the first pixel as the center pixel in the previous frame image; when the phase difference between the first adjacent neighborhood block and the second adjacent neighborhood block is lower than the phase difference between the first adjacent neighborhood block and the third adjacent neighborhood block, determining that the motion vector of the fourth pixel remains unchanged; when the phase difference between the first adjacent neighborhood block and the second adjacent neighborhood block is higher than the phase difference between the first adjacent neighborhood block and the third adjacent neighborhood block, updating the motion vector of the fourth pixel to the motion vector of the first pixel.

[0098] In some exemplary embodiments, the fourth pixel may be a pixel located on the left side of and adjacent to the first pixel in the current frame image, that is, a left pixel.

[0099] In some exemplary embodiments, the fourth pixel point may be a pixel point located above and adjacent to the first pixel point in the current frame image, that is, an upper pixel point.

[0100] In some exemplary embodiments, the first pixel may be a pixel located to the left of and adjacent to the first pixel in the current frame image, and a pixel located above and adjacent to the first pixel, that is, a left pixel and an above pixel.

[0101] In some exemplary embodiments, after determining the motion type of the first pixel point according to the first best matching pixel point, the method further includes: performing noise reduction processing on the first pixel point according to the motion type of the first pixel point.

[0102] The motion estimation method provided in the embodiment of the present application predicts the initial motion vector of the first pixel point based on the motion vector of the second pixel point adjacent to the first pixel point, and searches for the first best matching pixel point in the previous frame image based on the predicted initial motion vector of the first pixel point, thereby narrowing the search range, reducing the amount of calculation, saving hardware resources, and improving the estimation effect.

[0103] In order to more completely present the specific implementation process of the motion estimation method of the present application, an example is listed below for illustration. The listed example is not intended to limit the protection scope of the embodiments of the present application.

[0104] Example

[0105] like Figures 3 to 5As shown, the motion estimation method provided in this example includes:

[0106] Step 300, pre-noise reduction processing is performed on the Y channel of the previous frame image prev using a mean filtering algorithm to obtain the Y channel of the previous frame image prefilter_prev after pre-noise reduction processing, and pre-noise reduction processing is performed on the Y channel of the current frame image cur using a mean filtering algorithm to obtain the Y channel of the current frame image prefilter_cur after pre-noise reduction processing.

[0107] Step 301 , performing texture detection on the Y channel of the current frame image prefilter_cur after the pre-noise reduction processing to obtain texture information edge of the current frame image prefilter_cur after the pre-noise reduction processing.

[0108] Step 302, for the i-th first pixel point of the current frame image prefilter_cur after the pre-noise reduction processing, determine the SAD of the first neighborhood block with the i-th first pixel point as the center pixel point and the second neighborhood block with the third pixel point as the center pixel point, that is, SADcenter; wherein the position of the third pixel point in the previous frame image prefilter_prev after the pre-noise reduction processing is the same as the position of the i-th first pixel point in the current frame image prefilter_cur after the pre-noise reduction processing.

[0109] Step 303, determine whether the SAD of the first neighborhood block and the second neighborhood block is less than the zero motion threshold. If the SAD of the first neighborhood block and the second neighborhood block is less than the zero motion threshold, continue to step 304; if the SAD of the first neighborhood block and the second neighborhood block is greater than or equal to the zero motion threshold, continue to step 306.

[0110] Step 304: determine that the motion vector of the i-th first pixel point is 0, and determine that the motion type of the i-th first pixel point is stationary.

[0111] Step 305, add 1 to i and continue to execute step 302.

[0112] Step 306, initialize the first search arm length rood_size to 2, initialize the motion vector of the i-th first pixel point to (0,0), and initialize the SAD minimum value SADmin to SADcenter.

[0113] Step 307, taking the sum of the motion vector of the left pixel point adjacent to the left side of the i-th first pixel point and the position information of the i-th first pixel point as the position information of the first fifth pixel point, and calculating the SAD1 of the first neighborhood block and the first seventh neighborhood block with the first fifth pixel point as the center pixel point; taking the sum of the motion vector of the upper pixel point adjacent to the i-th first pixel point and the position information of the i-th first pixel point as the position information of the second fifth pixel point, and calculating the SAD2 of the first neighborhood block and the second seventh neighborhood block with the second fifth pixel point as the center pixel point.

[0114] Step 308, compare the sizes of SADcenter, SAD1 and SAD2, update SADmin to the minimum value among SADcenter, SAD1 and SAD2, update the motion vector of the i-th first pixel point to the motion vector corresponding to the minimum value among SADcenter, SAD1 and SAD2, and update the first search arm length to MAX(rood_size, MAX(|x_offset_PMV|, |y_offset_PMV|)); wherein rood_size is 2, x_offset_PMV is the relative displacement in the x direction in the motion vector corresponding to the minimum value among SADcenter, SAD1 and SAD2, and y_offset_PMV is the relative displacement in the y direction in the motion vector corresponding to the minimum value among SADcenter, SAD1 and SAD2.

[0115] Step 309: Use the central pixel point of the neighborhood block corresponding to SADmin as the central pixel point of the adaptive cross search template.

[0116] Step 310 , calculating the SAD of the first neighborhood block and the third neighborhood block having the center pixel of the adaptive cross search template as the center pixel in the previous frame image prefilter_prev after pre-noise reduction processing.

[0117] Step 311, translate the first pixel point to the left by A pixels, to the right by A pixels, upward by A pixels, and downward by A pixels to obtain four first search pixel points; where A is MAX(rood_size, MAX(|x_offset_PMV|, |y_offset_PMV|)).

[0118] Step 312, calculate the SAD of the first neighborhood block and the fourth neighborhood block with the first search pixel point that has not been searched among the four first search pixels as the center pixel point; update the center pixel point of the adaptive cross search template to the SAD of the first neighborhood block and the third neighborhood block, and the center pixel point of the neighborhood block with the smallest SAD among the SADs of the first neighborhood block and the fourth neighborhood block.

[0119] Step 313, determining whether the center pixel of the adaptive cross search template changes. If the center pixel of the adaptive cross search template changes, continue to step 314; if the center pixel of the adaptive cross search template does not change, continue to step 315.

[0120] Step 314, determine whether the current search number is greater than or equal to the first preset threshold. If the current search number is greater than or equal to the first preset threshold, execute step 315; if the current search number is less than the first preset threshold, continue to execute step 310.

[0121] Step 315: taking the central pixel of the adaptive cross search template as the second best matching pixel.

[0122] Step 316: Use the second best matching pixel point as the center pixel point of the adaptive cross search template.

[0123] Step 317 , calculating the SAD of the first neighborhood block and the third neighborhood block having the center pixel of the adaptive cross search template as the center pixel in the previous frame image prefilter_prev after the pre-noise reduction process.

[0124] Step 318, translating the first pixel point to the left by A pixels, to the right by A pixels, upward by A pixels, and downward by A pixels to obtain four second search pixel points; wherein A is 1.

[0125] Step 319, calculate the SAD of the first neighborhood block and the fifth neighborhood block with the second search pixel point that has not been searched among the four second search pixel points as the center pixel point; update the center pixel point of the adaptive cross search template to the SAD of the first neighborhood block and the third neighborhood block, and the center pixel point of the neighborhood block with the smallest SAD among the SADs of the first neighborhood block and the fifth neighborhood block.

[0126] Step 320, determining whether the center pixel of the adaptive cross search template changes. If the center pixel of the adaptive cross search template changes, continue to execute step 321; if the center pixel of the adaptive cross search template does not change, continue to execute step 322.

[0127] Step 321, determine whether the current search number is greater than or equal to the second preset threshold. If the current search number is greater than or equal to the second preset threshold, execute step 322; if the current search number is less than the second preset threshold, continue to execute step 317.

[0128] Step 322: taking the central pixel point of the adaptive cross search template as the first best matching pixel point.

[0129] Step 323: determine the motion vector of the first pixel as the difference between the position information of the first best matching pixel and the position information of the first pixel.

[0130] Step 324, determining the motion vector amplitude of the first pixel point according to the motion vector of the first pixel point; and determining the motion type of the first pixel point according to the motion vector amplitude of the first pixel point.

[0131] Figure 6 A block diagram of a motion estimation device provided in another embodiment of the present application.

[0132] Second, refer to Figure 6 Another embodiment of the present application provides a motion estimation device, which may be a hardware unit in an image signal processor (ISP) chip, and includes: a motion estimation module 601, for predicting the motion vector of the first pixel point according to the motion vector of the second pixel point adjacent to the first pixel point for each first pixel point in the current frame image; searching for a first best matching pixel point in the previous frame image according to the predicted motion vector of the first pixel point; and a motion decision module 602, for determining the motion type of the first pixel point according to the first best matching pixel point.

[0133] In some exemplary embodiments, it further includes: a pre-noise reduction module 603, which is used to perform pre-noise reduction processing on the previous frame image; and perform pre-noise reduction processing on the current frame image.

[0134] In some exemplary embodiments, the motion estimation module 601 is further used to: determine the phase difference between a first neighborhood block with the first pixel as the center pixel and a second neighborhood block with the third pixel as the center pixel; wherein the position of the third pixel in the previous frame image is the same as the position of the first pixel in the current frame image; when the phase difference between the first neighborhood block and the second neighborhood block is lower than a zero motion threshold, determine that the motion vector of the first pixel is 0, and determine that the motion type of the first pixel is stationary; when the phase difference between the first neighborhood block and the second neighborhood block is higher than the zero motion threshold, continue to execute the step of predicting the motion vector of the first pixel based on the motion vector of the second pixel adjacent to the first pixel.

[0135] In some exemplary embodiments, the zero motion threshold is determined according to the local adjustment information of the first pixel and the size of the first neighborhood block.

[0136] In some exemplary embodiments, the local adjustment information includes at least one of the following: noise level information, brightness information, and texture information.

[0137] In some exemplary embodiments, the motion estimation module 601 is specifically used to implement searching for a first best matching pixel point in a previous frame image according to a predicted motion vector of a first pixel point in the following manner: performing a coarse search in the previous frame image according to the predicted motion vector of the first pixel point to obtain a second best matching pixel point; and performing a fine search in the previous frame image according to the second best matching pixel point to obtain a first best matching pixel point.

[0138] In some exemplary embodiments, the motion estimation module 601 is specifically used to implement a rough search in the previous frame image according to the predicted motion vector of the first pixel point to obtain the second best matching pixel point in the following manner: determine the center pixel point of the adaptive cross search template according to the predicted motion vector of the first pixel point; calculate the phase difference between the first neighborhood block and the third neighborhood block with the center pixel point of the adaptive cross search template in the previous frame image as the center pixel point; wherein the first neighborhood block is a neighborhood block with the first pixel point as the center pixel point in the current frame image; determine 4 first search pixels in the previous frame image according to the first search arm length and the center pixel point of the adaptive search template; wherein the first search arm length is greater than 1; calculate the first neighborhood block and the third neighborhood block with the first search image as the center pixel point The method comprises the steps of: calculating the phase difference of the fourth neighborhood block with the pixel point as the central pixel point; updating the central pixel point of the adaptive cross search template according to the phase difference between the first neighborhood block and the third neighborhood block and the phase difference between the first neighborhood block and the fourth neighborhood block, and continuing to perform the step of calculating the phase difference between the first neighborhood block and the third neighborhood block with the central pixel point of the adaptive cross search template as the central pixel point, until the central pixel point of the adaptive cross search template does not change, and taking the central pixel point of the adaptive cross search template as the second best matching pixel point; or until the number of searches is greater than or equal to the first preset threshold, and taking the central pixel point of the neighborhood block with the lowest phase difference between the first neighborhood block and the third neighborhood block and the phase difference between the first neighborhood block and the fourth neighborhood block as the second best matching pixel point.

[0139] In some exemplary embodiments, the motion estimation module 601 is further configured to: determine a search arm length according to the predicted motion vector of the first pixel point.

[0140] In some exemplary embodiments, the motion estimation module 601 is specifically used to update the central pixel point of the adaptive cross search template according to the phase difference between the first neighborhood block and the third neighborhood block, and the phase difference between the first neighborhood block and the fourth neighborhood block in the following manner: the central pixel point of the adaptive cross search template is updated to the central pixel point of the neighborhood block with the lowest phase difference.

[0141] In some exemplary embodiments, the motion estimation module 601 is specifically used to calculate the phase difference between the first neighborhood block and the third neighborhood block with the center pixel of the adaptive cross search template as the center pixel point in the following manner: calculate the absolute error of the Y channel of the first neighborhood block and the third neighborhood block as the phase difference between the first neighborhood block and the third neighborhood block.

[0142] The motion estimation module 601 is specifically used to calculate the phase difference between the first neighborhood block and the fourth neighborhood block with the first search pixel as the center pixel in the following manner: calculate the absolute error sum of the Y channels of the first neighborhood block and the fourth neighborhood block as the phase difference between the first neighborhood block and the fourth neighborhood block.

[0143] In some exemplary embodiments, the motion estimation module 601 is specifically used to implement a detailed search in the previous frame image according to the second best matching pixel point to obtain the first best matching pixel point in the following manner: taking the second best matching pixel point as the center pixel point of the adaptive cross search template, and calculating the phase difference between the first neighborhood block and the third neighborhood block with the center pixel point of the adaptive cross search template in the previous frame image as the center pixel point; wherein the first neighborhood block is a neighborhood block with the first pixel point as the center pixel point in the current frame image; determining four second search pixels in the previous frame image according to the second search arm length and the center pixel point of the adaptive search template; wherein the second search arm length is equal to 1; calculating the first neighborhood block and the third neighborhood block with the second search pixel point as the center pixel point the phase difference of the fifth neighborhood block of the pixel point; updating the central pixel point of the adaptive cross search template according to the phase difference between the first neighborhood block and the third neighborhood block, and the phase difference between the first neighborhood block and the fifth neighborhood block, and continuing to perform the step of calculating the phase difference between the first neighborhood block and the third neighborhood block with the central pixel point of the adaptive cross search template as the central pixel point, until the central pixel point of the adaptive cross search template does not change, and the central pixel point of the adaptive cross search template is used as the first best matching pixel point; or until the number of searches is greater than or equal to the second preset threshold, and the central pixel point of the neighborhood block with the lowest phase difference between the first neighborhood block and the third neighborhood block, and the phase difference between the first neighborhood block and the fifth neighborhood block is used as the first best matching pixel point.

[0144] In some exemplary embodiments, the motion judgment module 602 is specifically used to determine the motion type of the first pixel point according to the first best matching pixel point in the following manner: determine the motion type of the first pixel point according to the phase difference between the first neighborhood block and the sixth neighborhood block with the first best pixel point as the center pixel point.

[0145] In some exemplary embodiments, the motion determination module 602 is specifically configured to determine the motion type of the first pixel point according to the phase difference between the first neighborhood block and the sixth neighborhood block with the first best pixel point as the center pixel point by adopting at least one of the following methods:

[0146] When the phase difference between the first neighborhood block and the sixth neighborhood block is lower than the zero motion threshold, determining the motion type of the first pixel point is stationary;

[0147] When the phase difference between the first neighborhood block and the sixth neighborhood block is higher than the zero motion threshold and lower than the first abnormal motion threshold, determining that the motion type of the first pixel is normal motion;

[0148] When the phase difference between the first neighborhood block and the sixth neighborhood block is higher than the zero motion threshold and lower than the first abnormal motion threshold, and the first best pixel is located within the search window, determining that the motion type of the first pixel is normal motion;

[0149] When the phase difference between the first neighborhood block and the sixth neighborhood block is higher than the first abnormal motion threshold, or the first optimal pixel is outside the search window, the motion type of the first pixel is determined to be abnormal motion.

[0150] In some exemplary embodiments, the first abnormal motion threshold is determined according to the local adjustment information of the first pixel and the size of the first neighborhood block.

[0151] In some exemplary embodiments, the motion judgment module 602 is specifically used to determine the motion type of the first pixel point based on the first best matching pixel point in the following manner: determine the motion vector of the first pixel point based on the relative position information of the first best matching pixel point and the first pixel point; determine the motion type of the first pixel point based on the motion vector of the first pixel point.

[0152] In some exemplary embodiments, the motion estimation module 601 is further configured to: update a motion vector of a fourth pixel point adjacent to the first pixel point according to the motion vector of the first pixel point.

[0153] In some exemplary embodiments, the motion estimation module 601 is specifically used to update the motion vector of a fourth pixel adjacent to the first pixel according to the motion vector of the first pixel in the following manner: calculating the phase difference between the first adjacent neighborhood block and the second adjacent neighborhood block; wherein the first adjacent neighborhood block is a neighborhood block with the fourth pixel as the center pixel in the current frame; the second adjacent neighborhood block is a neighborhood block with the pixel determined according to the motion vector of the fourth pixel as the center pixel in the previous frame image; calculating the phase difference between the first adjacent neighborhood block and the third adjacent neighborhood block; wherein the third adjacent neighborhood block is a neighborhood block with the pixel determined according to the motion vector of the first pixel as the center pixel in the previous frame image; when the phase difference between the first adjacent neighborhood block and the second adjacent neighborhood block is lower than the phase difference between the first adjacent neighborhood block and the third adjacent neighborhood block, determining that the motion vector of the fourth pixel remains unchanged; when the phase difference between the first adjacent neighborhood block and the second adjacent neighborhood block is higher than the phase difference between the first adjacent neighborhood block and the third adjacent neighborhood block, updating the motion vector of the fourth pixel to the motion vector of the first pixel.

[0154] In some exemplary embodiments, the motion judgment module 602 is specifically used to determine the motion type of the first pixel point according to the motion vector of the first pixel point in the following manner: determine the motion vector amplitude of the first pixel point according to the motion vector of the first pixel point; determine the motion type of the first pixel point according to the motion vector amplitude of the first pixel point.

[0155] In some exemplary embodiments, the motion determination module 602 is specifically configured to determine the motion type of the first pixel point according to the motion vector amplitude of the first pixel point by using at least one of the following methods:

[0156] When the motion vector amplitude of the first pixel point is less than the still threshold, determining the motion type of the first pixel point is still;

[0157] When the motion vector amplitude of the first pixel point is greater than or equal to the static threshold and less than or equal to the second abnormal motion threshold, determining the motion type of the first pixel point is normal motion;

[0158] When the motion vector amplitude of the first pixel point is greater than or equal to the static threshold and less than or equal to the second abnormal motion threshold, determining the motion type of the first pixel point is normal motion;

[0159] When the motion vector amplitude of the first pixel is greater than the second abnormal motion threshold, it is determined that the motion type of the first pixel is abnormal motion.

[0160] The specific implementation process of the above motion estimation device is the same as the specific implementation process of the motion estimation method in the above embodiment, which will not be repeated here.

[0161] Thirdly, refer to Figure 7 Another embodiment of the present application provides an electronic device, including: at least one processor 701; a memory 702, wherein at least one program is stored in the memory 702, and when the at least one program is executed by the at least one processor 701, any one of the above-mentioned motion estimation methods is implemented.

[0162] In some exemplary embodiments, the electronic device further includes: one or more I / O interfaces 703 connected between the processor 701 and the memory 702 , and configured to implement information interaction between the processor 701 and the memory 702 .

[0163] Among them, the processor 701 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 702 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 703 is connected between the processor 701 and the memory 702, and can realize information interaction between the processor 701 and the memory 702, including but not limited to a data bus (Bus), etc.

[0164] In some embodiments, the processor 701 , the memory 702 , and the I / O interface 703 are connected to each other via a bus 704 , and further connected to other components of the computing device.

[0165] In a fourth aspect, another embodiment of the present application provides a computer-readable medium, on which a computer program is stored, and when the computer program is executed by a processor, any one of the above-mentioned motion estimation methods is implemented.

[0166] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0167] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present application as set forth in the appended claims.

Claims

1. A motion estimation method, comprising: For each first pixel in the current frame image, predict an initial motion vector of the first pixel according to a motion vector of a second pixel adjacent to the first pixel; Searching for a first best matching pixel in the previous frame image according to the predicted initial motion vector of the first pixel; The motion type of the first pixel is determined according to the first best matching pixel.

2. The motion estimation method according to claim 1, before predicting the initial motion vector of each first pixel in the current frame image according to the motion vector of a second pixel adjacent to the first pixel, the method further comprises: Performing pre-noise reduction processing on the previous frame image; Perform pre-noise reduction processing on the current frame image.

3. The motion estimation method according to claim 1, before predicting the initial motion vector of the first pixel point according to the motion vector of the second pixel point adjacent to the first pixel point, the method further comprises: Determine a phase difference between a first neighborhood block with the first pixel as a center pixel and a second neighborhood block with a third pixel as a center pixel; wherein a position of the third pixel in the previous frame image is the same as a position of the first pixel in the current frame image; When the phase difference between the first neighborhood block and the second neighborhood block is lower than a zero motion threshold, determining that the motion vector of the first pixel is 0, and determining that the motion type of the first pixel is stationary; When the phase difference between the first neighborhood block and the second neighborhood block is higher than the zero motion threshold, continue to perform the step of predicting the initial motion vector of the first pixel point according to the motion vector of the second pixel point adjacent to the first pixel point.

4. The motion estimation method according to claim 3, wherein: The zero motion threshold is determined according to the local adjustment information of the first pixel and the size of the first neighborhood block.

5. The motion estimation method according to claim 4, wherein: The local adjustment information includes at least one of the following: Noise level information, brightness information, texture information.

6. The motion estimation method according to any one of claims 1 to 5, wherein: The step of searching for a first best matching pixel point in the previous frame image according to the predicted initial motion vector of the first pixel point comprises: Performing a rough search in the previous frame image according to the predicted initial motion vector of the first pixel to obtain a second best matching pixel; The first best matching pixel point is obtained by performing a detailed search in the previous frame image according to the second best matching pixel point.

7. The motion estimation method according to claim 6, wherein: The step of performing a rough search in the previous frame image according to the predicted initial motion vector of the first pixel to obtain a second best matching pixel comprises: Determine a central pixel point of an adaptive cross search template according to the predicted initial motion vector of the first pixel point; Calculating the phase difference between the first neighborhood block and a third neighborhood block having the central pixel of the adaptive cross search template in the previous frame image as the center pixel; wherein the first neighborhood block is the neighborhood block having the first pixel as the center pixel in the current frame image; Determine four first search pixel points in the previous frame image according to the first search arm length and the central pixel point of the adaptive search template; wherein the first search arm length is greater than 1; Calculating a phase difference between the first neighborhood block and a fourth neighborhood block having the first search pixel as a center pixel; The central pixel of the adaptive cross search template is updated according to the phase difference between the first neighborhood block and the third neighborhood block, and the phase difference between the first neighborhood block and the fourth neighborhood block, and the step of calculating the phase difference between the first neighborhood block and the third neighborhood block with the central pixel of the adaptive cross search template as the central pixel is continued until the central pixel of the adaptive cross search template does not change, and the central pixel of the adaptive cross search template is used as the second best matching pixel; or until the number of searches is greater than or equal to a first preset threshold, and the central pixel of the neighborhood block with the lowest phase difference between the first neighborhood block and the third neighborhood block, and the phase difference between the first neighborhood block and the fourth neighborhood block is used as the second best matching pixel.

8. The motion estimation method according to claim 7, before determining the four search pixels in the previous frame image according to the first search arm length and the central pixel of the adaptive search template, the method further comprises: The search arm length is determined according to the predicted motion vector of the first pixel point.

9. The motion estimation method according to claim 7, wherein: The updating of the central pixel point of the adaptive cross search template according to the phase difference between the first neighborhood block and the third neighborhood block, and the phase difference between the first neighborhood block and the fourth neighborhood block comprises: The central pixel point of the adaptive cross search template is updated to the central pixel point of the neighborhood block with the lowest difference.

10. The motion estimation method according to claim 7, wherein: The calculating of the phase difference between the first neighborhood block and the third neighborhood block with the center pixel of the adaptive cross search template as the center pixel comprises: calculating the absolute error sum of the Y channels of the first neighborhood block and the third neighborhood block as the phase difference between the first neighborhood block and the third neighborhood block; The calculating of the phase difference between the first neighborhood block and a fourth neighborhood block having the first search pixel as a center pixel includes: calculating the absolute error of the Y channels of the first neighborhood block and the fourth neighborhood block as the phase difference between the first neighborhood block and the fourth neighborhood block.

11. The motion estimation method according to claim 6, wherein: The step of performing a detailed search in the previous frame image according to the second best matching pixel point to obtain the first best matching pixel point comprises: Taking the second best matching pixel point as the center pixel point of the adaptive cross search template, calculating the phase difference between the first neighborhood block and a third neighborhood block having the center pixel point of the adaptive cross search template in the previous frame image as the center pixel point; wherein the first neighborhood block is the neighborhood block having the first pixel point as the center pixel point in the current frame image; Determine four second search pixel points in the previous frame image according to the second search arm length and the central pixel point of the adaptive search template; wherein the second search arm length is equal to 1; Calculating a phase difference between the first neighborhood block and a fifth neighborhood block having the second search pixel as a center pixel; The central pixel of the adaptive cross search template is updated according to the phase difference between the first neighborhood block and the third neighborhood block, and the phase difference between the first neighborhood block and the fifth neighborhood block, and the step of calculating the phase difference between the first neighborhood block and the third neighborhood block with the central pixel of the adaptive cross search template as the central pixel is continued until the central pixel of the adaptive cross search template does not change, and the central pixel of the adaptive cross search template is used as the first best matching pixel; or until the number of searches is greater than or equal to a second preset threshold, and the central pixel of the neighborhood block with the lowest phase difference between the first neighborhood block and the third neighborhood block, and the phase difference between the first neighborhood block and the fifth neighborhood block is used as the first best matching pixel.

12. The motion estimation method according to claim 11, wherein: Determining the motion type of the first pixel point according to the first best matching pixel point includes: The motion type of the first pixel is determined according to the phase difference between the first neighborhood block and a sixth neighborhood block having the first optimal pixel as a central pixel.

13. The motion estimation method according to claim 12, wherein: Determining the motion type of the first pixel point according to the phase difference between the first neighborhood block and the sixth neighborhood block with the first optimal pixel point as the center pixel point includes at least one of the following: When the phase difference between the first neighborhood block and the sixth neighborhood block is lower than a zero motion threshold, determining that the motion type of the first pixel is stationary; When the phase difference between the first neighborhood block and the sixth neighborhood block is higher than a zero motion threshold and lower than a first abnormal motion threshold, determining that the motion type of the first pixel is a normal motion; When the phase difference between the first neighborhood block and the sixth neighborhood block is higher than a zero motion threshold and lower than a first abnormal motion threshold, and the first optimal pixel is located within the search window, determining that the motion type of the first pixel is a normal motion; When the phase difference between the first neighborhood block and the sixth neighborhood block is higher than the first abnormal motion threshold, or the first optimal pixel is outside the search window, the motion type of the first pixel is determined to be abnormal motion.

14. The motion estimation method according to claim 13, wherein: The first abnormal motion threshold is determined according to the local adjustment information of the first pixel and the size of the first neighborhood block.

15. The motion estimation method according to any one of claims 1 to 5, wherein: Determining the motion type of the first pixel point according to the first best matching pixel point includes: Determine a motion vector of the first pixel point according to relative position information between the first best matching pixel point and the first pixel point; The motion type of the first pixel is determined according to the motion vector of the first pixel.

16. The motion estimation method according to claim 15, after determining the motion vector of the first pixel point according to the relative position information of the first best matching pixel point and the first pixel point, the method further comprises: A motion vector of a fourth pixel point adjacent to the first pixel point is updated according to the motion vector of the first pixel point.

17. The motion estimation method according to claim 16, wherein: The updating of the motion vector of a fourth pixel point adjacent to the first pixel point according to the motion vector of the first pixel point comprises: Calculating the phase difference between the first adjacent neighborhood block and the second adjacent neighborhood block; wherein the first adjacent neighborhood block is a neighborhood block with the fourth pixel as the center pixel in the current frame; and the second adjacent neighborhood block is a neighborhood block with the pixel point determined according to the motion vector of the fourth pixel point in the previous frame image as the center pixel point; Calculating the phase difference between the first adjacent neighborhood block and the third adjacent neighborhood block; wherein the third adjacent neighborhood block is a neighborhood block with a pixel point determined according to the motion vector of the first pixel point in the previous frame image as a center pixel point; In a case where the phase difference between the first adjacent neighborhood block and the second adjacent neighborhood block is lower than the phase difference between the first adjacent neighborhood block and the third adjacent neighborhood block, determining that the motion vector of the fourth pixel point remains unchanged; When the phase difference between the first adjacent neighborhood block and the second adjacent neighborhood block is higher than the phase difference between the first adjacent neighborhood block and the third adjacent neighborhood block, the motion vector of the fourth pixel is updated to the motion vector of the first pixel.

18. The motion estimation method according to claim 15, wherein: Determining the motion type of the first pixel point according to the motion vector of the first pixel point includes: Determine a motion vector amplitude of the first pixel point according to the motion vector of the first pixel point; The motion type of the first pixel is determined according to the motion vector amplitude of the first pixel.

19. The motion estimation method according to claim 18, wherein: Determining the motion type of the first pixel point according to the motion vector amplitude of the first pixel point includes at least one of the following: When the motion vector amplitude of the first pixel point is less than a still threshold, determining the motion type of the first pixel point is still; When the motion vector amplitude of the first pixel is greater than or equal to the static threshold and less than a second abnormal motion threshold, determining that the motion type of the first pixel is normal motion; When the motion vector amplitude of the first pixel is greater than or equal to the second abnormal motion threshold, it is determined that the motion type of the first pixel is abnormal motion.

20. A motion estimation device, comprising: A motion estimation module is used to predict, for each first pixel in the current frame image, an initial motion vector of the first pixel according to a motion vector of a second pixel adjacent to the first pixel; and search for a first best matching pixel in the previous frame image according to the predicted initial motion vector of the first pixel; A motion judgment module is used to determine the motion type of the first pixel point according to the first best matching pixel point.

21. An electronic device comprising: at least one processor; A memory, wherein at least one program is stored in the memory, and when the at least one program is executed by the at least one processor, the motion estimation method according to any one of claims 1 to 19 is implemented.

22. A computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the motion estimation method according to any one of claims 1 to 19.