Method and device for acquiring multiple motion vectors

By calculating hash values ​​and matching target feature points on multiple feature points, processing hash values ​​conflicts, and obtaining multiple global motion vectors, the problem that traditional methods can only detect one global motion vector is solved, and multiple global motions are realized Vector detection improves coding efficiency and user experience.

CN118921467APending Publication Date: 2024-11-08XIAN WANXIANG ELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411035496.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

The traditional global motion vector detection method can only detect one global motion vector, resulting in low encoding efficiency and inability to effectively handle multiple global motion vectors.

Method used

By determining multiple feature points, calculating and matching their hash values, retaining feature points corresponding to the hash values ​​with the same numerical value, setting thresholds to handle hash values ​​conflicts, and obtaining multiple global motion vectors based on the target feature points, including calculations Position offset and counting the number of feature points to determine multiple global motion vectors.

Benefits of technology

It can detect multiple global motion vectors, reduce the code rate, improve encoding efficiency and user experience, and is suitable for video encoding of multiple motion targets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921467A_ABST
    Figure CN118921467A_ABST
Patent Text Reader

Abstract

The invention provides a method and a device for acquiring multiple motion vectors, relates to the field of data processing, can have better coding efficiency for videos of multiple moving targets, and fully utilizes information of reference frames. According to the specific technical scheme, multiple feature points are determined; calculating a hash value corresponding to each feature point in the plurality of feature points, and reserving the feature points corresponding to the hash values with the same numerical value, the number of the feature points corresponding to the hash values with the same numerical value not exceeding a first preset threshold value; matching a target feature point according to the hash value corresponding to each feature point in the plurality of feature points, wherein the target feature point belongs to the plurality of feature points; and obtaining a plurality of global motion vectors through the target feature points. The method can be compatible with a traditional global motion detection method, can detect a plurality of global motion vectors in the horizontal or vertical direction for the condition that a plurality of global motion vectors exist, greatly reduces the code rate, and can greatly improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing, and in particular to a method and device for acquiring multiple motion vectors. Background Art

[0002] When the user pans the window in an office scene, the content of the current frame and the reference frame in the drag window is exactly the same, and there is a global motion vector between the two frames. After accurately obtaining the global motion vector, the coding residual will be reduced, which can greatly improve the coding efficiency.

[0003] However, the traditional global motion vector detection method has some drawbacks. For example, the general global motion vector detection method can only detect one global motion vector, which greatly affects the coding efficiency. Summary of the invention

[0004] The embodiment of the present disclosure provides a method and device for acquiring multiple motion vectors, which can detect multiple global motion vectors in the case of multiple global motion vectors, greatly reducing the bit rate. The technical solution is as follows:

[0005] According to a first aspect of an embodiment of the present disclosure, a method for acquiring multiple motion vectors is provided, the method comprising: determining multiple feature points; calculating a hash value corresponding to each of the multiple feature points, and retaining feature points corresponding to hash values ​​with the same numerical value, wherein the number of feature points corresponding to hash values ​​with the same numerical value does not exceed a first preset threshold; matching a target feature point according to the hash value corresponding to each of the multiple feature points, wherein the target feature point belongs to multiple feature points; and acquiring multiple global motion vectors through the target feature point.

[0006] Specifically, after finding a feature point, define the Y component of 32 consecutive pixels (including the feature point) from the feature point to the right as the feature value. The feature value is an array containing 32 elements. The corresponding hash value is calculated for the feature value through CRC-16. The hash value is represented by two bytes. After finding each feature point of multiple feature points, the hash value of the feature point is calculated.

[0007] Afterwards, feature points corresponding to hash values ​​with the same numerical values ​​will not be eliminated. At the same time, the number of feature points corresponding to hash values ​​with the same numerical values ​​can be set not to exceed the first preset threshold. For example, the first preset threshold can be set to 4 (that is, the maximum number of hash value conflicts is set to 4), that is, the same hash value can correspond to multiple different feature points, and the coordinate positions and feature values ​​of these feature points are recorded.

