A method, medium and device for pairing landmark points
By calculating the distance between landmark points and constructing space vector features, landmark point pairing is performed, which solves the problem of complex pattern recognition and high mismatch rate in the existing technology, and achieves high-precision, low-cost landmark point recognition.
Patent Information
- Application Number
- CN202410971597.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-19
AI Technical Summary
In the use scenarios with high versatility, the existing technology makes it difficult for landmark recognition equipment to process complex patterns, resulting in complex recognition processes, high costs, high mismatch rates, and limited application scenarios.
By obtaining landmark point sets and spatial coordinates in different postures, calculate the distance between landmark points and feature point pairs, construct space vectors and angle features, pair landmark points, and use the angular structure of feature point pairs to improve judgment accuracy and reduce False match rate.
It effectively expands the application scenarios of landmark point recognition, reduces hardware costs, improves recognition accuracy, and reduces mismatch rates.
Smart Images

Figure CN118521807B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of visual recognition technology, and in particular to a method, medium and device for pairing marker points. Background Art
[0002] Existing technologies mostly use specially designed marker point patterns to distinguish and match different marker points. In usage scenarios with high requirements for versatility, common hardware devices are usually unable to process and recognize such specific patterns, and complex pattern designs require hardware devices to have high image recognition accuracy and computing resources, resulting in complex recognition processes, difficulty in large-scale promotion and use, and high costs. In the extraction and distinction of spatial point set features of common patterns, most of them only use the relative distance between points within a specified distance as a feature to iteratively search the point set to obtain certain spatial features of each point in the point set, and further perform the same search method in different frame image data to obtain the best match of the same point pairs in different point sets. However, when the number of point sets is small and the distance between points is the same or similar, mismatching is very likely to occur.
[0003] Therefore, how to improve the existing technology's fewer application scenarios, high mismatch rate, low accuracy and high cost is a technical problem that needs to be solved urgently in this field. Summary of the invention
[0004] Based on this, the purpose of the present application is to provide a landmark pairing method, medium and device to solve at least one of the technical problems mentioned in the above background technology.
[0005] In a first aspect, the present application provides a method for pairing landmarks, comprising:
[0006] Obtain the first mark point set and the second mark point set of the current workpiece at different positions and postures, as well as the spatial coordinates of each mark point;
[0007] According to the spatial coordinates of each marker point, the distance between two marker points in the same point set is calculated to construct several feature point pairs corresponding to each marker point according to the distance;
[0008] Calculate the space vectors of each pair of feature points corresponding to each marker point, the modulus of the space vectors, and the angle between any two space vectors;
[0009] The space vectors and the modulus of the space vectors corresponding to each angle are taken as the first sub-features, and the first single set of features consisting of a number of first sub-features corresponding to each mark point is the first feature of the mark point; the angles corresponding to the modulus of each space vector are taken as the second sub-features, and the second single set of features consisting of a number of second sub-features corresponding to each mark point is the second feature of the mark point;
[0010] According to the first feature and the second feature of each marker point, the marker points in the first marker point set and the second marker point set are paired to obtain a plurality of marker point pairs as pairing results.
[0011] Furthermore, the step of constructing a plurality of feature point pairs corresponding to each marker point according to the distance includes:
[0012] S21: Taking each selected landmark point as the center, determining whether the distance between other landmark points and the selected landmark point does not exceed the distance threshold; if so, determining the landmark point that does not exceed the set threshold as the feature point of the selected landmark point;
[0013] S22: Gather all feature points of each landmark point to construct a plurality of feature point pairs corresponding to each selected landmark point.
[0014] Furthermore, after constructing a plurality of feature point pairs corresponding to each selected landmark point, the method further includes:
[0015] S23: Determine whether the number of feature point pairs corresponding to each selected marker point exceeds the quantity threshold. If not, increase the distance threshold and return to step S21 to update the feature point pairs corresponding to the selected marker point.
[0016] Furthermore, the step of pairing the marker points in the first marker point set and the second marker point set according to the first feature and the second feature of each marker point includes:
[0017] S51: Select one point in the first mark point set and the second mark point set respectively, and calculate the ratio of the number of the same first single group features of the two points to the total number of the first single group features of the two points as the first feature coefficient;
[0018] S52: Calculate the ratio of the number of the same second single group features of the two points to the total number of the second single group features of the two points, which is the second feature coefficient;
[0019] S53: Determine whether the two points are landmark points for successful pairing based on the first characteristic coefficient and the second characteristic coefficient.
[0020] Furthermore, in step S51 and step S52, the step of determining whether the first single group of features or the second single group of features of two points are the same includes:
[0021] S511: traverse the corresponding sub-features of the two-point single-group features, and determine whether the difference between the two sub-features is less than a set threshold. If so, the sub-features are the same, otherwise, the sub-features are different;
[0022] S512: Determine whether the same sub-features of the two-point single-group features are not less than a set feature number or whether the same sub-features of the two-point single-group features are not less than a set ratio. If so, the single-group features are the same; if not, the single-group features are different.
[0023] Furthermore, before step S511, the method further includes:
[0024] S510: Sort the sub-features in each single group of features according to a set order, select a pre-set number of sub-features, and update each single group of features.
[0025] Further, the step of judging whether two points are landmark points for successful pairing according to the first characteristic coefficient and the second characteristic coefficient includes:
[0026] If the first characteristic coefficient is greater than the first threshold value and / or the second characteristic coefficient is greater than the second threshold value, the two points are determined to be landmark points for successful pairing;
[0027] Alternatively, a total pairing value is calculated based on the first characteristic coefficient and the second characteristic coefficient. If the total pairing value is greater than a pairing threshold, the two points are determined to be landmark points for successful pairing.
[0028] Furthermore, the total pairing value = first characteristic coefficient * first weight + second characteristic coefficient * second weight.
[0029] In a second aspect, the present application further provides a computer storage medium storing an executable program code; the executable program code is used to execute the landmark point pairing method described in any one of the first aspects.
[0030] In a third aspect, the present application further provides a terminal device, comprising a memory and a processing device; the memory stores a program code that can be executed by the processing device; the program code is used to execute the landmark point pairing method described in any one of the first aspects.
[0031] The present invention provides a method, medium and device for pairing marker points. The method obtains the first marker point set and the second marker point set of the current workpiece in different postures, as well as the spatial coordinates of each marker point, and then calculates the distance between the two marker points in the same point set according to the spatial coordinates of each marker point, so as to construct a number of feature point pairs corresponding to each marker point according to the distance, thereby calculating the spatial vector of each feature point pair corresponding to each marker point, the modulus of the spatial vector and the angle between the two spatial vectors. By obtaining the spatial structural relationship between the marker points, the application scenarios of the technology are effectively expanded, avoiding the increase in hardware cost and the problem of misrecognition at a specific angle caused by special patterns, and then using each angle as the basis for the pairing method, the medium and device can be used to pair marker points. The corresponding space vector and the modulus of the space vector are the first sub-features, and the first single feature set composed of several first sub-features corresponding to each mark point is the first feature of the mark point; the corresponding angles of the modulus of each space vector are the second sub-features, and the second single feature set composed of several second sub-features corresponding to each mark point is the second feature of the mark point. Finally, according to the first and second features of each mark point, the mark points in the first mark point set and the second mark point set are paired to obtain several mark point pairs as the pairing results. By making full use of the angle structure of the corresponding vectors of each feature point pair as the judgment condition of the mark point pair, the judgment accuracy is effectively improved to reduce the mismatch rate of the point pair. The existing technology solves the problems of fewer application scenarios, high mismatch rate, low accuracy and high cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A flowchart of a method for pairing landmarks according to an embodiment of the present invention;
[0033] Figure 2 The figure is a schematic diagram of a collection device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0035] It should be noted that if the embodiments of the present invention involve directional indications, such as up, down, left, right, front, back, etc., then the directional indication is only used to explain the relative position relationship, movement status, etc. between the components in a certain specific posture. If the specific posture changes, the directional indication will also change accordingly. In addition, if the embodiments of the present invention involve descriptions of "first, second", "S1, S2", "step one, step two", etc., then such descriptions are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of indicated technical features or indicating the execution order of the method, etc. Those skilled in the art can understand that anything that does not violate the gist of the invention under the technical concept of the invention should be included in the protection scope of the present invention.
[0036] like Figure 1 As shown, the present invention provides a method for pairing landmarks:
[0037] S1: Obtain the first mark point set and the second mark point set of the current workpiece at different positions and postures, as well as the spatial coordinates of each mark point;
[0038] Specifically, Figure 2 As shown, it is optional but not limited to using image acquisition devices, such as processing module 2 and acquisition module 1, to acquire images of the current workpiece surface within the acquisition range at positions 3 and 4, respectively, and analyze and process the images to extract a number of marker points in the images to form a marker point set, and determine the spatial coordinates of each marker point. More specifically, processing module 2 sends a trigger signal to acquisition module 1. After receiving the image acquisition trigger signal, acquisition module 1 captures the current workpiece surface image at position 3 within the field of view, performs image processing, and acquires the first marker point set in the current workpiece surface image and the spatial coordinates of all marker points in the first marker point set [x i , y i , z i ], where i is the i-th marker point in the marker point set, and the marker point set can be optionally represented as P. Next, the workpiece is moved to position 4, and the acquisition module 1 takes the current workpiece surface image again, and performs image processing to obtain the second marker point set in the current workpiece surface image and the spatial coordinates of all marker points in the second marker point set, and the marker point set can be optionally represented as P'.
[0039] S2: According to the spatial coordinates of each marker point, the distance between two marker points in the same point set is calculated to construct a number of feature point pairs corresponding to each marker point according to the distance;
[0040] Specifically, but not limited to, a distance threshold is preferably set, and then the distances between the respective landmark points in the point set are calculated, and the landmark points whose distances between all pairs of points do not exceed the distance threshold are obtained to construct several pairs of feature point pairs. That is to say, the other landmark points in the point set whose distances from each landmark point do not exceed the distance threshold are the feature points of that landmark point, and the point pairs formed by each landmark point and its respective feature points are the several feature point pairs corresponding to each landmark point.
[0041] Preferably, the step of constructing several feature point pairs corresponding to each landmark point according to the distance preferably includes, but is not limited to:
[0042] S21: Centering on each landmark point, determine whether the distance between other landmark points and the selected landmark point does not exceed the distance threshold; if so, determine that the landmark points that do not exceed the distance threshold are the feature points of the selected landmark point;
[0043] S22: Aggregate all the feature points of each landmark point to construct several feature point pairs corresponding to each landmark point.
[0044] Specifically, but not limited to, the range of the set distance threshold is (0, d], or a target area is delimited with d as the radius. According to the spatial coordinates of each landmark point in the landmark point set obtained in step S1, the other landmark points in the landmark point set within the set range are regarded as the feature points P i corresponding to the landmark point P i , where 0 < i ≤ N, i is the i-th landmark point in the landmark point set, N is the number of all landmark points in the landmark point set, 0 < ij ≤ M, ij is the j-th feature point within the set range of the i-th landmark point in the landmark point set, M is the number of all feature points within the set range of each landmark point in the landmark point set, so as to obtain M pairs of feature point pairs (P ij of the landmark point P i , P i , P ij ). It should be noted that for any landmark point P i , the number M of its corresponding feature points P ij is arbitrary, and can be the same or different, and is determined according to the actual distance; after the feature point pairs are determined, the set formed by all the feature point pairs can be represented as T; the distance range is arbitrarily set by those skilled in the art.
[0045] Specifically, in this step, since the respective landmark points in the point set are not necessarily evenly distributed, some landmark points may have only a few or even no corresponding feature points within the set distance threshold, resulting in the inability to locate the landmark point through the spatial relationship between the feature points. Therefore, preferably, after step S22, the corresponding distance threshold is changed according to the distribution density of each landmark point in the point set, so that the landmark point obtains sufficient feature point pairs. Preferably, step S2 further includes:
[0046] S23: Determine whether the number of feature point pairs corresponding to each marker point exceeds the quantity threshold. If not, increase the distance threshold and return to step S21 to update the feature point pairs corresponding to the marker point.
[0047] Specifically, it is optional but not limited to setting a quantity threshold, obtaining the number of feature point pairs corresponding to each marker point, and determining whether the number exceeds the quantity threshold. If not, it means that the number of feature point pairs corresponding to the marker point is too small, and the marker point cannot be matched by the feature point pairs corresponding to the marker point. Therefore, it is preferred for technical personnel in this field to expand the range of the distance threshold so that the marker point obtains more feature points until feature point pairs that meet the quantity threshold are obtained.
[0048] In this embodiment, a preference is given to add step S23 to avoid the situation where the number of feature point pairs corresponding to the marker points is too small, resulting in the inability to find matching points through the spatial relationship between the marker points and adjacent marker points during the marker point pairing process, causing pairing failure. When each marker point obtains a sufficient number of feature point pairs, the spatial relationship of the marker points in the point set can be obtained based on the feature point pairs to facilitate subsequent pairing.
[0049] S3: Calculate the space vectors of each pair of feature points corresponding to each marker point, the modulus of the space vectors, and the angle between any two space vectors;
[0050] Specifically, the spatial vector corresponding to each feature point pair can be obtained according to the spatial coordinates of each point in each feature point pair. , and calculate its modulus and the angle θ between two space vectors k .
[0051] Preferably, it is optional but not limited to obtaining the space vector according to formula 2-1 According to formula 2-2, we can get the modulus of the space vector :
[0052] 2-1
[0053] 2-2
[0054] in, is a feature point pair (P i , P ij ), is a space vector The modulus of (x i ,y i , z i ) is point P i The spatial coordinates of ij ,y ij , zij ) is point P ij The spatial coordinates of .
[0055] Further preferably, the angle between the space vectors can be obtained according to equation 2-3, but is not limited to:
[0056] 2-3
[0057] Among them, θ k is the angle between two space vectors, , M is the number of feature point pairs, is the current space vector, is the other space vector except the current space vector.
[0058] S4: The space vectors and the modulus of the space vectors corresponding to each angle are taken as the first sub-features, and the first single set of features consisting of the first sub-features corresponding to each mark point is the first feature of the mark point; the angles corresponding to the modulus of each space vector are taken as the second sub-features, and the second single set of features consisting of the second sub-features corresponding to each mark point is the second feature of the mark point;
[0059] Specifically, from steps S2 and S3, each marker point and any point within the set distance range form a feature point pair, forming a space vector. Therefore, each feature point extends a number of space vectors, where any two space vectors form an angle, that is, each marker point Pi corresponds to Angle, and then determine the corresponding space vector and the modulus of the space vector, you can get the first feature of the landmark point Pi, which can be represented by the first feature G (θk), including The first single group of features , optional representation:
[0060]
[0061] in, is the first single set of features of the first feature, and is the sub-feature of the first single group of features, , are two space vectors that form an arbitrary angle, , are space vectors , Model.
[0062] On this basis, several first single group features corresponding to each landmark point Pi The first feature that constitutes the landmark point.
[0063] Specifically, from steps S2 and S3, it can be known that each mark point forms a feature point pair with any point within the set distance range, and M space vectors and corresponding moduli are obtained. Because any two space vectors form an angle, that is, each space vector forms M-1 angles with other space vectors. Therefore, according to the moduli of the M space vectors corresponding to each feature point, the M-1 angles corresponding to the moduli of each space vector can be determined as the second feature of the mark point Pi. The second feature can be selected Indicates that it includes M second single group features , optional representation:
[0064]
[0065] in, is the second single set of features of the second feature, are several angles corresponding to the modulus of each space vector, is the kth sub-feature of the second single group feature, 0≤k≤M-1, M-1 is the number of angles.
[0066] On this basis, several second single group features corresponding to each landmark point Pi The second feature that constitutes the landmark point.
[0067] S5: Pairing the marker points in the first marker point set and the second marker point set according to the first feature and the second feature of each marker point, and obtaining a plurality of marker point pairs as pairing results.
[0068] Specifically, it is optional but not limited to selecting one point in the first mark point set and the second mark point set respectively to determine whether the first feature and / or the second feature of the two are the same. If so, the two are a pair of mark points that are successfully matched. After all the mark points of the first mark point set and the second mark point set are matched, a number of mark point pairs that are determined to be successfully matched can be obtained as the matching result. Preferably, it is optional to select different mark point sets as the basis according to the requirements of the matching accuracy, and set the matching success condition, which is that the matching is successful if one of the first feature or the second feature is the same, or the matching is successful if both the first feature and the second feature are the same.
[0069] Preferably, step S5 includes:
[0070] S51: Select one point in the first mark point set and the second mark point set respectively, and calculate the ratio of the number of the first single group feature sets that are the same between the two points to the total number of the first single group feature sets of the two points, which is the first feature coefficient;
[0071] S52: Calculate the ratio of the number of the second single group feature sets that are the same at the two points to the total number of the second single group feature sets at the two points, which is the second feature coefficient;
[0072] S53: Determine whether the two points are landmark points for successful pairing based on the first characteristic coefficient and the second characteristic coefficient.
[0073] Preferably, in step S51 and step S52, the step of determining whether the first single group of features or the second single group of features of two points are the same includes:
[0074] S511: traverse the corresponding sub-features of the two-point single-group features, and determine whether the difference between the two sub-features is less than a set threshold. If so, the sub-features are the same, otherwise, the sub-features are different;
[0075] S512: Determine whether the same sub-features of the two-point single-group features are not less than a set feature number or whether the same sub-features of the two-point single-group features are not less than a set ratio. If so, the single-group features are the same; if not, the single-group features are different.
[0076] Specifically, you can optionally traverse the corresponding sub-features of the two-point single-group features, determine whether the difference between the two sub-features is less than a set threshold, and obtain several groups of identical sub-features between the two-point single-group features. If the number of identical sub-features is not less than the set number of groups or not less than the set proportion, the two-point single-group features are the same; the set threshold, the set number of features, and the set proportion are all arbitrarily set by technical personnel in this field.
[0077] More preferably, before step S511, the method further includes:
[0078] S510: Sort the sub-features in each single group of features according to a set order, select a pre-set number of sub-features, and update each single group of features.
[0079] Specifically, the larger the value of the sub-feature, the more obvious the feature is, and the higher its importance to the pairing of the landmark points. Therefore, in order to reduce the amount of calculation and improve calculation efficiency, the sub-features in each single group of features can be sorted in descending order according to the value of the sub-feature. At the same time, due to reasons such as the acquisition angle, the single group of features or sub-features corresponding to each landmark point may be missing, affecting the pairing results of the landmark points. Therefore, from the sorted sub-features, a set number of sub-features in each single group of features can be selected to represent the single group of features and update the single group of features.
[0080] More preferably, step S53 includes:
[0081] S531: If the first characteristic coefficient is greater than the first threshold value and / or the second characteristic coefficient is greater than the second threshold value, the two points are determined to be landmark points for successful pairing;
[0082] Specifically, the first threshold and the second threshold can be set optionally. When the first characteristic coefficient is greater than the first threshold, the first characteristics of the two points are the same, otherwise they are different. When the second characteristic coefficient is greater than the second threshold, the second characteristics of the two points are the same, otherwise they are different. Then, according to the requirements of matching accuracy, the matching success condition can be set, that is, the matching is successful if either the first characteristic or the second characteristic between the two points is the same, or the matching is successful if both the first characteristic and the second characteristic between the two points are the same.
[0083] Further preferably, since the first feature and the second feature have different importance in the point pair matching, step S53 may optionally further include:
[0084] S531': Calculate the total pairing value according to the first characteristic coefficient and the second characteristic coefficient. If the total pairing value is greater than the pairing threshold, determine that the two points are landmark points for successful pairing.
[0085] Preferably, the total pairing value=first characteristic coefficient*first weight+second characteristic coefficient*second weight.
[0086] Specifically, since the importance of the first feature and the second feature to the point pair matching is different during the pairing process of the landmark points, their respective weights are also different. In order to improve the success rate of point pair matching and reduce the false matching rate, each feature coefficient can be optionally assigned a weight, and a pairing threshold can be set. If the value of the first feature coefficient * first weight + second feature coefficient * second weight of any point in the first landmark point set and the second landmark point set is not greater than the pairing threshold, it is not a spatially paired landmark point. If it is greater, the two points are successfully paired landmark points.
[0087] In this embodiment, a method for pairing marker points of the present invention is provided, by respectively obtaining the first marker point set and the second marker point set of the current workpiece in different positions and the spatial coordinates of each marker point, and then calculating the distance between the two marker points in the same point set according to the spatial coordinates of each marker point, so as to construct a number of feature point pairs corresponding to each marker point according to the distance, thereby calculating the spatial vector of each feature point pair corresponding to each marker point and the modulus of the spatial vector and the angle between the two spatial vectors. By obtaining the spatial structural relationship between the marker points, the application scenarios of the technology are effectively expanded, avoiding the increase in hardware cost and the problem of misrecognition at a specific angle caused by special patterns, and then using each clip as the basis for the matching of the marker points. The space vector corresponding to the angle and the modulus of the space vector are the first sub-features, and the first single feature set composed of several first sub-features corresponding to each mark point is the first feature of the mark point; the angle corresponding to the modulus of each space vector is the second sub-feature, and the second single feature set composed of several second sub-features corresponding to each mark point is the second feature of the mark point. Finally, according to the first and second features of each mark point, the mark points in the first mark point set and the second mark point set are paired to obtain several mark point pairs as the pairing results. By making full use of the angle structure of the corresponding vectors of each feature point pair as the judgment condition of the mark point pair, the judgment accuracy is effectively improved to reduce the mismatch rate of the point pair. The existing technology solves the problems of fewer application scenarios, high mismatch rate, low accuracy and high cost.
[0088] On the other hand, the present invention further provides a computer storage medium storing an executable program code; the executable program code is used to execute any of the above-mentioned landmark point pairing methods.
[0089] On the other hand, the present invention also provides a terminal device, including a memory and a processing device; the memory stores a program code that can be executed by the processing device; the program code is used to execute the pairing method of any of the above-mentioned landmarks.
[0090] Exemplarily, the program code may be divided into one or more modules / units, which are stored in the memory and executed by the processing device to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the program code in the terminal device.
[0091] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processing device and a memory. Those skilled in the art will appreciate that the terminal device may also include an input / output device, a network access device, a bus, etc.
[0092] The processing device may be a central processing unit (CPU), or other general processing devices, digital signal processing devices (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general processing device may be a microprocessing device or the processing device may be any conventional processing device, etc.
[0093] The memory may be an internal storage unit of the terminal device, such as a hard disk or a memory. The memory may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device. Furthermore, the memory may include both an internal storage unit of the terminal device and an external storage device. The memory is used to store the program code and other programs and data required by the terminal device. The memory may also be used to temporarily store data that has been output or is to be output.
[0094] The above-mentioned computer storage medium and terminal device are created based on the pairing method of the above-mentioned landmark points, and their technical functions and beneficial effects are no longer repeated here. The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0095] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for pairing landmark points. It is characterized in that include: Obtain the first mark point set and the second mark point set of the current workpiece at different positions and postures, as well as the spatial coordinates of each mark point; According to the spatial coordinates of each marker point, the distance between two marker points in the same point set is calculated to construct several feature point pairs corresponding to each marker point according to the distance; Calculate the space vectors of each pair of feature points corresponding to each marker point, the modulus of the space vectors, and the angle between any two space vectors; The space vectors and the modulus of the space vectors corresponding to each angle are taken as the first sub-features, and the first single set of features consisting of a number of first sub-features corresponding to each mark point is the first feature of the mark point; the angles corresponding to the modulus of each space vector are taken as the second sub-features, and the second single set of features consisting of a number of second sub-features corresponding to each mark point is the second feature of the mark point; According to the first feature and the second feature of each marker point, the marker points in the first marker point set and the second marker point set are paired to obtain a plurality of marker point pairs as pairing results.
2. The method according to claim 1, It is characterized in that The steps of constructing a plurality of feature point pairs corresponding to each landmark point according to the distance include: S21: Taking each selected landmark point as the center, determining whether the distance between other landmark points and the selected landmark point does not exceed the distance threshold; if so, determining the landmark point that does not exceed the set threshold as the feature point of the selected landmark point; S22: Gather all feature points of each landmark point to construct a plurality of feature point pairs corresponding to each selected landmark point.
3. The method according to claim 2, It is characterized in that After constructing several feature point pairs corresponding to each selected landmark point, it also includes: S23: Determine whether the number of feature point pairs corresponding to each selected marker point exceeds the quantity threshold. If not, increase the distance threshold and return to step S21 to update the feature point pairs corresponding to the selected marker point.
4. The method according to claim 1, It is characterized in that The step of pairing the marker points in the first marker point set and the second marker point set according to the first feature and the second feature of each marker point comprises: S51: Select one point in the first mark point set and the second mark point set respectively, and calculate the ratio of the number of the same first single group features of the two points to the total number of the first single group features of the two points as the first feature coefficient; S52: Calculate the ratio of the number of the same second single group features of the two points to the total number of the second single group features of the two points, which is the second feature coefficient; S53: Determine whether the two points are landmark points for successful pairing based on the first characteristic coefficient and the second characteristic coefficient.
5. The method according to claim 4, It is characterized in that In step S51 and step S52, the step of determining whether the first single group of features or the second single group of features of two points are the same includes: S511: traverse the corresponding sub-features of the two-point single-group features, and determine whether the difference between the two sub-features is less than a set threshold. If so, the sub-features are the same, otherwise, the sub-features are different; S512: Determine whether the same sub-features of the two-point single-group features are not less than a set feature number or whether the same sub-features of the two-point single-group features are not less than a set ratio. If so, the single-group features are the same; if not, the single-group features are different.
6. The method according to claim 5, It is characterized in that Before step S511, the method further includes: S510: Sort the sub-features in each single group of features according to a set order, select a pre-set number of sub-features, and update each single group of features.
7. The method according to any one of claims 4 to 6, It is characterized in that The step of judging whether two points are landmark points for successful pairing according to the first characteristic coefficient and the second characteristic coefficient comprises: If the first characteristic coefficient is greater than the first threshold value and / or the second characteristic coefficient is greater than the second threshold value, the two points are determined to be landmark points for successful pairing; Alternatively, a total pairing value is calculated based on the first characteristic coefficient and the second characteristic coefficient. If the total pairing value is greater than a pairing threshold, the two points are determined to be landmark points for successful pairing.
8. The method according to claim 7, It is characterized in that Total matching value = first characteristic coefficient * first weight + second characteristic coefficient * second weight.
9. A computer storage medium, It is characterized in that An executable program code is stored; the executable program code is used to execute the landmark point pairing method described in any one of claims 1-8.
10. A terminal device, It is characterized in that It comprises a memory and a processing module; the memory stores a program code that can be executed by the processing module; the program code is used to execute the landmark point pairing method described in any one of claims 1-8.
Citation Information
Patent Citations
Method for measuring three-dimensional position and stance of object with single camera
CN101839692A
Panoramic look-around image generation method of vehicle and related equipment
CN110719411A
Image processing method, device and system
CN111213159A
Image matching method and related device
CN116958606A
Apparatus and method for determining rotation angle of object, and computer-readable storage medium storing instructions to perform method for determining rotation angle of object
US20240202972A1
