Angular point screening method and device based on histogram
Through the histogram-based corner point filtering method, the histogram parameters of the current frame image are adjusted using the histogram parameters of the previous frame image, which solves the problems of high complexity of corner point screening and high computing resource consumption in the existing technology, and achieves more efficient and accurate corner point filtering.
Patent Information
- Application Number
- CN202411705681.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-14
AI Technical Summary
In the prior art, the corner point screening process is complex, the computing resource consumption is large, and the screening efficiency is low.
The histogram-based corner point filtering method is used to determine the histogram parameters of the current frame image through the histogram parameters of the previous frame image, and the histogram parameters are adjusted to reduce the number of corner points participating in the filtering and reduce the calculation complexity.
It improves the accuracy and efficiency of corner point screening, reduces the consumption of computing resources, and reduces the complexity of the screening process.
Smart Images

Figure CN119625446A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and more specifically, to a histogram-based corner point screening method and device. Background Art
[0002] Corner points play an important role in the field of machine vision. They can be used in scenarios such as image matching, image stitching, object tracking, and target positioning. When using corner points, the corner points extracted from the image are generally processed, and the corner points with higher scores are selected for subsequent algorithm processing. For example, a 640x480 resolution image can detect hundreds or even thousands of corner points in a scene with rich textures, but in general algorithms, usually only dozens or less than 200 corner points are needed to get good enough performance, that is, about 50%-80% of the corner points need to be eliminated.
[0003] Typically, a sorting algorithm is used to sort the corner points from high to low scores, such as selection sort, bubble sort, insertion sort, etc., and then a certain number of corner points with higher scores are selected.
[0004] However, the above sorting algorithm has high complexity, the screening process requires a lot of computing resources, and the screening efficiency is low. Summary of the invention
[0005] The present application is provided to solve the above problems existing in the prior art. According to a histogram-based corner point screening method and device according to an embodiment of the present application, the computational complexity can be reduced and computational resources can be saved.
[0006] In a first aspect, the present application provides a histogram-based corner point screening method, comprising:
[0007] In response to the number of corner points in the current frame image being greater than a preset number threshold, the histogram parameters of the current frame image are determined based on the endpoints of the group whose frequencies in the histogram of the previous frame image are ranked before the set position in descending order and the histogram parameters of the previous frame image; wherein the histogram parameters of the previous frame image include: a first endpoint, a second endpoint, and a group distance of endpoints between the first endpoint and the second endpoint, the group distance of endpoints between the first endpoint and the second endpoint is smaller than the group distance of endpoints other than the first endpoint and the second endpoint, and an interval determined by the first endpoint and the second endpoint intersects with an interval determined by the group ranked before the set position;
[0008] Determining endpoints and frequencies of each group in the histogram of the current frame image based on predetermined scores of each corner point in the current frame image and a histogram parameter of the current frame image;
[0009] Determine the number of target corner points based on the number of corner points in the current frame image and the number threshold; wherein the target corner points are screened-out corner points or remaining corner points;
[0010] Based on the number of the target corner points and the frequency of each group, determining the group to which the critical corner point belongs; wherein the critical corner point is the corner point with the highest score among the eliminated corner points or the corner point with the lowest score among the remaining corner points;
[0011] Based on the endpoints of the group where the critical corner point is located, predicting the score of the critical corner point; wherein the predicted score of the critical corner point and the two endpoints of the group where the critical corner point is located respectively constitute a first interval and a second interval;
[0012] The target corner point is determined based on the number of the target corner points, the number of corner points in the first interval, and the number of corner points in the second interval.
[0013] In a second aspect, the present application provides a histogram-based corner point screening device, comprising:
[0014] A parameter determination module, configured to determine the histogram parameters of the current frame image in response to the number of corner points in the current frame image being greater than a preset number threshold, based on the endpoints of the group whose frequencies in the histogram of the previous frame image are ranked before a set position in descending order, and the histogram parameters of the previous frame image; wherein the histogram parameters of the previous frame image include: a first endpoint, a second endpoint, and a group distance of endpoints between the first endpoint and the second endpoint, the group distance of endpoints between the first endpoint and the second endpoint is smaller than the group distance of endpoints other than the first endpoint and the second endpoint, and an interval determined by the first endpoint and the second endpoint intersects with an interval determined by the group ranked before the set position;
[0015] A prediction module is configured to determine the endpoints and frequencies of each group in the histogram of the current frame image based on the predetermined scores of each corner point in the current frame image and the histogram parameters of the current frame image; determine the number of target corner points based on the number of corner points in the current frame image and the number threshold; determine the group where the critical corner point is located based on the number of target corner points and the frequency of each group; predict the score of the critical corner point based on the endpoint of the group where the critical corner point is located; wherein the target corner point is a screened corner point or a remaining corner point; the critical corner point is the corner point with the highest score among the screened corner points or the corner point with the lowest score among the remaining corner points; the predicted score of the critical corner point and the two endpoints of the group where the critical corner point is located constitute a first interval and a second interval respectively;
[0016] The screening module is configured to determine the target corner point based on the number of the target corner points, the number of corner points in the first interval, and the number of corner points in the second interval.
[0017] In a third aspect, the present application provides an electronic device, including:
[0018] one or more processors;
[0019] a storage device for storing one or more programs,
[0020] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above embodiments.
[0021] In a fourth aspect, the present application provides a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the above embodiments.
[0022] In a fifth aspect, the present application provides a computer program product, including a computer program / instruction, which implements the method described in any of the above embodiments when the computer program / instruction is executed by a processor.
[0023] The beneficial effect of the embodiment of the present application is that: considering the continuity of the previous and next frame images, the image features usually do not change dramatically. Therefore, the histogram parameters of the previous frame image are used as a reference to determine the histogram parameters of the current frame image, so that the obtained histogram parameters of the current frame image are closer to the actual situation, and the accuracy and efficiency of corner point screening are improved. The histogram parameters are adjusted based on the frequency of the group, so that the group with more frequency is located between the first endpoint and the second endpoint. Since the group distance of the endpoint between the first endpoint and the second endpoint is smaller, for the group between the first endpoint and the second endpoint, the smaller group distance will make the number of corner points contained in a single group smaller, thereby greatly reducing the number of corner points participating in the subsequent screening process. For example, if the critical corner point is in group A, if the group distance is large, the number of corner points participating in the subsequent sorting is large, which affects the screening efficiency. On the contrary, if the group distance is small, by determining the group where the critical corner point is located, some corner points that do not need to participate in the subsequent sorting or screening can be sorted first, so that the number of corner points participating in the subsequent sorting is reduced, and the screening efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In the drawings, which are not necessarily drawn to scale, the same reference numerals may describe similar parts in different views. The same reference numerals with letter suffixes or different letter suffixes may represent different instances of similar parts. The accompanying drawings generally illustrate various embodiments by way of example and not limitation, and together with the specification and claims, are used to illustrate the disclosed embodiments. When appropriate, the same reference numerals are used throughout the drawings to refer to the same or similar parts. Such embodiments are illustrative and are not intended to be exhaustive or exclusive embodiments of the present apparatus or method.
[0025] Figure 1 is a flowchart of a corner point screening method based on a histogram provided by an embodiment of the present application;
[0026] Figure 2 is a schematic diagram of a histogram provided by an embodiment of the present application;
[0027] Figure 3 It is a schematic diagram of a histogram-based corner point screening device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the technical solution of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. The embodiments of the present application are further described in detail below in conjunction with the accompanying drawings and specific embodiments, but are not intended to limit the present application. The terms "first", "second" and "third" used in the present application are only intended to distinguish the corresponding features, do not represent the need for such an order, and do not necessarily represent only the singular form.
[0029] like Figure 1 As shown, an embodiment of the present invention provides a corner point screening method based on a histogram, comprising:
[0030] Step 101: In response to the number of corner points in the current frame image being greater than a preset threshold value, the histogram parameters of the current frame image are determined based on the endpoints of the group whose frequencies in the histogram of the previous frame image are ranked before the set order in descending order and the histogram parameters of the previous frame image.
[0031] If the number of corner points detected in the current frame image is greater than the quantity threshold, the corner points need to be screened, otherwise, all detected corner points need to be retained without screening. In actual scenarios, the group before the set ranking can be one or more. For example, the histogram parameters of the current frame image are determined by the endpoints of the group with the highest frequency and the histogram parameters of the previous frame image, or the histogram parameters of the current frame image are determined by the endpoints of the two groups with the highest frequency and the histogram parameters of the previous frame image. The set ranking can be adjusted according to actual business needs. Based on the endpoints of the group before the set ranking and the histogram parameters of the previous frame image, it can be determined whether the histogram parameters of the current frame image need to be adjusted compared to the histogram parameters of the previous frame image.
[0032] Among them, the histogram parameters of the previous frame image include: the first endpoint, the second endpoint and the group distance of the endpoints between the first endpoint and the second endpoint, the group distance of the endpoints between the first endpoint and the second endpoint is smaller than the group distance of the endpoints outside the first endpoint and the second endpoint, and the interval determined by the first endpoint and the second endpoint has an intersection with the interval determined by the group ranked before the set position.
[0033] Step 102: Based on the predetermined scores of the corner points in the current frame image and the histogram parameters of the current frame image, the endpoints and frequencies of the groups in the histogram of the current frame image are determined.
[0034] Based on the scores of each corner point in the current frame image, the starting endpoint and the ending endpoint of the histogram are determined, and based on the starting endpoint and the ending endpoint of the histogram and the histogram parameters, the endpoints of each group in the histogram are determined. For example, the score interval of the corner point is [0, S], the starting endpoint is 0, the ending endpoint is S, the first endpoint is L1, the second endpoint is L2, the corner point score of the second endpoint is greater than the corner point score of the first endpoint, the first endpoint and the second endpoint are located between the starting endpoint and the ending endpoint, and the group interval is len, then the groups in the histogram are divided into [0, L1), [L1, L1+len)... [L1+m×len, L2), [L2, S]. Based on the scores of the corner points and the endpoints of each group, the frequency of each group is determined. If the score of the corner point is within [L1, L1+len), the frequency of [L1, L1+len) is increased by 1. In actual application scenarios, m can be adjusted according to L1 and L2, such as m is the number of groups between L1 and L2.
[0035] Step 103: Determine the number of target corner points based on the number of corner points in the current frame image and the number threshold.
[0036] The target corner point is a screened corner point or a remaining corner point, the remaining corner point is a corner point that needs to be retained, and the number of remaining corner points is a number threshold. If the number of corner points in the current frame image is M and the number threshold is N, then the number of screened corner points K=MN.
[0037] Step 104: Based on the number of target corner points and the frequency of each group, determine the group where the critical corner point is located.
[0038] The critical corner point is the corner point with the highest score among the screened corner points or the corner point with the lowest score among the remaining corner points.
[0039] The frequencies of each group are accumulated, P1 = I1, P2 = P1 + I2, ..., P n =P n-1 +I n , I n is the frequency of the nth group, P n is the sum of the frequencies of the first n groups. Taking the corner point elimination as an example, based on the frequencies and endpoints of each group and the number of eliminated corner points, the group where the Kth eliminated corner point is located can be calculated. The Kth eliminated corner point is the corner point ranked Kth in ascending order of the corner point scores.
[0040] Step 105: Predict the score of the critical corner point based on the endpoints of the group to which the critical corner point belongs.
[0041] The predicted score of the critical corner point and the two endpoints of the group where the critical corner point is located constitute the first interval and the second interval respectively. The score of the critical corner point is predicted based on the endpoints and frequency of the group where the critical corner point is located and the frequencies of the groups to the left of the group where the critical corner point is located.
[0042] Step 106: Determine the target corner point based on the number of the target corner points, the number of the corner points in the first interval, and the number of the corner points in the second interval.
[0043] Based on the score of the critical corner point, the group where the critical corner point is located is divided into the first interval and the second interval, such as, [L i , V) and [V, L i+1 ). Count the number of corner points in the first interval and the second interval.
[0044] Considering the continuity of the previous and next frame images, the image features usually do not change dramatically. Therefore, the embodiment of the present application uses the histogram parameters of the previous frame image as a reference to determine the histogram parameters of the current frame image, so that the obtained histogram parameters of the current frame image are closer to the actual situation, and the accuracy and efficiency of corner point screening are improved. The histogram parameters are adjusted based on the frequency of the group, so that the group with more frequency is located between the first endpoint and the second endpoint. Since the group distance of the endpoints between the first endpoint and the second endpoint is smaller, for the group between the first endpoint and the second endpoint, the smaller group distance will make the number of corner points contained in a single group smaller, thereby greatly reducing the number of corner points participating in the subsequent screening process. For example, if the critical corner point is in group A, if the group distance is large, the number of corner points participating in the subsequent sorting is large, which affects the screening efficiency. On the contrary, if the group distance is small, by determining the group where the critical corner point is located, some corner points that do not need to participate in the subsequent sorting or screening can be sorted first, so that the number of corner points participating in the subsequent sorting is reduced, and the screening efficiency is improved.
[0045] In one embodiment of the present application, based on the endpoints of the group whose frequencies in the histogram of the previous frame image are ranked before the set position in descending order and the histogram parameters of the previous frame image, the histogram parameters of the current frame image are determined, including:
[0046] In response to the sum of the numbers of corner points in the first interval and the second interval of the previous frame image being not greater than a preset sorting threshold, the histogram parameters of the current frame image are the same as the histogram parameters of the previous frame image.
[0047] In order to control the computational complexity and computing resource consumption, the present application determines whether to adjust the histogram parameters through the sorting threshold. Setting a larger sorting threshold allows more corner points to be sorted, which may consume more computing resources. The sorting threshold can be adjusted according to actual business needs. For example, in one scenario, the sorting threshold is 50, and in another scenario, the sorting threshold is 100. If the number of corner points is not greater than the sorting threshold, it means that the sorting process consumes fewer computing resources, and computing resources can be saved by not adjusting the histogram parameters, that is, the histogram parameters of the current frame image are the same as the histogram parameters of the previous frame image, and there is no need to adjust the histogram parameters of the previous frame image to obtain the histogram parameters of the current frame image.
[0048] In one embodiment of the present application, based on the endpoints of the group whose frequencies in the histogram of the previous frame image are ranked before the set position in descending order and the histogram parameters of the previous frame image, the histogram parameters of the current frame image are determined, including:
[0049] In response to the sum of the number of corner points in the first interval and the second interval of the previous frame image being greater than a preset sorting threshold, and the left endpoint of the group with the highest frequency in the histogram of the previous frame image being greater than its second endpoint, the first endpoint in the histogram of the current frame image is determined based on the left endpoint of the group with the highest frequency in the histogram of the previous frame image and the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the previous frame image, the second endpoint in the histogram of the current frame image is determined based on the first endpoint in the histogram of the previous frame image and the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the previous frame image, and the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the current frame image is determined based on the first endpoint and the second endpoint in the histogram of the current frame image;
[0050] The corner point score of the second endpoint is greater than the corner point score of the first endpoint.
[0051] If the left endpoint of the group with the highest frequency in the histogram of the previous frame image is larger than its second endpoint, it means that the peak position is biased to the right, and the first endpoint and the second endpoint are too small, and the first endpoint and the second endpoint need to be increased. Specifically, the first endpoint and the second endpoint can be adjusted based on the endpoint of the group with the highest frequency, or a fixed value can be adjusted. The first endpoint in the histogram of the current frame image can be adjusted based on the first endpoint in the histogram of the previous frame image, and the second endpoint in the histogram of the current frame image can be adjusted based on the second endpoint in the histogram of the previous frame image. For example, the second endpoint in the histogram of the current frame image can be determined based on the right endpoint of the group with the highest frequency in the histogram of the previous frame image and the group distance between the first endpoint and the second endpoint in the histogram of the previous frame image.
[0052] In an embodiment of the present application, the first endpoint in the histogram of the current frame image is the difference between the left endpoint of the group with the highest frequency in the histogram of the previous frame image and twice the group distance, and the second endpoint in the histogram of the current frame image is the sum of the second endpoint in the histogram of the previous frame image and twice the group distance, wherein twice the group distance refers to twice the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the previous frame image. The group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the current frame image is the difference between the endpoints divided by the number of groups between the first endpoint and the second endpoint in the histogram of the previous frame image, wherein the difference in the endpoints is the difference between the second endpoint and the first endpoint in the histogram of the current frame image.
[0053] In actual application scenarios, the relationship between the number of corner points and the sorting threshold may not be determined, but only the relationship between the left endpoint of the group with the highest frequency in the histogram of the previous frame image and its second endpoint may be determined.
[0054] In one embodiment of the present application, based on the endpoints of the group whose frequencies in the histogram of the previous frame image are ranked before the set position in descending order and the histogram parameters of the previous frame image, the histogram parameters of the current frame image are determined, including:
[0055] In response to the sum of the number of corner points in the first interval and the second interval of the previous frame image being greater than a preset sorting threshold, and the right endpoint of the group with the highest frequency in the histogram of the previous frame image being not greater than its first endpoint, the first endpoint in the histogram of the previous frame image is determined based on the first endpoint in the histogram of the previous frame image and the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the previous frame image, the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the previous frame image is determined, and the second endpoint in the histogram of the current frame image is determined based on the first endpoint in the histogram of the current frame image and the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the current frame image;
[0056] The corner point score of the second endpoint is greater than the corner point score of the first endpoint.
[0057] Similar to the scenario described in the previous embodiment, if the right endpoint of the group with the highest frequency in the histogram of the previous frame image is not greater than its first endpoint, it means that the peak position is biased to the left, and the first endpoint and the second endpoint are too large, and the first endpoint and the second endpoint need to be adjusted down. Specifically, the first endpoint and the second endpoint can be adjusted based on the endpoint of the group with the highest frequency, and a fixed value can be adjusted. The first endpoint in the histogram of the current frame image can be adjusted based on the first endpoint in the histogram of the previous frame image, and the second endpoint in the histogram of the current frame image can be adjusted based on the second endpoint in the histogram of the previous frame image. For example, the first endpoint in the histogram of the current frame image can be determined based on the left endpoint of the group with the highest frequency in the histogram of the previous frame image and the group distance between the first endpoint and the second endpoint in the histogram of the previous frame image.
[0058] In an embodiment of the present application, the first endpoint in the histogram of the current frame image is the difference between the first endpoint and the group distance in the histogram of the previous frame image, and the group distance is the group distance between the first endpoint and the second endpoint in the histogram of the previous frame image. The group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the current frame image is twice the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the previous frame image. The second endpoint in the histogram of the current frame image is the sum of the first endpoint in the histogram of the current frame image and the group distance multiple, and the group distance multiple refers to the product of the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the current frame image and the number of groups in the interval.
[0059] In actual application scenarios, the relationship between the number of corner points and the sorting threshold may not be determined, but only the relationship between the left endpoint of the group with the highest frequency in the histogram of the previous frame image and its second endpoint may be determined.
[0060] In one embodiment of the present application, based on the endpoints of the group whose frequencies in the histogram of the previous frame image are ranked before the set position in descending order and the histogram parameters of the previous frame image, the histogram parameters of the current frame image are determined, including:
[0061] In response to the sum of the number of corner points in the first interval and the second interval of the previous frame image being greater than a preset sorting threshold, the left endpoint of the group with the highest frequency in the histogram of the previous frame image being not greater than its second endpoint, and the right endpoint of the group with the highest frequency in the histogram of the previous frame image being greater than its first endpoint, the histogram parameters of the current frame image are the same as the histogram parameters of the previous frame image;
[0062] The corner point score of the second endpoint is greater than the corner point score of the first endpoint.
[0063] If the left endpoint of the group with the highest frequency in the histogram of the previous frame image is not greater than its second endpoint, and the right endpoint of the group with the highest frequency in the histogram of the previous frame image is greater than its first endpoint, it means that the group with the highest frequency has an intersection with the intervals corresponding to the first endpoint and the second endpoint, and the group with the highest frequency has not deviated greatly from the intervals corresponding to the first endpoint and the second endpoint. Therefore, the histogram parameters of the previous frame image can be used. Figure 2 As shown, the group with the highest frequency is located between the first endpoint and the second endpoint. At this time, the histogram parameters of the previous frame image can be used as the histogram parameters of the current frame image.
[0064] The above three embodiments can adjust the histogram parameters based on the relationship between the group with the highest frequency and the first endpoint and the second endpoint, so that the group with the highest frequency intersects with the intervals corresponding to the first endpoint and the second endpoint, so as to adjust the group distance of the interval and make a finer division for the groups with higher frequency, thereby reducing the number of corner points involved in subsequent sorting or screening and improving the efficiency of corner point screening.
[0065] In one embodiment of the present application, predicting the score of the critical corner point based on the endpoints of the group to which the critical corner point belongs includes:
[0066] Predict the score of the critical corner point based on the endpoints of the group where the critical corner point belongs, the number of target corner points, the sum of the frequencies of the target group, and the sum of the frequencies of the group where the critical corner point belongs and the target group;
[0067] Among them, the group located to the left of the group where the target corner point is located is the target group.
[0068] Specifically, the score of critical corner points can be predicted based on equation (1).
[0069]
[0070] Among them, V is used to represent the score of critical corner points, and the group to which the critical corner points belong is [L i , L i+1 ), P i+1 is the sum of the frequencies of the first i+1 groups, P i is the sum of the frequencies of the first i groups, and the critical corner point is located in the i+1th group.
[0071] Through this embodiment, the scores of critical corner points can be estimated, so as to further split the groups and further reduce the number of corner points involved in subsequent sorting.
[0072] In one embodiment of the present application, the target corner point is a screened-out corner point;
[0073] Determining the target corner point based on the number of the target corner points, the number of the corner points in the first interval, and the number of the corner points in the second interval includes:
[0074] In response to the sum of the frequency of the target group and the number of corner points in the first interval being greater than the number of corner points to be screened out, the corner points in the first interval are sorted according to the scores of the corner points, a first number of corner points in the first interval are determined in ascending order of the scores, and the corner points in the target group and the first number of corner points are determined as screened out corner points; wherein the first number is the difference between the number of screened out corner points and the sum of the frequency of the target group;
[0075] In response to the sum of the frequency of the target group and the number of corner points in the first interval being equal to the number of eliminated corner points, determining the corner points in the target group and the corner points in the first interval as eliminated corner points;
[0076] In response to the sum of the frequency of the target group and the number of corner points in the first interval being greater than the number of eliminated corner points, the corner points in the second interval are sorted according to the scores of the corner points, a second number of corner points in the second interval are determined in ascending order of the scores, and the corner points in the target group, the corner points in the first interval, and the second number of corner points are determined as eliminated corner points; wherein the second number is the sum of the number of eliminated corner points minus the number of corner points in the first interval and the frequency of the target group;
[0077] Among them, the group located to the left of the group where the target corner point is located is the target group.
[0078] The sum of the frequencies of the target group is P i , [L i , V) is Q1, [V, L i+1 ) is Q2, if P i and Q1 is greater than K, then [V, L i+1 ) are the remaining corner points. i , V) are sorted according to the scores from large to small, and the front (KP i -Q1) points are the remaining corner points. If P i and Q1 is equal to K, then [V, L i+1 ) are the remaining corner points, [L i , V) is the corner point to be screened out. If P i and Q1 is less than K, then [L i , V) are the corner points to be screened out. i+1 ) are sorted according to the scores from large to small, and the front (P i+1 -K) points are the remaining corner points.
[0079] It should be noted that in the above three cases, if the score of a corner point is less than any of the eliminated corner points, then the corner point is the eliminated corner point. The embodiment of the present application only takes the target corner point as an example to illustrate, and for the remaining corner points, the steps in the above embodiment need to be adaptively adjusted, which will not be repeated in this embodiment.
[0080] Through the embodiments of the present application, there is no need to i , L i+1 ) can greatly reduce the amount of calculation and improve the screening efficiency.
[0081] It is found through data set testing that, with the method provided in the above embodiment, for 90% of the images, the number of corner points that need to be sorted does not exceed 26, and the amount of calculation is relatively small.
[0082] like Figure 3 As shown, an embodiment of the present invention provides a corner point screening device based on a histogram, comprising:
[0083] The parameter determination module 301 is configured to determine the histogram parameters of the current frame image in response to the number of corner points in the current frame image being greater than a preset number threshold, based on the endpoints of the group whose frequencies in the histogram of the previous frame image are ranked before the set position in descending order, and the histogram parameters of the previous frame image; wherein the histogram parameters of the previous frame image include: a first endpoint, a second endpoint, and a group distance of endpoints between the first endpoint and the second endpoint, the group distance of endpoints between the first endpoint and the second endpoint is smaller than the group distance of endpoints other than the first endpoint and the second endpoint, and an interval determined by the first endpoint and the second endpoint has an intersection with an interval determined by the group ranked before the set position;
[0084] The prediction module 302 is configured to determine the endpoints and frequencies of each group in the histogram of the current frame image based on the scores of each corner point in the current frame image and the histogram parameters of the current frame image; determine the number of target corner points based on the number of corner points in the current frame image and the number threshold; determine the group where the critical corner point is located based on the number of target corner points and the frequencies of each group; predict the score of the critical corner point based on the endpoint of the group where the critical corner point is located; wherein the target corner point is a screened corner point or a remaining corner point; the critical corner point is a corner point with the highest score among the screened corner points or a corner point with the lowest score among the remaining corner points; the predicted score of the critical corner point and the two endpoints of the group where the critical corner point is located constitute a first interval and a second interval respectively;
[0085] The screening module 303 is configured to determine the target corner point based on the number of the target corner points, the number of the corner points in the first interval, and the number of the corner points in the second interval.
[0086] In one embodiment of the present application, the parameter determination module 301 is configured to respond to the fact that the sum of the number of corner points in the first interval and the second interval of the previous frame image is not greater than a preset sorting threshold, and the histogram parameters of the current frame image are the same as the histogram parameters of the previous frame image.
[0087] In one embodiment of the present application, the parameter determination module 301 is configured to determine the first endpoint in the histogram of the current frame image based on the left endpoint of the highest frequency group in the histogram of the previous frame image and the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the previous frame image in response to the sum of the number of corner points in the first interval and the second interval of the previous frame image being greater than a preset sorting threshold and the left endpoint of the group with the highest frequency in the histogram of the previous frame image being greater than its second endpoint, determine the second endpoint in the histogram of the current frame image based on the first endpoint in the histogram of the previous frame image and the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the previous frame image, and determine the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the current frame image based on the first endpoint and the second endpoint in the histogram of the current frame image; wherein the corner point score of the second endpoint is greater than the corner point score of the first endpoint.
[0088] In one embodiment of the present application, the parameter determination module 301 is configured to determine the first endpoint in the histogram of the current frame image based on the first endpoint in the histogram of the previous frame image and the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the previous frame image in response to the sum of the number of corner points in the first interval and the second interval of the previous frame image being greater than a preset sorting threshold and the right endpoint of the group with the highest frequency in the histogram of the previous frame image being not greater than its first endpoint, determine the first endpoint in the histogram of the current frame image based on the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the previous frame image, determine the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the current frame image based on the first endpoint in the histogram of the current frame image and the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the current frame image, and determine the second endpoint in the histogram of the current frame image based on the first endpoint in the histogram of the current frame image and the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the current frame image; wherein the corner point score of the second endpoint is greater than the corner point score of the first endpoint.
[0089] In one embodiment of the present application, the parameter determination module 301 is configured to respond to the sum of the number of corner points in the first interval and the second interval of the previous frame image being greater than a preset sorting threshold, the left endpoint of the group with the highest frequency in the histogram of the previous frame image being not greater than its second endpoint, and the right endpoint of the group with the highest frequency in the histogram of the previous frame image being greater than its first endpoint, then the histogram parameters of the current frame image are the same as the histogram parameters of the previous frame image; wherein the corner point score of the second endpoint is greater than the corner point score of the first endpoint.
[0090] In one embodiment of the present application, the prediction module 302 is configured to predict the score of the critical corner point based on the endpoint of the group where the critical corner point is located, the number of target corner points, the sum of the frequencies of the target group, and the sum of the frequencies of the group where the critical corner point is located and the target group; wherein the group located to the left of the group where the target corner point is located is the target group.
[0091] In one embodiment of the present application, the target corner point is a screened corner point; the screening module 303 is configured to, in response to the sum of the frequency of the target group and the number of corner points in the first interval being greater than the number of screened corner points, sort the corner points in the first interval according to the scores of the corner points, determine a first number of corner points in the first interval in order of scores from small to large, and determine the corner points in the target group and the first number of corner points as screened corner points; wherein the first number is the difference between the number of screened corner points and the sum of the frequency of the target group; in response to the sum of the frequency of the target group and the number of corner points in the first interval being equal to the number of screened corner points, Determine the corner points in the target group and the corner points in the first interval as the screened corner points; in response to the sum of the frequency of the target group and the number of corner points in the first interval being greater than the number of screened corner points, sort the corner points in the second interval according to the scores of the corner points, determine a second number of corner points in the second interval in order of scores from small to large, and determine the corner points in the target group, the corner points in the first interval, and the second number of corner points as the screened corner points; wherein the second number is the number of screened corner points minus the sum of the number of corner points in the first interval and the frequency of the target group; wherein the group located to the left of the group where the target corner point is located is the target group.
[0092] An embodiment of the present application provides a computer program product, including a computer program / instruction, which implements the method described in any of the above embodiments when executed by a processor.
[0093] An embodiment of the present application provides an electronic device, including:
[0094] one or more processors;
[0095] a storage device for storing one or more programs,
[0096] When one or more programs are executed by one or more processors, the one or more processors implement the method of any of the above embodiments.
[0097] An embodiment of the present application provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, a method as described in any of the above embodiments is implemented.
[0098] In addition, although exemplary embodiments have been described herein, the scope includes any and all embodiments based on the present application with equivalent elements, modifications, omissions, combinations (e.g., various embodiments intersecting schemes), adaptations or changes. Although several embodiments are listed and described for the wireless communication method and the wireless communication component, it should be noted that the method details involved in the description of the wireless communication component can also be incorporated into the various embodiments of the wireless communication method, and vice versa.
[0099] The elements in the claims are to be interpreted broadly based on the language employed in the claims and are not limited to the examples described in this specification or during the prosecution of the application, which examples are to be interpreted as non-exclusive. Therefore, this specification and examples are intended to be considered as examples only, with the true scope and spirit being indicated by the claims and the full scope of their equivalents.
[0100] The order of each step in the present application is merely exemplary and not restrictive. Without affecting the implementation of the present application (without destroying the required logical relationship between the steps), the execution order of the steps can be adjusted, and the various embodiments obtained after the adjustment still fall within the scope of the present application.
[0101] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. For example, those of ordinary skill in the art can use other embodiments when reading the above description. In addition, in the above-mentioned specific embodiments, various features can be grouped together to simplify the application. This should not be interpreted as an intention that a disclosed feature that does not require protection is necessary for any claim. On the contrary, the subject matter of the present invention may be less than all the features of a specific disclosed embodiment. Thus, the claims are incorporated into the specific embodiments as examples or embodiments, wherein each claim is independently used as a separate embodiment, and it is considered that these embodiments can be combined with each other in various combinations or arrangements. The scope of the present invention should be determined with reference to the attached claims and the full scope of equivalent forms granted by these claims.
Claims
1. A corner point screening method based on histogram, characterized in that: include: In response to the number of corner points in the current frame image being greater than a preset number threshold, the histogram parameters of the current frame image are determined based on the endpoints of the group whose frequencies in the histogram of the previous frame image are ranked before the set position in descending order and the histogram parameters of the previous frame image; wherein the histogram parameters of the previous frame image include: a first endpoint, a second endpoint, and a group distance of endpoints between the first endpoint and the second endpoint, the group distance of endpoints between the first endpoint and the second endpoint is smaller than the group distance of endpoints other than the first endpoint and the second endpoint, and an interval determined by the first endpoint and the second endpoint intersects with an interval determined by the group ranked before the set position; Determining endpoints and frequencies of each group in the histogram of the current frame image based on predetermined scores of each corner point in the current frame image and a histogram parameter of the current frame image; Determine the number of target corner points based on the number of corner points in the current frame image and the number threshold; wherein the target corner points are screened-out corner points or remaining corner points; Based on the number of the target corner points and the frequency of each group, determining the group to which the critical corner point belongs; wherein the critical corner point is the corner point with the highest score among the eliminated corner points or the corner point with the lowest score among the remaining corner points; Based on the endpoints of the group where the critical corner point is located, predicting the score of the critical corner point; wherein the predicted score of the critical corner point and the two endpoints of the group where the critical corner point is located respectively constitute a first interval and a second interval; The target corner point is determined based on the number of the target corner points, the number of corner points in the first interval, and the number of corner points in the second interval.
2. The method according to claim 1, characterized in that: Determining the histogram parameters of the current frame image based on the endpoints of the group whose frequencies are ranked before the set position in descending order in the histogram of the previous frame image and the histogram parameters of the previous frame image, including: In response to the sum of the numbers of corner points in the first interval and the second interval of the previous frame image being not greater than a preset sorting threshold, the histogram parameters of the current frame image are the same as the histogram parameters of the previous frame image.
3. The method according to claim 1, characterized in that: Determining the histogram parameters of the current frame image based on the endpoints of the group whose frequencies are ranked before the set position in descending order in the histogram of the previous frame image and the histogram parameters of the previous frame image, including: In response to the sum of the numbers of corner points in the first interval and the second interval of the previous frame image being greater than a preset sorting threshold, and the left endpoint of the group with the highest frequency in the histogram of the previous frame image being greater than its second endpoint, the first endpoint in the histogram of the current frame image is determined based on the left endpoint of the group with the highest frequency in the histogram of the previous frame image and the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the previous frame image, the second endpoint in the histogram of the current frame image is determined based on the first endpoint in the histogram of the previous frame image and the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the previous frame image, and the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the current frame image is determined based on the first endpoint and the second endpoint in the histogram of the current frame image; The corner point score of the second endpoint is greater than the corner point score of the first endpoint.
4. The method according to claim 1, characterized in that: Determining the histogram parameters of the current frame image based on the endpoints of the group whose frequencies are ranked before the set position in descending order in the histogram of the previous frame image and the histogram parameters of the previous frame image, including: In response to the sum of the numbers of corner points in the first interval and the second interval of the previous frame image being greater than a preset sorting threshold, and the right endpoint of the group with the highest frequency in the histogram of the previous frame image being not greater than its first endpoint, the first endpoint in the histogram of the previous frame image is determined based on the first endpoint in the histogram of the previous frame image and the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the previous frame image, the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the current frame image is determined based on the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the previous frame image, and the second endpoint in the histogram of the current frame image is determined based on the first endpoint in the histogram of the current frame image and the group distance of the endpoints between the first endpoint and the second endpoint in the histogram of the current frame image; The corner point score of the second endpoint is greater than the corner point score of the first endpoint.
5. The method according to claim 1, characterized in that: Determining the histogram parameters of the current frame image based on the endpoints of the group whose frequencies are ranked before the set position in descending order in the histogram of the previous frame image and the histogram parameters of the previous frame image, including: In response to the sum of the number of corner points in the first interval and the second interval of the previous frame image being greater than a preset sorting threshold, the left endpoint of the group with the highest frequency in the histogram of the previous frame image being not greater than its second endpoint, and the right endpoint of the group with the highest frequency in the histogram of the previous frame image being greater than its first endpoint, the histogram parameters of the current frame image are the same as the histogram parameters of the previous frame image; The corner point score of the second endpoint is greater than the corner point score of the first endpoint.
6. The method according to claim 1, characterized in that: Predicting the score of the critical corner point based on the endpoint of the group where the critical corner point belongs includes: Predicting the score of the critical corner point based on the endpoints of the group where the critical corner point is located, the number of the target corner points, the sum of the frequencies of the target group, and the sum of the frequencies of the group where the critical corner point is located and the target group; Among them, the group located to the left of the group where the target corner point is located is the target group.
7. The method according to claim 1, characterized in that: The target corner point is a screened corner point; Determining the target corner point based on the number of the target corner points, the number of corner points in the first interval, and the number of corner points in the second interval includes: In response to the sum of the frequency of the target group and the number of corner points in the first interval being greater than the number of the screened corner points, the corner points in the first interval are sorted according to the scores of the corner points, a first number of corner points in the first interval are determined in ascending order of the scores, and the corner points in the target group and the first number of corner points are determined as screened corner points; wherein the first number is the difference between the number of the screened corner points and the sum of the frequencies of the target group; In response to the sum of the frequency of the target group and the number of corner points in the first interval being equal to the number of eliminated corner points, determining the corner points in the target group and the corner points in the first interval as eliminated corner points; In response to the sum of the frequency of the target group and the number of corner points in the first interval being greater than the number of the screened corner points, the corner points in the second interval are sorted according to the scores of the corner points, a second number of corner points in the second interval are determined in ascending order of the scores, and the corner points in the target group, the corner points in the first interval, and the second number of corner points are determined as the screened corner points; wherein the second number is the sum of the number of the screened corner points minus the number of the corner points in the first interval and the frequency of the target group; Among them, the group located to the left of the group where the target corner point is located is the target group.
8. A corner point screening device based on histogram, characterized in that: include: A parameter determination module, configured to determine the histogram parameters of the current frame image in response to the number of corner points in the current frame image being greater than a preset number threshold, based on the endpoints of the group whose frequencies in the histogram of the previous frame image are ranked before a set position in descending order, and the histogram parameters of the previous frame image; wherein the histogram parameters of the previous frame image include: a first endpoint, a second endpoint, and a group distance of endpoints between the first endpoint and the second endpoint, the group distance of endpoints between the first endpoint and the second endpoint is smaller than the group distance of endpoints other than the first endpoint and the second endpoint, and an interval determined by the first endpoint and the second endpoint intersects with an interval determined by the group ranked before the set position; A prediction module is configured to determine the endpoints and frequencies of each group in the histogram of the current frame image based on the predetermined scores of each corner point in the current frame image and the histogram parameters of the current frame image; determine the number of target corner points based on the number of corner points in the current frame image and the number threshold; determine the group where the critical corner point is located based on the number of target corner points and the frequency of each group; predict the score of the critical corner point based on the endpoint of the group where the critical corner point is located; wherein the target corner point is a screened corner point or a remaining corner point; the critical corner point is the corner point with the highest score among the screened corner points or the corner point with the lowest score among the remaining corner points; the predicted score of the critical corner point and the two endpoints of the group where the critical corner point is located constitute a first interval and a second interval respectively; The screening module is configured to determine the target corner point based on the number of the target corner points, the number of corner points in the first interval, and the number of corner points in the second interval.
9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method described in any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
Citation Information
Cited By
Histogram-based corner screening method and device
WO2026113373A1