[0008] Based on the above scheme, it is compatible with the traditional global motion detection method. In the case of multiple global motion vectors, it can detect multiple global motion vectors in the horizontal or vertical direction. It has better encoding efficiency for videos of multiple moving targets, makes full use of the information of the reference frame, greatly reduces the bit rate, and can greatly improve the user experience.

[0009] In some embodiments, the target feature point is matched according to the hash value corresponding to each feature point among the multiple feature points, including: when there are at least two feature points among the multiple feature points corresponding to the hash value with the same numerical value, the target feature point is matched according to the coordinates of the multiple feature points, and the target feature point belongs to the multiple feature points.

[0010] For example, if the hash values ​​with the same numerical value correspond to at least two of the multiple feature points, that is, the hash value of the reference frame or the current frame corresponds to more than one feature point, that is, in the form of "one-to-many" matching or "many-to-many" matching, the target feature point can be matched according to the coordinates of the multiple feature points, for example, only the feature points in the same horizontal reverse direction or the same vertical direction are matched. Among them, the target feature point belongs to multiple feature points.

[0011] In some embodiments, multiple global motion vectors are obtained through target feature points, including: calculating the position offset of initial feature point pairs, the initial feature point pairs are feature points in the target feature points with the same corresponding hash value; counting the number of target feature point pairs through the initial feature point pairs, and arranging them in descending order according to the position offset, the target feature point pairs are composed of feature point pairs with the same position offset in the initial feature point pairs; and obtaining multiple global motion vectors through the position offset of the target feature point pairs.

[0012] For example, first, the position offsets of the matched feature point pairs (i.e., initial feature point pairs) are calculated; then, the number of feature point pairs with the same position offset (i.e., target feature point pairs) is counted and arranged in descending order according to the position offset, such as (x0, y0, n0), (x1, y1, n1), (x2, y2, n2), .... Among them, x, y are the offsets between the feature point pairs, and n is the number of feature points that satisfy this offset.

[0013] In some embodiments, multiple global motion vectors are obtained through target feature point pairs, including: deleting position offsets of feature point pairs in the target feature point pairs whose number is less than a second preset threshold to obtain a target position offset set; calculating the position offset with the highest proportion in the target position offset set, the number of position offsets with the highest proportion is not greater than a third preset threshold, and the number of feature points of the position offset with the highest proportion is greater than a fourth preset threshold; calculating a first value and a second value, the first value being the sum of the number of feature points with the position offset with the highest proportion, and the second value being the sum of the number of feature points with valid position offsets among multiple feature points; and determining multiple global motion vectors through the first value and the second value.

[0014] Exemplarily, first, the offsets with smaller n values ​​among (x0, y0, n0), (x1, y1, n1), (x2, y2, n2), ... are eliminated to obtain a set of target position offsets; then, several position offsets with the highest appearance ratio in the target position offset set are calculated (exemplarily, the embodiment of the present disclosure sets the number of position offsets with the highest appearance ratio to 4, that is, the third threshold is 4), and their corresponding n values ​​are greater than a certain threshold (that is, the fourth preset threshold); then, a first value and a second value are calculated, wherein the first value is the sum of the number of feature points with the highest proportion of position offsets, and the second value is the sum of the number of feature points with valid position offsets among multiple feature points. For example, the sum of the n values ​​of the selected offsets (that is, the position offsets with the highest proportion) is recorded as top_n (that is, the first value), and the sum of the n values ​​of all valid position offsets (that is, multiple feature points with valid position offsets) is recorded as total_n (that is, the second value).

[0015] In some embodiments, determining a plurality of global motion vectors by using a first value and a second value includes: if the first value is greater than a product of the second value and a scaling factor, determining a position offset with the highest scaling as the plurality of global motion vectors.

[0016] For example, if top_n>total_n·η, where η is a preset scaling factor, illustratively, set to 0.7 in the embodiment of the present disclosure, the selected position offsets (ie, the position offsets with the highest scaling) are all set as the global motion vectors.

