CN118261960A - Image angle calculation method and system based on multiple candidate matching points - Google Patents

Image angle calculation method and system based on multiple candidate matching points Download PDF

Info

Publication number
CN118261960A
CN118261960A CN202410441063.4A CN202410441063A CN118261960A CN 118261960 A CN118261960 A CN 118261960A CN 202410441063 A CN202410441063 A CN 202410441063A CN 118261960 A CN118261960 A CN 118261960A
Authority
CN
China
Prior art keywords
hub
image
feature
candidate matching
angle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410441063.4A
Other languages
Chinese (zh)
Inventor
胡志辉
王洎
黄茜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
Filing date
Publication date
Application filed by South China University of Technology SCUT filed Critical South China University of Technology SCUT
Publication of CN118261960A publication Critical patent/CN118261960A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses an image angle calculation method and system based on multiple candidate matching points, wherein the method comprises the following steps: placing a wheel hub with the same model as the wheel hub to be tested on a conveyor belt, and enabling the center line of one spoke of the wheel hub to coincide with a horizontal line; shooting a hub to obtain a standard hub image; placing the hub to be tested on a conveyor belt, and shooting the hub to be tested to obtain a hub image to be tested; extracting feature point sets M and N from the standard hub image with the background removed and the hub image to be detected respectively; according to M and N, obtaining a candidate matching point set P i;Mi of any characteristic point M i in M and characteristic points in P i to form a candidate matching point pair; calculating the angle difference of the candidate matching point pair of the characteristic point M i; clustering the angle differences of the candidate matching point pairs of all the feature points in the feature point set M, and calculating the average value of all the angle differences in the class with the largest number of the angle differences to obtain the rotation angle. According to the invention, more correct matching point pairs can be obtained, and the correct image rotation angle can be obtained through clustering.

Description