[0017] According to a second aspect of an embodiment of the present disclosure, a device for acquiring multiple motion vectors is provided, comprising a memory and a processor. The memory has a stored program. When the program is executed in the processor, the processor is used to execute the method of the first aspect and any embodiment of the first aspect.

[0018] Based on the above equipment, it is compatible with traditional global motion detection. In the case of multiple global motion vectors, it can detect multiple global motion vectors in the horizontal or vertical direction. It has better encoding efficiency for videos of multiple moving targets, makes full use of the information of the reference frame, greatly reduces the bit rate, and can greatly improve the user experience.

[0019] According to a third aspect of an embodiment of the present disclosure, a device for acquiring multiple motion vectors is provided, including: a determination module for determining multiple feature points; a calculation module for calculating a hash value corresponding to each of the multiple feature points, and retaining feature points corresponding to hash values ​​with the same numerical value, and the number of feature points corresponding to hash values ​​with the same numerical value does not exceed a first preset threshold; a matching module for matching a target feature point according to the hash values ​​corresponding to each of the multiple feature points, the target feature point belonging to multiple feature points; an acquisition module for acquiring multiple global motion vectors through the target feature points.

[0020] In some embodiments, the matching module is specifically used to match the target feature point according to the coordinates of the multiple feature points when there are at least two feature points among the multiple feature points corresponding to the hash values ​​with the same numerical value, and the target feature point belongs to the multiple feature points.

[0021] In some embodiments, the acquisition module specifically includes: a first calculation submodule, used to calculate the position offset of the initial feature point pairs, the initial feature point pairs are feature points in the target feature points with the same corresponding hash value; a statistical submodule, used to count the number of target feature point pairs through the initial feature point pairs, and arrange them in descending order according to the position offset, the target feature point pairs are composed of feature point pairs with the same position offset in the initial feature point pairs; an acquisition submodule, used to acquire multiple global motion vectors through the position offset of the target feature point pairs.

[0022] In some embodiments, the acquisition submodule specifically includes: a deletion submodule, used to delete the position offsets of feature point pairs in the target feature point pairs whose number is less than a second preset threshold, and obtain a target position offset set; a second calculation submodule, used to calculate the position offset with the highest proportion in the target position offset set, the number of position offsets with the highest proportion is not greater than a third preset threshold, and the number of feature points with the highest proportion is greater than a fourth preset threshold; a third calculation submodule, used to calculate a first value and a second value, the first value being the sum of the number of feature points with the position offset with the highest proportion, and the second value being the sum of the number of feature points with valid position offsets among multiple feature points; a determination submodule, used to determine multiple global motion vectors through the first value and the second value.

[0023] In some embodiments, the determination submodule is specifically configured to: if the first value is greater than the product of the second value and the scale factor, determine the position offset with the highest scale as a plurality of global motion vectors.

[0024] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, characterized in that the computer program storage medium has program instructions, and when the program instructions are executed by a processor, the processor executes the method of the first aspect and any embodiment of the first aspect.

[0025] According to the fifth aspect of the embodiments of the present disclosure, a chip system is provided, characterized in that the chip system includes at least one processor, and when program instructions are executed in the at least one processor, the at least one processor executes the method of the first aspect and any embodiment of the first aspect.

[0026] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0028] Figure 1 is a schematic diagram of a reference frame 100;

[0029] Figure 2 is a schematic diagram of a current frame 200;

[0030] Figure 3 is a schematic diagram of a method 300 for acquiring multiple motion vectors provided by an embodiment of the present disclosure;

[0031] Figure 4 is a schematic diagram of a method 400 for determining a feature point;

[0032] Figure 5 is a schematic diagram of a repeated texture structure 500 in an image;

[0033] Figure 6 is a structural diagram of a multi-motion vector acquisition device 600 provided in an embodiment of the present disclosure;

[0034] Figure 7 is a structural diagram of a device 700 for acquiring multiple motion vectors provided in an embodiment of the present disclosure;

[0035] Figure 8 is another structural diagram of a device 700 for acquiring multiple motion vectors provided by an embodiment of the present disclosure;

[0036] Fig. 9 It is another structural diagram of a device 700 for acquiring multiple motion vectors provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0037] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0038] When users are working in an office environment, they often drag windows. When a window is panned, the content of the current frame and the reference frame in the dragged window is completely consistent. There is a global motion vector between the two frames. After accurately obtaining the global motion vector, the coding residual will be reduced, which can greatly improve the coding efficiency. Among them, conventional detection methods for global motion vectors already exist.

[0039] However, traditional global motion vector detection methods have some drawbacks. Figure 1 is a schematic diagram of a reference frame 100, Figure 2 is a schematic diagram of a current frame 200, such as Figure 1 and Figure 2 As shown in the figure, both images have 4 strips, and the strips corresponding to the reference frame and the current frame are marked in the figure. Since the motion rates of each strip are different, there are actually multiple global motion vectors in the current frame and the reference frame. However, the general global motion vector detection method can only detect one global motion vector. If the traditional global motion vector detection method is used for this example, at most only one global motion vector can be obtained, which greatly affects the coding efficiency.

[0040] In view of this, the present disclosure provides a method for acquiring multiple motion vectors, which can improve the above problems and enhance the user experience.

[0041] The present disclosure provides a method 300 for acquiring multiple motion vectors. Figure 3 As shown, the method 300 for obtaining multiple motion vectors includes the following steps:

[0042] S310, determining a plurality of feature points.

[0043] Specifically, the detection of motion vectors is based on the detection of feature points. Figure 4 4 is a schematic diagram of a method 400 for determining a feature point. Figure 4 As shown, when the Y component values ​​of X1, X2, X3 and X4 are the same and different from the Y component value of X, then X is the feature point. In this way, multiple feature points are determined.

[0044] S320, calculating a hash value corresponding to each feature point among the plurality of feature points, and retaining feature points corresponding to hash values ​​having the same numerical value.

[0045] Among them, the number of feature points corresponding to hash values ​​with the same numerical value does not exceed a first preset threshold.

[0046] Specifically, after finding a feature point, define the Y component of 32 consecutive pixels (including the feature point) from the feature point to the right as the feature value. The feature value is an array containing 32 elements. The corresponding hash value is calculated for the feature value through CRC-16. The hash value is represented by two bytes. After finding each feature point of multiple feature points, the hash value of the feature point is calculated.

[0047] Furthermore, if the hash values ​​are the same, the traditional method is to invalidate the feature points corresponding to the hash values ​​with the same value. However, this method will cause a problem: Figure 5 is a schematic diagram of a repeated texture structure 500 in an image. Figure 5 As shown in the figure, when there are repeated texture structures in the image, the pixels in the neighborhood of the feature points are exactly the same. The target in the circle in the figure contains a large number of feature points, but the contents of each circle are exactly the same, which will cause numerical conflicts in the hash values. According to the traditional method, the feature points corresponding to the same hash values ​​will be discarded, so only one feature point in the four circles will be retained. However, in this way, multiple global motion vectors will not be found.

[0048] However, the specific method provided by the embodiment of the present disclosure is: retaining feature points corresponding to hash values ​​with the same numerical value, and the number of feature points corresponding to hash values ​​with the same numerical value does not exceed a first preset threshold.

[0049] For example, in this step, feature points corresponding to hash values ​​with the same numerical values ​​will not be eliminated. At the same time, the number of feature points corresponding to hash values ​​with the same numerical values ​​can be set not to exceed a first preset threshold. Exemplarily, the first preset threshold can be set to 4 (that is, the maximum number of hash value conflicts is set to 4), that is, the same hash value can correspond to multiple different feature points, and the coordinate positions and feature values ​​of these feature points are recorded.

[0050] S330, matching the target feature point according to the hash value corresponding to each feature point in the plurality of feature points.

[0051] Among them, the target feature point belongs to multiple feature points.

[0052] Specifically, if there are no hash values ​​with the same numerical value corresponding to at least two feature points among multiple feature points, that is, if there is only one feature point corresponding to the hash value of the reference frame and the current frame, that is, a "one-to-one" match, then the traditional feature matching method can be used.