Image angle calculation method and system based on multiple candidate matching points
Technical Field
The present invention relates to the field of image feature matching technologies, and in particular, to an image angle computing method, system, terminal device and computer readable storage medium based on multiple candidate matching points.
Background
The motor vehicle hub is a typical planform symmetrically cast product. Since it is necessary to detect possible defects inside each hub with an X-ray device, it is necessary to place the hub directly under the X-ray detector for detection. For hubs with typical diameters between 24 and 30 inches, limited by the size of the X-ray detector, typically only 1 to 2 spoke area can be detected at one station. Because of the equal division characteristic of the spoke angles, after the first spoke is in the reference position for shooting detection, the hub is rotated by a set angle to be rotated to the next station for detection, and the spoke detection is completed by sequentially rotating for one circle. However, when the wheel hub is on line, the wheel spoke is difficult to ensure that no deviation exists between the wheel spoke and the datum line, the wheel hub is required to be rotated to enable the wheel spoke to be aligned with the datum line, and the fact that the wheel spoke part is shot and detected after each rotation is ensured, but the hollow part without materials between the two wheel spokes is not ensured. Therefore, the measurement of the spoke angle and the corresponding adjustment become necessary technical links in the hub detection.
Feature point matching algorithms are also commonly used for angular measurement of objects due to their good rotational invariance and dimensional invariance. However, when the measured object has more similar features and is geometrically symmetric as a whole, the number of incorrect matching points obtained by the conventional feature point matching algorithm is greatly increased, and the number of correct matching points is often too small to obtain a correct angle.
Disclosure of Invention
In order to solve the above-mentioned shortcomings of the prior art, the present invention provides an image angle calculating method, system, terminal device and computer readable storage medium based on multiple candidate matching points, by using all the feature points with sufficiently small feature distances and satisfying the center distance constraint as candidate matching points, so as to reserve as many correct matching point pairs as possible, and by removing the wrong matching points from the clustering of the angle differences of the matching points, the correct image rotation angle is obtained.
A first object of the present invention is to provide an image angle calculation method based on multiple candidate matching points.
A second object of the present invention is to provide an image angle calculation system based on multiple candidate matching points.
A third object of the present invention is to provide a terminal device.
A fourth object of the present invention is to provide a computer-readable storage medium.
The first object of the present invention can be achieved by adopting the following technical scheme:
An image angle calculation method based on multiple candidate matching points, the method comprising:
placing a wheel hub with the same model as the wheel hub to be tested on a conveyor belt, and enabling the center line of one spoke of the wheel hub to coincide with a horizontal line; shooting a hub to obtain a standard hub image;
extracting a feature point set M= { M 1,M2,…,Mm } according to the standard hub image I M with the background removed;
Placing the hub to be tested on a conveyor belt, shooting the hub to be tested, wherein the position of a camera is the same as that of the hub with the same model as that of the hub to be tested when shooting, and obtaining an image of the hub to be tested;
Extracting a feature point set N= { N 1,N2,…,Nn } according to the hub image I N to be detected after the background is removed;
For any feature point M i in the feature point set M, selecting all feature points with small enough feature distances and meeting the center distance constraint from the feature point set N as candidate matching points; m i and each candidate matching point form a pair of candidate matching point pairs; calculating the angle difference of the candidate matching point pair of the characteristic point M i; wherein i=1, 2, …, m;
clustering the angle differences of candidate matching point pairs of all the feature points in the feature point set M, and marking the class with the largest number of the angle differences as the average value of all the angle differences in the theta maxmax to be the rotation angle of the hub image to be detected.
Further, the set of candidate matching points of the feature point M i is denoted as P i;
the calculating the angle difference of the candidate matching point pair of the feature point M i specifically includes:
The angle difference between M i and the kth candidate matching point in P i is:
Wherein atan is an arctangent function; in the image I M of the present invention, The abscissa and ordinate of the image center respectively,The abscissa and the ordinate of the feature point M i, respectively; in the image I N of the present invention,The abscissa and ordinate of the image center respectively,The abscissa and ordinate, respectively, of the kth candidate matching point in set P i.
Further, for any one of the feature points M i in the feature point set M, all feature points with sufficiently small feature distances and satisfying the center distance constraint are selected from the feature point set N as candidate matching points, specifically:
Wherein j=1, 2, …, n; p i is the set of candidate matching points N j for feature point M i; Is the feature distance between feature points M i and N j; Is the maximum possible feature distance; The minimum feature distance found in the point set N for the feature point M i; The Euclidean distance between the coordinate of the characteristic point M i and the central coordinate of the image I M; The Euclidean distance between the coordinate of the candidate matching point N j and the center coordinate of the image I N; t 1 is a characteristic distance threshold coefficient, and is used for ensuring that the characteristic distance of the candidate matching point is small enough; t 2 epsilon [0,1] is a feature proportion threshold value, and is used for ensuring that the feature distance of the candidate matching point has smaller difference with the feature distance of the optimal matching point; t 3 is a center distance threshold, which is used for ensuring that the difference between the coordinates of the feature point M i and the coordinates of the feature point N j and the center coordinates of the corresponding image is small enough.
Further, the characteristic distance is calculated by adopting a SURF algorithm.
Further, the clustering the angle differences of the candidate matching point pairs of all the feature points in the feature point set M includes:
The angle differences of the candidate matching point pairs are reordered according to the obtaining sequence and marked as theta t, t=1, 2, …, l; where l is the number of candidate matching point pairs;
let k=1, assign θ 1 to the angle difference class θ 1;
m=2;
j=1;
the average value of the calculated angle difference class theta j is If it isThen θ m is assigned to the angle difference class θ j, otherwise: j=j+1, if j < =k, the mean value of the return calculated angle difference class θ j isAnd continuing to execute the subsequent operation;
If j= k+1, k=k+1, θ m is assigned to the angle difference class θ k; wherein T 4 is a set angle difference threshold;
m=m+1, when m.ltoreq.l, returning j=1, and continuing to perform the subsequent operations.
Further, removing the background includes:
adopting Hough circle transformation to the hub image to obtain the outer contour of the hub;
setting all the pixel values of the external image of the outer contour of the hub to 0;
Intercepting an image according to the minimum external rectangle of the outer contour of the hub to obtain an image with the background removed;
The hub images are respectively standard hub images and hub images to be detected.
Further, extracting a feature point set for the image by adopting a SURF algorithm; the images are respectively a standard hub image I M with the background removed and a hub image I N to be measured with the background removed.
The second object of the invention can be achieved by adopting the following technical scheme:
an image angle computing system based on multiple candidate matching points, the system comprising:
The first image acquisition module is used for placing the wheel hub with the same model as the wheel hub to be tested on the conveyor belt, and enabling the center line of one spoke of the wheel hub to coincide with the horizontal line; shooting a hub to obtain a standard hub image;
the first extraction module is used for extracting a feature point set M= { M 1,M2,…,Mm } according to the standard hub image I M with the background removed;
the second image acquisition module is used for placing the hub to be tested on the conveyor belt, and obtaining an image of the hub to be tested when the hub to be tested is shot and the position of the camera is the same as that of the hub with the same model as that of the hub to be tested;
The second extraction module is used for extracting a characteristic point set N= { N 1,N2,…,Nn } according to the hub image I N to be detected after the background is removed;
The candidate matching module is used for selecting all feature points which have small enough feature distances and meet the center distance constraint from the feature point set N as candidate matching points for any feature point M i in the feature point set M; m i and each candidate matching point form a pair of candidate matching point pairs; calculating the angle difference of the candidate matching point pair of the characteristic point M i; wherein i=1, 2, …, m;
And the clustering module is used for clustering the angle differences of the candidate matching point pairs of all the characteristic points in the characteristic point set M, and marking the class with the largest number of the angle differences as the average value of all the angle differences in the theta maxmax to be the rotation angle of the hub image to be detected.
The third object of the present invention can be achieved by adopting the following technical scheme:
the terminal equipment comprises a processor and a memory for storing a program executable by the processor, wherein the processor realizes the image angle calculation method based on the multi-candidate matching points when executing the program stored by the memory.
The fourth object of the present invention can be achieved by adopting the following technical scheme:
A computer-readable storage medium storing a program which, when executed by a processor, implements the above-described image angle calculation method based on multiple candidate matching points.
Compared with the prior art, the invention has the following beneficial effects:
1. Compared with the standard method that only one matching point is found for one characteristic point, the method takes all characteristic points with small characteristic distance and meeting the central distance constraint as candidate matching points, and can obtain more correct matching point pairs;
2. The right matching point pairs can be screened faster and the right image rotation angle can be obtained by simply clustering the matching point pairs and the angle differences.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to the structures shown in these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an image angle calculation method based on multiple candidate matching points according to embodiment 1 of the present invention;
FIG. 2 is a standard hub image (spoke centerline in image coincident with horizontal) of embodiment 1 of the present invention;
FIG. 3 is a standard hub image I M with the background removed in accordance with example 1 of the present invention;
FIG. 4 is an image of a hub to be tested (the center line of the spoke in the image has a certain angle with the horizontal line) according to embodiment 1 of the present invention;
FIG. 5 is a background-removed image I N of a hub to be tested according to example 1 of the present invention;
FIG. 6 is a rotated image of a hub to be tested according to embodiment 1 of the present invention;
FIG. 7 is a block diagram showing the structure of an image angle calculation system based on multiple candidate matching points according to embodiment 2 of the present invention;
Fig. 8 is a block diagram showing the structure of a terminal device according to embodiment 3 of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments, and all other embodiments obtained by those skilled in the art without making any inventive effort based on the embodiments of the present application are within the scope of protection of the present application. It should be understood that the detailed description is intended to illustrate the application, and is not intended to limit the application.
Example 1:
As shown in fig. 1, the image angle calculating method based on multiple candidate matching points provided in this embodiment includes two processes of offline and online:
(1) And (5) off-line flow.
The method specifically comprises the following steps:
(1-1) placing a hub of which the model is identical to that of the hub to be tested on a conveyor belt, manually rotating the hub to enable the center line of a certain spoke to coincide with the horizontal line, and shooting by a camera fixed above the conveyor belt to obtain a standard hub image, as shown in fig. 2.
(1-2) Removing the standard hub image background.
Because the hub is circular, the specific steps for removing the background in the embodiment are as follows:
(1-2-1) obtaining the hub outer contour by using Hough circle transformation.
(1-2-2) Setting all of the hub outer contour outer image pixel values to 0.
(1-2-3) Intercepting the image according to the minimum circumscribed rectangle of the outer contour of the hub to obtain a standard image I M after removing the background, as shown in figure 3.
(1-3) Extracting a feature point set m= { M 1,M2,…,Mm } of the image I M and a feature descriptor corresponding to each feature point by using a feature extraction algorithm.
The feature extraction algorithm adopted in this embodiment is the SURF algorithm.
(2) And (5) online flow.
The method specifically comprises the following steps:
(2-1) placing the hub to be tested on a conveyor belt, and shooting with a camera at the same position as the offline step (1-1) to obtain an image of the hub to be tested, as shown in fig. 4.
(2-2) Removing the background of the hub image to be detected, wherein the method is the same as that of the offline step (1-2), and obtaining a hub image I N to be detected after removing the background, as shown in fig. 5.
(2-3) Extracting the feature point set n= { N 1,N2,…,Nn } and the feature descriptor corresponding to each feature point of the image I N by using a feature extraction algorithm, the method being the same as the off-line step (1-3).
(2-4) Obtaining candidate matching point pairs.
The specific process is as follows:
For each M i of the feature point sets M, its candidate matching point set is:
In the method, in the process of the invention, For the feature distance between the feature points M i and N j, a SURF algorithm is adopted in the feature distance calculation method; Is the maximum possible feature distance; The minimum feature distance which can be found in the point set N for the feature point M i; The Euclidean distance between the coordinate of the characteristic point M i and the central coordinate of the image I M; The Euclidean distance between the coordinate of the characteristic point N j and the central coordinate of the image I N; t 1 is a characteristic distance threshold coefficient, and is used for ensuring that the characteristic distance of the candidate matching point is small enough; t 2 E [0,1] is a feature proportion threshold value, and is used for ensuring that the feature distance of the candidate matching point has smaller difference with the feature distance of the optimal matching point, namely the candidate matching point is a reasonable replacement scheme of the optimal matching point; t 3 is a center distance threshold for ensuring that the difference between the two point coordinates and the image center coordinate distance is small enough.
In this example, T 1 is 0.15, T 2 is 0.6, and T 3 is 15.
Each feature point in M i and P i constitutes a pair of candidate matching point pairs.
(2-5) Calculating the angle differences of all candidate matching point pairs.
The angle difference between the j-th feature point in the M i and the P i is:
Wherein atan is an arctangent function, and the output angle quadrant is determined by the input numerator and denominator symbol; in the image I M of the present invention, The abscissa and ordinate of the image center respectively,The abscissa and the ordinate of the feature point M i, respectively; in the image I N of the present invention,Respectively an abscissa and an ordinate of the image center; the abscissa and the ordinate of the j-th feature point in the point set P i, respectively.
(2-6) Simply clustering the angle differences of the candidate matching point pairs, and solving the image rotation angle theta.
The method comprises the following specific steps:
(2-6-1) reordering the angular differences of the candidate matching point pairs in the order of acquisition, denoted θ i, i=1, 2, …, l, where l is the number of candidate matching point pairs.
(2-6-2) Let k=1, and θ 1 is assigned to the angle difference class θ 1.
(2-6-3) Comparing each subsequent θ i, i=2, …, l with the average of all angle differences in each of the existing all angle difference classes θ j, j=1, …, kComparing ifThen θ i is assigned to the angle difference class θ j, otherwise let k=k+1, and θ i is assigned to the angle difference class θ k.
Wherein T 4 is the angle difference threshold, and the present embodiment T 4 takes 5.
(2-6-4) Recording the class containing the largest number of angle differences as θ max, the average value of all angle differences in the classI.e., the image rotation angle θ that is calculated.
The result of rotating the image I N at this angle is shown in fig. 6, which shows that the hub spokes substantially coincide with the horizontal after rotation.
Those skilled in the art will appreciate that all or part of the steps in a method implementing the above embodiments may be implemented by a program to instruct related hardware, and the corresponding program may be stored in a computer readable storage medium.
It should be noted that although the method operations of the above embodiments are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in that particular order or that all illustrated operations be performed in order to achieve desirable results. Rather, the depicted steps may change the order of execution. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
Example 2:
As shown in fig. 7, the present embodiment provides an image angle computing system based on multiple candidate matching points, the system including a first image acquisition module 701, a first extraction module 702, a second image acquisition module 703, a second extraction module 704, a candidate matching module 705, and a clustering module 706, wherein:
the first image acquisition module 701 is configured to place a hub with the same model as the hub to be tested on the conveyor belt, and make a spoke center line of the hub coincide with a horizontal line; shooting a hub to obtain a standard hub image;
The first extraction module 702 is configured to extract a feature point set m= { M 1,M2,…,Mm } according to the standard hub image I M with the background removed;
The second image acquisition module 703 is configured to place the hub to be tested on a conveyor belt, and obtain an image of the hub to be tested when the hub to be tested is photographed and the position of the camera is the same as that of the hub with the same model as that of the hub to be tested;
The second extraction module 704 is configured to extract a feature point set n= { N 1,N2,…,Nn } according to the to-be-detected hub image I N after the background is removed;
The candidate matching module 705 is configured to select, for any feature point M i in the feature point set M, all feature points that have sufficiently small feature distances and satisfy the center distance constraint from the feature point set N as candidate matching points; m i and each candidate matching point form a pair of candidate matching point pairs; calculating the angle difference of the candidate matching point pair of the characteristic point M i; wherein i=1, 2, …, m;
And the clustering module 706 is configured to cluster the angle differences of the candidate matching point pairs of all the feature points in the feature point set M, and mark the class with the largest number of angle differences as the average value of all the angle differences in θ maxmax, which is the rotation angle of the hub image to be tested.
Specific implementation of each module in this embodiment may be referred to embodiment 1 above, and will not be described in detail herein; it should be noted that, in the system provided in this embodiment, only the division of the above functional modules is used as an example, in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure is divided into different functional modules to perform all or part of the functions described above.
Example 3:
The present embodiment provides a terminal device, which may be a computer, as shown in fig. 8, and is connected through a system bus 801 to a processor 802, a memory, an input device 803, a display 804 and a network interface 805, where the processor is configured to provide computing and control capabilities, the memory includes a nonvolatile storage medium 806 and an internal memory 807, where the nonvolatile storage medium 806 stores an operating system, a computer program and a database, and the internal memory 807 provides an environment for the operating system and the computer program in the nonvolatile storage medium, and when the processor 802 executes the computer program stored in the memory, the image angle calculating method based on multiple candidate matching points of the above embodiment 1 is implemented as follows:
placing a wheel hub with the same model as the wheel hub to be tested on a conveyor belt, and enabling the center line of one spoke of the wheel hub to coincide with a horizontal line; shooting a hub to obtain a standard hub image;
extracting a feature point set M= { M 1,M2,…,Mm } according to the standard hub image I M with the background removed;
Placing the hub to be tested on a conveyor belt, shooting the hub to be tested, wherein the position of a camera is the same as that of the hub with the same model as that of the hub to be tested when shooting, and obtaining an image of the hub to be tested;
Extracting a feature point set N= { N 1,N2,…,nn } according to the hub image I N to be detected after the background is removed;
For any feature point M i in the feature point set M, selecting all feature points with small enough feature distances and meeting the center distance constraint from the feature point set N as candidate matching points; m i and each candidate matching point form a pair of candidate matching point pairs; calculating the angle difference of the candidate matching point pair of the characteristic point M i; wherein i=1, 2, …, m;
clustering the angle differences of candidate matching point pairs of all the feature points in the feature point set M, and marking the class with the largest number of the angle differences as the average value of all the angle differences in the theta maxmax to be the rotation angle of the hub image to be detected.
Example 4:
The present embodiment provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the image angle calculation method based on multiple candidate matching points of embodiment 1 described above, as follows:
placing a wheel hub with the same model as the wheel hub to be tested on a conveyor belt, and enabling the center line of one spoke of the wheel hub to coincide with a horizontal line; shooting a hub to obtain a standard hub image;
extracting a feature point set M= { M 1,M2,…,Mm } according to the standard hub image I M with the background removed;
Placing the hub to be tested on a conveyor belt, shooting the hub to be tested, wherein the position of a camera is the same as that of the hub with the same model as that of the hub to be tested when shooting, and obtaining an image of the hub to be tested;
Extracting a feature point set N= { N 1,N2,…,Nn } according to the hub image I N to be detected after the background is removed;
For any feature point M i in the feature point set M, selecting all feature points with small enough feature distances and meeting the center distance constraint from the feature point set N as candidate matching points; m i and each candidate matching point form a pair of candidate matching point pairs; calculating the angle difference of the candidate matching point pair of the characteristic point M i; wherein i=1, 2, …, m;
clustering the angle differences of candidate matching point pairs of all the feature points in the feature point set M, and marking the class with the largest number of the angle differences as the average value of all the angle differences in the theta maxmax to be the rotation angle of the hub image to be detected.
The computer readable storage medium of the present embodiment may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The above-mentioned embodiments are only preferred embodiments of the present invention, but the protection scope of the present invention is not limited thereto, and any person skilled in the art can make equivalent substitutions or modifications according to the technical solution and the inventive concept of the present invention within the scope of the present invention disclosed in the present invention patent, and all those skilled in the art belong to the protection scope of the present invention.