[0053] For example, the hash values ​​of the feature points of the current frame and the reference frame are compared. When the hash values ​​match, the feature values ​​are further compared. If the feature values ​​match, the offset of the feature points is calculated. Since the feature values ​​and hash values ​​of the feature points in this method correspond one to one, it cannot solve the problem that the embodiments of the present disclosure can solve.

[0054] However, in the case where there are at least two feature points among the multiple feature points corresponding to the same hash value, the target feature point can be matched according to the hash values ​​corresponding to the respective feature points among the multiple feature points in the following manner:

[0055] The target feature point is matched according to the coordinates of multiple feature points, and the target feature point belongs to multiple feature points.

[0056] For example, if the hash values ​​with the same numerical value correspond to at least two of the multiple feature points, that is, the hash value of the reference frame or the current frame corresponds to more than one feature point, that is, in the form of "one-to-many" matching or "many-to-many" matching, the target feature point can be matched according to the coordinates of the multiple feature points, for example, only the feature points in the same horizontal reverse direction or the same vertical direction are matched. Among them, the target feature point belongs to multiple feature points.

[0057] S340, obtaining multiple global motion vectors through the target feature points.

[0058] Specifically, obtaining multiple global motion vectors through target feature points may include the following steps:

[0059] Calculate the position offset of the initial feature point pair, where the initial feature point pair is the feature points with the same hash value as the corresponding values ​​in the target feature points;

[0060] The number of target feature point pairs is counted through the initial feature point pairs, and they are arranged in descending order according to the position offset. The target feature point pairs are composed of feature point pairs with the same position offset in the initial feature point pairs.

[0061] Multiple global motion vectors are obtained by position offset of target feature point pairs.

[0062] For example, first, the position offsets of the matched feature point pairs (i.e., initial feature point pairs) are calculated; then, the number of feature point pairs with the same position offset (i.e., target feature point pairs) is counted and arranged in descending order according to the position offset, such as (x0, y0, n0), (x1, y1, n1), (x2, y2, n2), .... Among them, x, y are the offsets between the feature point pairs, and n is the number of feature points that satisfy this offset.

[0063] At this time, the traditional approach is to determine whether (x0, y0) can be used as a global motion vector. Since the traditional method can only obtain one global motion vector at most, it is only necessary to determine whether the maximum number of feature points with the same position offset can be selected. The general approach is to determine whether the proportion of n0 is large enough, or whether the proportion of n0 relative to n1 is large enough. There are many methods, which will not be repeated here.

[0064] However, in the disclosed embodiment, multiple global motion vectors can be selected, and a maximum of 4 (exemplarily) global motion vectors are set. Further, obtaining multiple global motion vectors through target feature point pairs may include the following steps:

[0065] Deleting the position offsets of the feature point pairs whose number is less than a second preset threshold among the target feature point pairs, to obtain a target position offset set;

[0066] Calculate the position offset with the highest proportion in the target position offset set, where the number of feature points of the position offset with the highest proportion is greater than a third preset threshold;

[0067] Calculate a first value and a second value, wherein the first value is the sum of the number of feature points with the highest position offset, and the second value is the sum of the number of feature points with valid position offset among the plurality of feature points;

[0068] A plurality of global motion vectors are determined by the first value and the second value.

[0069] Exemplarily, first, the position offsets of the feature point pairs whose number is less than the second preset threshold in the target feature point pairs are deleted to obtain a target position offset set. For example, the offsets with smaller n values ​​in (x0, y0, n0), (x1, y1, n1), (x2, y2, n2), ... are eliminated to obtain a target position offset set; then, the position offset with the highest proportion in the target position offset set is calculated, and the number of feature points of the position offset with the highest proportion is greater than the third preset threshold. For example, several position offsets with the highest proportion in the target position offset set are calculated (exemplarily, the present embodiment will calculate the position offsets with the highest proportion). The number of shifts is set to 4, that is, the third threshold is 4), and its corresponding n value is greater than a certain threshold (that is, the fourth preset threshold); then, the first value and the second value are calculated, wherein the first value is the sum of the number of feature points with the highest proportion of position shifts, and the second value is the sum of the number of feature points with valid position shifts among multiple feature points. For example, the sum of the n values ​​of the selected shifts (that is, the position shifts with the highest proportion) is calculated and recorded as top_n (that is, the first value), and the sum of the n values ​​of all valid position shifts (that is, multiple feature points with valid position shifts) is recorded as total_n (that is, the second value).

[0070] Furthermore, determining a plurality of global motion vectors by using the first value and the second value may include the following two aspects:

[0071] On the one hand, if the first value is greater than the product of the second value and the scaling factor, the position offset with the highest scaling is determined as a plurality of global motion vectors.

[0072] For example, if top_n>total_n·η, where η is a preset scaling factor, illustratively, set to 0.7 in the embodiment of the present disclosure, the selected position offsets (ie, the position offsets with the highest scaling) are all set as the global motion vectors.

[0073] On the other hand, if top_n≤total_n·η, there is no global motion vector.

[0074] Based on the above scheme, it is compatible with the traditional global motion detection method. In the case of multiple global motion vectors, it can detect multiple global motion vectors in the horizontal or vertical direction. It has better encoding efficiency for videos of multiple moving targets, makes full use of the information of the reference frame, greatly reduces the bit rate, and can greatly improve the user experience.

[0075] Based on the above Figure 3 The method for obtaining multiple motion vectors described in the corresponding embodiments is the following embodiment of the device disclosed herein, which can be used to execute the method embodiment of the present disclosure.

[0076] The present disclosure provides a device 600 for acquiring multiple motion vectors. Figure 6 The device 600 for acquiring multiple motion vectors includes: a memory 601 and a processor 602 .

[0077] The memory 601 is used to store programs.

[0078] When the program is executed in the processor 602 , the processor 602 is used to execute the above-mentioned method for obtaining multiple motion vectors.

[0079] Processor 602 is used to: determine multiple feature points; calculate the hash value corresponding to each feature point in the multiple feature points, and retain the feature points corresponding to the hash values ​​with the same numerical value, and the number of feature points corresponding to the hash values ​​with the same numerical value does not exceed a first preset threshold; match the target feature point according to the hash value corresponding to each feature point in the multiple feature points, and the target feature point belongs to the multiple feature points; obtain multiple global motion vectors through the target feature point.

[0080] Optionally, the processor 602 is specifically configured to: when there are hash values ​​with the same numerical value corresponding to at least two feature points among the multiple feature points, match a target feature point according to coordinates of the multiple feature points, and the target feature point belongs to the multiple feature points.

[0081] Optionally, the processor 602 is specifically used to: calculate the position offset of an initial feature point pair, the initial feature point pair being feature points in the target feature points having corresponding numerical values ​​with the same hash value; counting the number of target feature point pairs through the initial feature point pairs, and arranging them in descending order according to the position offset, the target feature point pairs being composed of feature point pairs with the same position offset in the initial feature point pairs; and obtaining the multiple global motion vectors through the position offset of the target feature point pairs.

[0082] Optionally, the processor 602 is specifically configured to: delete the position offsets of the feature point pairs whose number is less than a second preset threshold in the target feature point pairs, to obtain a target position offset set;

[0083] Calculate the position offset with the highest proportion in the target position offset set, the number of the position offsets with the highest proportion is not greater than a third preset threshold, and the number of feature points of the position offset with the highest proportion is greater than a fourth preset threshold; calculate a first value and a second value, the first value is the sum of the number of feature points of the position offset with the highest proportion, and the second value is the sum of the number of feature points with valid position offsets among the multiple feature points; determine the multiple global motion vectors through the first value and the second value.

[0084] Optionally, the processor 602 is specifically configured to, if the first value is greater than a product of the second value and a scaling factor, determine the position offset with the highest scale as the multiple global motion vectors.

[0085] The multi-motion vector acquisition device provided by the embodiment of the present disclosure is compatible with traditional global motion detection. When there are multiple global motion vectors, it can detect multiple global motion vectors in the horizontal or vertical direction. It has good encoding efficiency for videos of multiple moving targets, makes full use of the information of the reference frame, greatly reduces the bit rate, and can greatly improve the user experience.

[0086] Based on the above Figure 3 The method for obtaining multiple motion vectors described in the corresponding embodiments is the following embodiment of the device disclosed herein, which can be used to execute the method embodiment of the present disclosure.

[0087] Based on the above Figure 3 Corresponding to the method for acquiring multiple motion vectors described in the embodiment, the embodiment of the present disclosure also provides a device 700 for acquiring multiple motion vectors, such as Figure 7 shown.

[0088] The device 700 for acquiring multiple motion vectors includes: a determination module 710, used to determine multiple feature points; a calculation module 720, used to calculate the hash value corresponding to each feature point among the multiple feature points, and retain the feature points corresponding to the hash values ​​with the same numerical value, and the number of feature points corresponding to the hash values ​​with the same numerical value does not exceed a first preset threshold; a matching module 730, used to match the target feature point according to the hash value corresponding to each feature point among the multiple feature points, and the target feature point belongs to multiple feature points; an acquisition module 740, used to acquire multiple global motion vectors through the target feature points.

[0089] Optionally, the matching module 730 is specifically configured to match a target feature point according to coordinates of the multiple feature points when there are at least two feature points among the multiple feature points corresponding to hash values ​​having the same numerical value, and the target feature point belongs to the multiple feature points.

[0090] Alternatively, if Figure 8 As shown, the acquisition module 740 specifically includes: a first calculation submodule 7401, used to calculate the position offset of the initial feature point pair, the initial feature point pair is the feature point with the same corresponding hash value in the target feature point; a statistical submodule 7402, used to count the number of target feature point pairs through the initial feature point pairs, and arrange them in descending order according to the position offset, the target feature point pairs are composed of feature point pairs with the same position offset in the initial feature point pairs; an acquisition submodule 7403, used to obtain multiple global motion vectors through the position offset of the target feature point pairs.

[0091] Alternatively, if Fig. 9 As shown, the acquisition submodule 7403 specifically includes: a deletion submodule 74031, which is used to delete the position offsets of the feature point pairs in the target feature point pairs whose number is less than the second preset threshold, and obtain a target position offset set; a second calculation submodule 74032, which is used to calculate the position offset with the highest proportion in the target position offset set, the number of the position offset with the highest proportion is not greater than the third preset threshold, and the number of feature points with the position offset with the highest proportion is greater than the fourth preset threshold; a third calculation submodule 74033, which is used to calculate a first value and a second value, the first value being the sum of the number of feature points with the position offset with the highest proportion, and the second value being the sum of the number of feature points with valid position offsets among multiple feature points; a determination submodule 74034, which is used to determine multiple global motion vectors through the first value and the second value.

[0092] Optionally, the determination submodule 74034 is specifically used to: if the first value is greater than the product of the second value and the scale factor, determine the position offset with the highest scale as a plurality of global motion vectors.

[0093] Based on the above Figure 3In accordance with the method for obtaining multiple motion vectors described in the corresponding embodiment, the embodiment of the present disclosure further provides a computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The storage medium stores computer instructions for executing the above Figure 3 The method for obtaining multiple motion vectors described in the corresponding embodiment will not be repeated here.

[0094] Based on the above Figure 3 In accordance with the method for obtaining multiple motion vectors described in the corresponding embodiment, the embodiment of the present disclosure further provides a chip system, the chip system includes at least one processor, when the program instruction is executed in the at least one processor, the at least one processor executes the above Figure 3 The method for obtaining multiple motion vectors described in the corresponding embodiment will not be repeated here.

[0095] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0096] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for obtaining multiple motion vectors, characterized in that: The method comprises: Determine multiple feature points; Calculating a hash value corresponding to each feature point in the plurality of feature points, and retaining feature points corresponding to hash values ​​with the same numerical value, wherein the number of feature points corresponding to the hash values ​​with the same numerical value does not exceed a first preset threshold; matching a target feature point according to a hash value corresponding to each feature point in the plurality of feature points, the target feature point belonging to the plurality of feature points; A plurality of global motion vectors are obtained through the target feature points.