Claims (10)

1. An image angle calculation method based on multiple candidate matching points, the method comprising:
placing a wheel hub with the same model as the wheel hub to be tested on a conveyor belt, and enabling the center line of one spoke of the wheel hub to coincide with a horizontal line; shooting a hub to obtain a standard hub image;
extracting a feature point set M= { M 1,M2,…,Mm } according to the standard hub image I M with the background removed;
Placing the hub to be tested on a conveyor belt, shooting the hub to be tested, wherein the position of a camera is the same as that of the hub with the same model as that of the hub to be tested when shooting, and obtaining an image of the hub to be tested;
Extracting a feature point set N= { N 1,N2,…,Nn } according to the hub image I N to be detected after the background is removed;
For any feature point M i in the feature point set M, selecting all feature points with small enough feature distances and meeting the center distance constraint from the feature point set N as candidate matching points; m i and each candidate matching point form a pair of candidate matching point pairs; calculating the angle difference of the candidate matching point pair of the characteristic point M i; wherein i=1, 2, …, m;
clustering the angle differences of candidate matching point pairs of all the feature points in the feature point set M, and marking the class with the largest number of the angle differences as the average value of all the angle differences in the theta maxmax to be the rotation angle of the hub image to be detected.
2. The image angle calculation method according to claim 1, wherein the set of candidate matching points of the feature point M i is denoted as P i;
the calculating the angle difference of the candidate matching point pair of the feature point M i specifically includes:
The angle difference between M i and the kth candidate matching point in P i is:
Wherein atan is an arctangent function; in the image I M of the present invention, The abscissa and ordinate of the image center respectively,The abscissa and the ordinate of the feature point M i, respectively; in the image I N of the present invention,The abscissa and ordinate of the image center respectively,The abscissa and the ordinate, respectively, of the kth candidate matching point in the point set P i.
3. The image angle calculation method according to any one of claims 1 to 2, characterized in that, for any one of the feature points M i, all feature points whose feature distances are sufficiently small and which satisfy a center distance constraint are selected from the feature point set N as candidate matching points, specifically:
Wherein j=1, 2, …, n; p i is the set of candidate matching points N j for feature point M i; Is the feature distance between feature points M i and N j; Is the maximum possible feature distance; The minimum feature distance found in the point set N for the feature point M i; The Euclidean distance between the coordinate of the characteristic point M i and the central coordinate of the image I M; The Euclidean distance between the coordinate of the candidate matching point N j and the center coordinate of the image I N; t 1 is a characteristic distance threshold coefficient, and is used for ensuring that the characteristic distance of the candidate matching point is small enough; t 2 epsilon [0,1] is a feature proportion threshold value, and is used for ensuring that the feature distance of the candidate matching point has smaller difference with the feature distance of the optimal matching point; t 3 is a center distance threshold, which is used for ensuring that the difference between the coordinates of the feature point M i and the coordinates of the feature point N j and the center coordinates of the corresponding image is small enough.
4. The image angle calculation method according to claim 3, wherein the feature distance is calculated using SURF algorithm.
5. The image angle calculation method according to any one of claims 1 to 2, wherein the clustering of the angle differences of the candidate matching point pairs of all the feature points in the feature point set M includes:
The angle differences of the candidate matching point pairs are reordered according to the obtaining sequence and marked as theta t, t=1, 2, …, l; where l is the number of candidate matching point pairs;
let k=1, assign θ 1 to the angle difference class θ 1;
m=2;
j=1;
the average value of the calculated angle difference class theta j is If it isThen θ m is assigned to the angle difference class θ j, otherwise: j=j+1, if j < =k, the mean value of the return calculated angle difference class θ j isAnd continuing to execute the subsequent operation;
If j= k+1, k=k+1, θ m is assigned to the angle difference class θ k; wherein T 4 is a set angle difference threshold;
m=m+1, when m.ltoreq.l, returning j=1, and continuing to perform the subsequent operations.
6. The image angle calculation method according to any one of claims 1 to 2, wherein removing the background includes:
adopting Hough circle transformation to the hub image to obtain the outer contour of the hub;
setting all the pixel values of the external image of the outer contour of the hub to 0;
Intercepting an image according to the minimum external rectangle of the outer contour of the hub to obtain an image with the background removed;
The hub images are respectively standard hub images and hub images to be detected.
7. The image angle calculation method according to any one of claims 1 to 2, characterized in that a SURF algorithm is adopted to extract a feature point set for the image; the images are respectively a standard hub image I M with the background removed and a hub image I N to be measured with the background removed.
8. An image angle computing system based on multiple candidate matching points, the system comprising:
The first image acquisition module is used for placing the wheel hub with the same model as the wheel hub to be tested on the conveyor belt, and enabling the center line of one spoke of the wheel hub to coincide with the horizontal line; shooting a hub to obtain a standard hub image;
the first extraction module is used for extracting a feature point set M= { M 1,M2,…,Mm } according to the standard hub image I M with the background removed;
the second image acquisition module is used for placing the hub to be tested on the conveyor belt, and obtaining an image of the hub to be tested when the hub to be tested is shot and the position of the camera is the same as that of the hub with the same model as that of the hub to be tested;
The second extraction module is used for extracting a characteristic point set N= { N 1,N2,…,Nn } according to the hub image I N to be detected after the background is removed;
The candidate matching module is used for selecting all feature points which have small enough feature distances and meet the center distance constraint from the feature point set N as candidate matching points for any feature point M i in the feature point set M; m i and each candidate matching point form a pair of candidate matching point pairs; calculating the angle difference of the candidate matching point pair of the characteristic point M i; wherein i=1, 2, …, m;
And the clustering module is used for clustering the angle differences of the candidate matching point pairs of all the characteristic points in the characteristic point set M, and marking the class with the largest number of the angle differences as the average value of all the angle differences in the theta maxmax to be the rotation angle of the hub image to be detected.
9. A terminal device comprising a processor and a memory for storing a program executable by the processor, characterized in that the processor, when executing the program stored in the memory, implements the image angle calculation method according to any one of claims 1-7.
10. A computer readable storage medium having stored thereon a computer program, which, when executed by a processor, implements the image angle calculation method of any of claims 1-7.
CN202410441063.4A 2024-04-12 Image angle calculation method and system based on multiple candidate matching points Pending CN118261960A (en)