2. The method according to claim 1, characterized in that The matching of the target feature point according to the hash value corresponding to each feature point in the plurality of feature points includes: In a case where hash values ​​having the same numerical value correspond to at least two feature points among the plurality of feature points, a target feature point is matched according to the coordinates of the plurality of feature points, and the target feature point belongs to the plurality of feature points.

3. The method according to claim 1 or 2, characterized in that The acquiring of multiple global motion vectors through the target feature points includes: Calculating the position offset of an initial feature point pair, wherein the initial feature point pair is a feature point among the target feature points having corresponding numerical values ​​with the same hash value; Counting the number of target feature point pairs through the initial feature point pairs and arranging them in descending order according to the position offset, wherein the target feature point pairs are composed of feature point pairs with the same position offset in the initial feature point pairs; The multiple global motion vectors are obtained by position offsetting the target feature point pairs.

4. The method according to claim 3, characterized in that The acquiring the multiple global motion vectors through the target feature point pairs includes: Deleting position offsets of feature point pairs whose number is less than a second preset threshold among the target feature point pairs to obtain a target position offset set; Calculating the position offset with the highest proportion in the target position offset set, where the number of the position offsets with the highest proportion is no greater than a third preset threshold, and the number of feature points of the position offset with the highest proportion is greater than a fourth preset threshold; Calculating a first value and a second value, wherein the first value is the sum of the number of feature points with the highest position offset ratio, and the second value is the sum of the number of feature points with valid position offsets among the plurality of feature points; The multiple global motion vectors are determined by the first value and the second value.

5. The method according to claim 4, characterized in that The determining the multiple global motion vectors by using the first value and the second value includes: If the first value is greater than the product of the second value and the scaling factor, the position offset with the highest scaling factor is determined to be the multiple global motion vectors.

6. A device for acquiring multiple motion vectors, characterized in that: including memory and processor; The memory is used to store programs; When the program is executed in the processor, the processor is configured to: Determine multiple feature points; Calculating a hash value corresponding to each feature point in the plurality of feature points, and retaining feature points corresponding to hash values ​​with the same numerical value, wherein the number of feature points corresponding to the hash values ​​with the same numerical value does not exceed a first preset threshold; matching a target feature point according to a hash value corresponding to each feature point in the plurality of feature points, the target feature point belonging to the plurality of feature points; A plurality of global motion vectors are obtained through the target feature points.

7. The device according to claim 6, characterized in that The processor is specifically configured to: In a case where hash values ​​having the same numerical value correspond to at least two feature points among the plurality of feature points, a target feature point is matched according to the coordinates of the plurality of feature points, and the target feature point belongs to the plurality of feature points.

8. The device according to claim 6 or 7, characterized in that The processor is specifically configured to: Calculating the position offset of an initial feature point pair, wherein the initial feature point pair is a feature point among the target feature points having corresponding numerical values ​​with the same hash value; Counting the number of target feature point pairs through the initial feature point pairs and arranging them in descending order according to the position offset, wherein the target feature point pairs are composed of feature point pairs with the same position offset in the initial feature point pairs; The multiple global motion vectors are obtained by position offsetting the target feature point pairs.

9. The device according to claim 8, characterized in that The processor is specifically configured to: Deleting position offsets of feature point pairs whose number is less than a second preset threshold among the target feature point pairs to obtain a target position offset set; Calculating the position offset with the highest proportion in the target position offset set, where the number of the position offsets with the highest proportion is no greater than a third preset threshold, and the number of feature points of the position offset with the highest proportion is greater than a fourth preset threshold; Calculating a first value and a second value, wherein the first value is the sum of the number of feature points with the highest position offset ratio, and the second value is the sum of the number of feature points with valid position offsets among the plurality of feature points; The multiple global motion vectors are determined by the first value and the second value.

10. A computer-readable storage medium, characterized in that The computer program storage medium has program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 5.