Publications (1)

Publication Number Publication Date
CN118261960A true CN118261960A (en) 2024-06-28

Family

ID=

Similar Documents

Publication Publication Date Title
CN110561423B (en) Pose transformation method, robot and storage medium
CN111428748B (en) HOG feature and SVM-based infrared image insulator identification detection method
CN103759758B (en) A kind of method for detecting position of the automobile meter pointer based on mechanical angle and scale identification
CN112667837A (en) Automatic image data labeling method and device
CN112308916B (en) Target pose recognition method based on image target
CN111862037A (en) Method and system for detecting geometric characteristics of precision hole type part based on machine vision
CN106548451A (en) A kind of car passenger flow crowding computational methods and device
CN109461133B (en) Bridge bolt falling detection method and terminal equipment
CN111192326B (en) Method and system for visually identifying direct-current charging socket of electric automobile
CN113820333B (en) Battery pole piece abnormality detection method, device, upper computer and detection system
CN112198878B (en) Instant map construction method and device, robot and storage medium
CN115661040B (en) Lithium battery cell gluing detection method and device and electronic equipment
CN111126393A (en) Vehicle appearance refitting judgment method and device, computer equipment and storage medium
CN116862910B (en) Visual detection method based on automatic cutting production
CN105809678B (en) A kind of line segment feature global registration method between two views under short base line condition
CN114638294A (en) Data enhancement method and device, terminal equipment and storage medium
CN117495891B (en) Point cloud edge detection method and device and electronic equipment
CN116883446B (en) Real-time monitoring system for grinding degree of vehicle-mounted camera lens
CN112215887A (en) Pose determination method and device, storage medium and mobile robot
CN113313110A (en) License plate type recognition model construction and license plate type recognition method
CN118261960A (en) Image angle calculation method and system based on multiple candidate matching points
CN108957384B (en) Method and device for distinguishing direction of turnover box and electric energy metering equipment
CN111127494A (en) Expressway truck weight limit identification method based on image processing
CN111009003A (en) Method, system and storage medium for correcting deviation of traffic signal lamp
CN115439864A (en) Water meter reading identification method and system, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication