A high-precision positioning method for metal processing drilling

By calculating the difference value of the center coordinates of the flange image and the credibility value of the feature point for weighted matching, the problem of inaccurate flange positioning in the existing technology is solved, high-precision drilling positioning is achieved, and the processing process is ensured. Accuracy and reliability.

CN118429427BActive Publication Date: 2024-09-27BAOJI LIHUA NON-FERROUS METALS CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202410889920.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-09-27
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

The existing drilling positioning method based on machine vision has the problem of inaccurate positioning due to feature point matching errors in flange processing.

Method used

By obtaining the significant edge points of the flange to be drilled and the template image, calculate the difference value of the center coordinates, fit the continuation circle, use the feature detection algorithm to obtain the feature points and feature vectors, calculate the credibility value of the feature points, and perform weighted distance matching , improve the accuracy of feature point matching.

Benefits of technology

It achieves high-precision positioning of the flange, reduces noise errors, improves processing quality and accuracy, and ensures production efficiency and product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118429427B
    Figure CN118429427B
Patent Text Reader

Abstract

The present invention relates to the field of image data processing, and more specifically, the present invention relates to a high-precision positioning method for metal processing drilling, the method comprising: collecting a flange image to be drilled and a template image, performing preprocessing, edge detection and filtering, obtaining the curvature and center coordinates of significant edge points; calculating the difference value between the center coordinates of each connected domain and performing circular extension to obtain a first extension circle and a second extension circle; using a feature detection algorithm to obtain feature points and feature vectors; calculating the distance between each feature point and the first extension circle and the second extension circle, and calculating the first credibility value and the second credibility value of each feature point according to the distance and the difference value, multiplying the two to obtain a distance weight value, and weighting to obtain a significant distance value. The present invention achieves high-precision positioning of flange processing drilling by weighting the distance between the feature vectors of each feature point and performing feature point matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image data processing and more specifically to a high-precision positioning method for metal processing drilling. Background Art

[0002] Drilling is a common machining operation used to machine holes or holes in solid materials. It is one of the basic operations in the machining process and is widely used in various industries and fields. In the process of workpiece assembly, holes are needed to achieve alignment and fixation, so the accurate drilling position is crucial to ensure the correctness of the overall assembly. Fitter usually uses a drilling machine to perform drilling operations, and controls the drilling position by fixing the workpiece and the drill bit. Drilling is crucial to the manufacture of various parts and workpieces.

[0003] The existing Chinese patent application document with publication number CN117011373A discloses a workpiece drilling positioning method based on machine vision. A depth camera is used to capture an image of a target workpiece and send it to a host computer. The host computer performs template matching based on a model in a model library to identify the type of the workpiece in the image and generate a drillable area centered on the drilling point of the workpiece. The drilling point position information of the identified target workpiece is converted into a target position reached by a robotic arm. The host computer controls the robotic arm to reach the target position and performs drilling positioning in the drillable area by controlling the drilling device.

[0004] Although the drilling location can be performed on the drillable area in the above operation, when combining machine vision for high-precision drilling of flange processing, it is necessary to perform template matching through the image of the flange to be drilled and detect the flange features. Since the feature vectors between the feature points are similar, the feature points with similar feature vectors will be mistakenly matched together during the matching process with the template feature points, resulting in inaccurate flange positioning results, which affects the determination of the drilling position. Summary of the invention

[0005] In order to solve the problem that in the process of matching according to template feature points, feature points with similar feature vectors are mistakenly matched together, resulting in inaccurate flange positioning results, the present invention provides a solution as follows.

[0006] A high-precision positioning method for metal processing drilling, comprising: obtaining a flange image to be drilled and a template image, and performing preprocessing to obtain significant edge points of the flange image to be drilled; obtaining a set of connected domains composed of all significant edge points, calculating the average value of the ratio of the distance between the corresponding circle center coordinates of the significant edge points in each connected domain and the diagonal length of the flange image to be drilled as a difference value, fitting a circle to the connected domain, and using the circle as the first extended circle of the flange image to be drilled, and similarly obtaining the second extended circle of the template image; using a feature detection algorithm to obtain the flange image to be drilled and the template image, respectively. Feature points and feature vectors, and the average value of the ratio of the distance between the significant edge points and feature points in the image of the flange to be drilled and the difference value is calculated as the first credibility value of the feature points in the image of the flange to be drilled, and the second credibility value of the template image is obtained similarly; the product of the first credibility value and the second credibility value is calculated, and the product is used as the weight value of the distance between the feature points in the image of the flange to be drilled and the template image, and the distance is weighted and summed to generate a significant distance value; feature point matching is performed according to the significant distance value, and the feature point matching result is obtained, the flange position is determined, and the flange is positioned for high-precision drilling.

[0007] By fitting an arc to the edge line in the edge detection result of the flange image to be drilled to obtain the arc curvature and the center coordinates, and selecting the edge line with similar center coordinates according to the difference value of the center coordinates, it is beneficial to accurately determine the position and shape of the flange image to be drilled. The edge line with similar curvature of the fitted arc is extended into a circle according to the radius of the fitted arc, which can reduce the error introduced by noise or deformation in the flange image to be drilled. The pixel points on the extended circle are selected along the inner and outer normal directions to allocate the credibility weight of the feature point according to the distance. The distance between the feature vector of each feature point of the target image and the feature vector of each feature point of the template image is weighted and the feature points are matched. The extended circle and the weighted matching of the feature points further enhance the accuracy and improve the sensitivity to the feature points in the image. High-precision flange positioning can be achieved, thereby ensuring the quality and accuracy of processing.

[0008] In one embodiment, obtaining the significant edge points of the image of the flange to be drilled comprises the steps of:

[0009] Grayscale processing is performed on the flange image to be drilled, and graphic detection is performed on the flange image to be drilled after grayscale processing to obtain the wide side of the flange image to be drilled, and half of the number of edge points of the wide side is used as a filtering threshold. In response to the curvature of each edge point of any connected domain in the flange image to be drilled being greater than the filtering threshold, filtering is performed;

[0010] According to the distribution of edge points in each connected domain after filtering, outliers in each connected domain are obtained, abnormal edge points in the connected domain are obtained according to the outliers, and the abnormal edge points are filtered out to obtain significant edge points.

[0011] By setting the filtering threshold, edge points that do not belong to the flange to be drilled are filtered out, thereby reducing the noise points in the image, improving the accuracy and reliability of edge detection, and retaining edge points with curvature greater than the filtering threshold, which helps to retain the significant edges in the image. Through outliers, the quality and accuracy of edge detection results are improved.

[0012] In one embodiment, fitting a circle to the connected domain comprises the steps of:

[0013] According to the vectors of the pixel points on both sides of each significant edge point in the connected domain, the curvature of the significant edge point is calculated, a circular arc curve is fitted according to the curvature, the mean value of the curvature of each significant edge point is calculated, the mean value is used as the curvature of the circular arc curve, and the center coordinates of the circular arc curve are obtained, wherein each connected domain corresponds to a circular arc curve, and each circular arc curve corresponds to a center coordinate;

[0014] Any connected domain is taken as the target connected domain, and the difference value between the center coordinates of the target connected domain and the center coordinates of other connected domains is calculated. The average of the difference values ​​is taken as the difference value of the target connected domain to obtain a difference value sequence. A similar arc curve is selected from the difference value sequence to fit a circle, and the circle is extended to the radius of the arc curve.

[0015] The curve segments that may represent circular structures are extracted from the set of edge points in the connected domain, and the difference in the center positions between the target connected domain and other connected domains is evaluated to determine whether the target connected domain represents an independent circular structure. The one that best meets the requirements is selected from multiple possible circular fitting results and extended into a complete circle.

[0016] In one embodiment, the difference value also includes the following relationship:

[0017] ;

[0018] In the formula, Indicates The difference value of the center coordinates of the circle in the connected domain corresponding to the significant edge points is Indicates that except The total number of other connected domains in the connected domain corresponding to the significant edge points, Indicates The horizontal coordinates of the center coordinates of the connected domain of significant edge points, Indicates The ordinate of the center coordinate of the connected region of the significant edge points, Indicates that except The other salient edge points outside the connected domain The horizontal coordinates of the center coordinates of the connected domain corresponding to the significant edge points, Indicates that except The other salient edge points outside the connected domain The ordinate of the center coordinate of the connected domain corresponding to the significant edge point, represents the inverse tangent function, Indicates the diagonal length of the flange image to be drilled.

[0019] Through this calculation process, we can get The difference value of the coordinates of the circle center in the connected domain corresponding to the salient edge point. When fitting a circle, this difference value can be used to evaluate the The similarity between the connected domain of the significant edge points and other connected domains is used to select the most suitable circular fitting result.

[0020] In one embodiment, obtaining a first credibility value of a feature point in the image of the flange to be drilled comprises the steps of:

[0021] Calculate the average value of the distance between each feature point in the image of the flange to be drilled and each significant edge point on the first continuation circle, perform normalization processing, use the difference value as the weight of the distance, and obtain a weighted average value;

[0022] The weighted average of all first extended circles is calculated and normalized to obtain a first credibility value.

[0023] The distance can represent the proximity between the feature point and the first extension circle, and a function is used to combine the distance and difference values ​​into a single weight value.

[0024] In one embodiment, the first credibility value further includes the following relation:

[0025] ;

[0026] In the formula, represents the first credibility value, represents the total number of fitted circles, represents the normalization function, Indicates The total number of pixels in the connected domain of significant edge points, Indicates the number of holes in the flange image to be drilled. The horizontal coordinate of the feature vector corresponding to the feature point, Indicates the number of holes in the flange image to be drilled. The ordinate of the feature vector corresponding to the feature point, Indicates The first The horizontal coordinate of the pixel point coordinate, Indicates The first The vertical coordinate of the pixel point coordinates, Indicates The difference value of the coordinates of the circle center in the connected domain corresponding to the significant edge points.

[0027] The credibility weight of the feature point is calculated based on the relationship between the pixel points in the fitting circle and the feature point and the difference value of the center coordinates of the circle. By considering these factors, the importance of the feature points can be evaluated more accurately, so that they can be used more effectively for subsequent processing.

[0028] In one embodiment, the significant distance value satisfies the following relationship:

[0029] ;

[0030] In the formula, Indicates the number of holes in the flange image to be drilled. The feature vector corresponding to the feature point is the same as the feature point in the template image. The significant distance value between the feature vectors corresponding to the feature points, Indicates the feature points in the image of the drilled flange and feature points in the template image The distance weight value, Indicates the number of holes in the flange image to be drilled. feature points feature vectors, Indicates the first feature points feature vectors, express and The absolute value of the difference.

[0031] Use distance weight value To weight the difference between eigenvectors , thereby calculating the significant distance value between feature points The above method is helpful to consider the difference between different feature points, so as to more accurately match and identify similar features in subsequent processing.

[0032] In one embodiment, the obtaining of feature point matching results, determining the flange position, and performing high-precision hole positioning on the flange includes:

[0033] The image of the flange to be drilled is matched with the marked template image to determine the position of the flange to be drilled, and the flange drilling position in the marked template image is mapped with the image of the flange to be drilled to obtain the precise positioning of the flange drilling.

[0034] The present invention has the following effects:

[0035] 1. The present invention selects edge lines with similar center coordinates through the difference value of the center coordinates, extends the edge lines with similar curvature of the fitted arc into a circle according to the radius of the fitted arc, selects pixel points on the extended circle and distributes the credibility weight of the feature points according to the distance along the inner and outer normal directions, and uses the weight as an adjustment parameter for feature point matching, so as to more accurately evaluate the importance of the feature points, which is helpful to improve the high-precision positioning of the drilling flange.

[0036] 2. The present invention achieves accurate flange positioning results by weighting the distance between the feature vector of each feature point of the target image and the feature vector of each feature point of the template image and performing feature point matching to obtain the feature point matching results after credibility weighting, thereby realizing high-precision positioning of flange machining and drilling, ensuring the accuracy and reliability of the machining process, improving production efficiency, reducing waste, and ensuring that product quality meets the requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0038] Figure 1 It is a method flow chart of steps S1 to S5 in a high-precision positioning method for metal processing drilling in an embodiment of the present invention.

[0039] Figure 2 It is a schematic diagram of a grayscale image of a flange image to be drilled in a high-precision positioning method for metal processing drilling according to an embodiment of the present invention.

[0040] Figure 3 It is a schematic diagram of edge detection results of an image of a flange to be drilled in a high-precision positioning method for metal processing drilling in an embodiment of the present invention.

[0041] Figure 4 It is a method flow chart of step S10 to step S11 in a high-precision positioning method for metal processing drilling according to an embodiment of the present invention.

[0042] Figure 5 It is a method flow chart of step S20-step S21 in a high-precision positioning method for metal processing drilling according to an embodiment of the present invention.

[0043] Figure 6 It is a method flow chart of step S30 to step S31 in a high-precision positioning method for metal processing drilling according to an embodiment of the present invention. DETAILED DESCRIPTION

[0044] 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 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0045] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0046] Reference Figure 1 A high-precision positioning method for metal processing drilling includes steps S1 to S5, which are specifically as follows:

[0047] S1: Obtain an image of the flange to be drilled and a template image, and perform preprocessing to obtain significant edge points of the image of the flange to be drilled.

[0048] Further explanation, in this embodiment, the template image is a standard flange image, and the flange image to be drilled and the template image are gray-scaled. Figure 2 , get the grayscale image, use the Canny operator to detect the edge of the grayscale image of the flange to be drilled, refer to Figure 3 , obtain the edge detection result of the flange image to be drilled.

[0049] In order to improve the detection accuracy, the image after edge detection results is filtered to filter out edge points that do not belong to the flange to be drilled. The filtering is performed in two ways to better obtain significant edge points.

[0050] Reference Figure 4 , including step S10-step S11:

[0051] S10: grayscale processing is performed on the image of the flange to be drilled, and graphic detection is performed on the grayscale processed image of the flange to be drilled to obtain the wide side of the image of the flange to be drilled, and half of the number of edge points of the wide side is used as a filtering threshold. In response to the curvature of each edge point of any connected domain in the image of the flange to be drilled being greater than the filtering threshold, filtering is performed;

[0052] To further explain, in this embodiment, shape detection is used to obtain the wide side of the image after edge detection. The radius of the flange to be drilled is determined by using half the length of the wide side, that is, the connected domain with the radius corresponding to the largest circle that may exist in the edge detection image. The purpose is to remove abnormal edge points.

[0053] S11: according to the distribution of edge points in each connected domain after filtering, the outlier value in each connected domain is obtained, the abnormal edge points in the connected domain are obtained according to the outlier value, the abnormal edge points are filtered out, and the significant edge points are obtained.

[0054] Further explanation, in this embodiment, the box plot method is used to obtain the outlier value of each pixel in the connected domain. This method is a well-known technology. The box plot is a commonly used statistical chart used to display the distribution of a set of data, including the median, upper and lower quartiles, maximum and minimum values, etc. The box plot can intuitively display the discreteness and outliers of the data, and is suitable for comparing the differences between multiple groups of data and detecting outliers in the data set. In addition, the standard deviation method, clustering or density estimation technology can also be used to extract outliers.

[0055] S2: Obtain a set of connected domains consisting of all significant edge points, calculate the average value of the ratio of the distance between the center coordinates of the significant edge points corresponding to the circle in each connected domain and the diagonal length of the flange image to be drilled as the difference value, fit a circle to the connected domain, and use the circle as the first extended circle of the flange image to be drilled. Similarly, obtain the second extended circle of the template image.

[0056] Reference Figure 5 , including step S20-step S21:

[0057] S20: Calculate the curvature of each significant edge point according to the vectors of the pixel points on both sides of each significant edge point in the connected domain, fit the arc curve according to the curvature, calculate the mean of the curvature of each significant edge point, use the mean as the curvature of the arc curve, and obtain the center coordinates of the arc curve, wherein each connected domain corresponds to one arc curve, and each arc curve corresponds to one center coordinate;

[0058] To further illustrate, the curvature of the significant edge point in each connected domain is calculated, and the curvature calculation method can be obtained using the three-point method, the five-point method, the least squares fitting method, etc. In this embodiment, the three-point method is used to obtain three adjacent significant edge points on the curve from the edge detection algorithm, and these three points are used to approximate the curve and calculate the curvature. The arc is fitted according to the curvature of each significant edge point in the connected domain, so as to obtain the center coordinates of the fitted arc; wherein, according to each significant edge point in the connected domain The fitted arc corresponds to a center coordinate, multiple center coordinates can be obtained.

[0059] S21: any connected domain is used as a target connected domain, and the difference between the center coordinates of the target connected domain and the center coordinates of other connected domains is calculated, and the mean of the difference values ​​is used as the difference value of the target connected domain to obtain a difference value sequence, and a similar arc curve is selected from the difference value sequence to fit a circle, and the arc curve is extended to a circle with a radius;

[0060] To further illustrate, the difference values ​​between the center coordinates of each connected domain and other connected domains are calculated respectively, and arcs with similar difference values ​​are fitted to obtain multiple fitted circles. In this embodiment, all the fitted circles of the image of the flange to be drilled are used as the first extended circles, and all the fitted circles of the template image are used as the second extended circles. The lower the difference value of the center coordinates of the fitted circle is, the closer the center coordinates of other fitted circles are. The possibility that the fitted circle is the edge detection result of the true contour of the flange is higher, and the significant edge points close to the circle have higher credibility, and the significant edge points far away from the circle, that is, the feature points far away from the edge area are likely to be background noise and surface feature points of the flange image.

[0061] In addition, in another embodiment, the degree of angle difference between the connected domain corresponding to the significant edge point and the center of the circle in other connected domains can be used as the adjustment coefficient;

[0062] Specifically, the difference value also includes the following relationship:

[0063] ;

[0064] In the formula, Indicates The difference value of the center coordinates of the circle in the connected domain corresponding to the significant edge points is Indicates that except The total number of other connected domains in the connected domain corresponding to the significant edge points, Indicates The horizontal coordinates of the center coordinates of the connected domain of significant edge points, Indicates The ordinate of the center coordinate of the connected region of the significant edge points, Indicates that except The other salient edge points outside the connected domain The horizontal coordinates of the center coordinates of the connected domain corresponding to the significant edge points, Indicates that except The other salient edge points outside the connected domain The ordinate of the center coordinate of the connected domain corresponding to the significant edge point, represents the inverse tangent function, Indicates the diagonal length of the flange image to be drilled.

[0065] Further explanation: Indicates The salient edge points correspond to the first connected domain and the second connected domain. The relative degree of angular difference between the centers of connected domains of significant edge points; Indicates The salient edge points correspond to the center of the connected domain and the first The relative degree of distance difference between the centers of connected domains of significant edge points;

[0066] Indicates The salient edge points correspond to the center of the connected domain and the first The average position difference of the center of the connected domain of the significant edge points is The salient edge points correspond to the center of the connected domain and the first The higher the average position difference of the centers of the connected domains of the significant edge points, the higher the The higher the difference value of the center coordinates of the connected domain corresponding to the significant edge point is, the higher the difference value of the center coordinates of the connected domain corresponding to the significant edge point is.

[0067] Through the above scheme, the difference degree of the center of the corresponding connected domain is obtained according to the two significant edge points, which is conducive to improving the accuracy of obtaining the center of the flange to be drilled.

[0068] S3: Use the feature detection algorithm to obtain the feature points and feature vectors of the flange image to be drilled and the template image respectively, and calculate the average value of the ratio of the distance between the significant edge points and feature points in the flange image to be drilled and the difference value as the first credibility value of the feature points in the flange image to be drilled. Similarly, the second credibility value of the template image is obtained.

[0069] Further explanation, in this embodiment, the ORB feature detection algorithm is used to perform feature detection on the preprocessed flange image to be drilled and the template image respectively, and all feature points and their feature vectors in the preprocessed flange image to be drilled and all feature points and their feature vectors in the template image are obtained, wherein the preprocessed flange image to be drilled and the template image are read, an ORB object is created, and the detectAndCompute method of the ORB object is used to detect key points and descriptors in the image, and obtain feature points of the preprocessed flange image to be drilled and the template image, wherein detectAndCompute is a method of the ORB feature detector in OpenCV, and the descriptors of each image correspond to a matrix, and each row in the matrix corresponds to the feature vector of a feature point. The ORB feature detection algorithm is a well-known technology in the art and will not be described in detail. The first feature point in the preprocessed flange image to be drilled is recorded. The size of the feature vector of a feature point is , the coordinates are , the template image The size of the feature vector of a feature point is , the coordinates are .

[0070] Reference Figure 6 , including step S30-step S31:

[0071] S30: calculating the average value of the distance between each feature point in the image of the flange to be drilled and each significant edge point on the first continuation circle, performing normalization processing, taking the difference value as the weight of the distance, and obtaining a weighted average value;

[0072] S31: Calculate the weighted average of all first extended circles and perform normalization processing to obtain a first credibility value.

[0073] In addition, in another embodiment, the average value of the credibility weight influence factor of the feature point of the coordinates of any pixel point in the connected domain of each significant edge point in all fitting circles is calculated;

[0074] Specifically, the first credibility value satisfies the following relationship:

[0075] ;

[0076] In the formula, represents the first credibility value, represents the total number of fitted circles, represents the normalization function, Indicates The total number of pixels in the connected domain of significant edge points, Indicates the number of holes in the flange image to be drilled. The horizontal coordinate of the feature vector corresponding to the feature point, Indicates the number of holes in the flange image to be drilled. The ordinate of the feature vector corresponding to the feature point, Indicates The first The horizontal coordinate of the pixel point coordinate, Indicates The first The vertical coordinate of the pixel point coordinates, Indicates The difference value of the coordinates of the circle center in the connected domain corresponding to the significant edge points.

[0077] Further, each feature point is assigned a corresponding credibility weight according to its distance from the circle, and weighting is performed when calculating the distance between the feature vector of each feature point of the preprocessed flange image to be drilled and the feature vector of each feature point of the template image;

[0078] Indicates The first The pixel coordinates are The credibility weight influencing factor generated by the feature points;

[0079] Indicates The coordinates of each pixel pair in the connected domain of the significant edge points are The average credibility weight influence factor generated by the feature points; when the coordinates are The closer the feature point is to the true flange contour, the higher the credibility weight assigned to the point;

[0080] Similarly, calculate the template image The overall credibility weight of the feature vector distance of each feature point.

[0081] S4: Calculate the product of the first credibility value and the second credibility value, use the product as a weight value for the distance between the feature points in the drilling flange image and the template image, perform weighted summation on the distances, and generate a significant distance value.

[0082] The significant distance value satisfies the following relationship:

[0083] ;

[0084] In the formula, Indicates the number of holes in the flange image to be drilled. The feature vector corresponding to the feature point is the same as the feature point in the template image. The significant distance value between the feature vectors corresponding to the feature points, Indicates the feature points in the image of the drilled flange and feature points in the template image The distance weight value, Indicates the number of holes in the flange image to be drilled. feature points feature vectors, Indicates the first feature points feature vectors, express and The absolute value of the difference.

[0085] Further explanation: the first The feature vector of the feature point is The overall credibility weight of the feature vector distance of feature points is higher when the value is higher, indicating that the preprocessed flange image to be drilled is feature points and the template image The closer each feature point is to the real flange contour, the lower the possibility of background noise and flange image surface feature points; Indicates the first The feature vector corresponding to the feature point is the same as the feature vector of the template image. The distance between the feature vectors corresponding to the feature points.

[0086] S5: Match feature points according to the significant distance value, obtain feature point matching results, determine the flange position, and perform high-precision drilling positioning on the flange.

[0087] The image of the flange to be drilled is matched with the marked template image to determine the position of the flange to be drilled, and the flange drilling position in the marked template image is mapped with the image of the flange to be drilled to obtain the precise positioning of the flange drilling.

[0088] It should be noted that feature point matching is usually used The nearest neighbor algorithm matches the feature vectors of the feature points in the target image and the template image. According to the distance between the feature vector corresponding to the feature point in the preprocessed flange image to be drilled and the feature vector corresponding to the feature point in the template image, the distance between the feature vector corresponding to the feature point in the preprocessed flange image to be drilled and the feature vector corresponding to the feature point in the template image is calculated by The nearest neighbor algorithm obtains the The feature point corresponding to the nearest neighbor distance is usually selected , K-Nearest Neighbors (KNN) is a basic classification and regression method that obtains the two feature points that are closest to the feature point. If the ratio of the Euclidean distance between the feature point and the first matching point and the second matching point is less than , then the first matching point is the feature point that matches the feature point, thereby obtaining the matching results of all the credibility-weighted feature points in the preprocessed flange image to be drilled and the template image, thereby performing image mapping and realizing high-precision positioning of flange drilling.

[0089] This is the end of the present invention.

[0090] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.

[0091] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

Claims

1. A high-precision positioning method for metal processing drilling, characterized in that: include: Acquire the image of the flange to be drilled and the template image, preprocess the image of the flange to be drilled to obtain significant edge points of the image of the flange to be drilled, and preprocess the template image to obtain significant edge points of the template image; Obtain a set of connected domains formed by all significant edge points of the flange image to be drilled, calculate the average value of the ratio of the distance between the center coordinates of the significant edge points corresponding to the circle in each connected domain and the diagonal length of the flange image to be drilled as the difference value, fit a circle to the connected domain, and use the circle as the first extended circle of the flange image to be drilled, and similarly obtain the second extended circle of the template image; Using a feature detection algorithm, feature points and feature vectors of the flange image to be drilled and the template image are obtained respectively, and the average value of the ratio of the distance between the significant edge point and the feature point in the flange image to be drilled and the difference value is used to calculate the first credibility value of the feature point in the flange image to be drilled. The first credibility value of the feature point in the flange image to be drilled satisfies the following relationship: ; In the formula, represents the first credibility value, represents the total number of fitted circles, represents the normalization function, Indicates The total number of pixels in the connected domain of significant edge points, Indicates the number of holes in the flange image to be drilled. The horizontal coordinate of the feature vector corresponding to the feature point, Indicates the number of holes in the flange image to be drilled. The ordinate of the feature vector corresponding to the feature point, Indicates The first The horizontal coordinate of the pixel point coordinate, Indicates The first The vertical coordinate of the pixel point coordinates, Indicates The difference value of the coordinates of the circle center in the connected domain corresponding to the significant edge points; similarly, the second credibility value of the template image is obtained; Calculating the product of the first credibility value and the second credibility value, using the product as a weight value for the distance between the feature points in the drilling flange image and the template image, performing weighted summation on the distance, and generating a significant distance value; Perform feature point matching according to the significant distance value, obtain feature point matching results, determine the flange position, and perform high-precision drilling positioning on the flange; Obtaining significant edge points of the image of the flange to be drilled includes the following steps: Grayscale processing is performed on the flange image to be drilled, and graphic detection is performed on the flange image to be drilled after grayscale processing to obtain the wide side of the flange image to be drilled, and half of the number of edge points of the wide side is used as a filtering threshold. In response to the curvature of each edge point of any connected domain in the flange image to be drilled being greater than the filtering threshold, filtering is performed; According to the distribution of edge points in each connected domain after filtering, outliers in each connected domain are obtained, abnormal edge points in the connected domain are obtained according to the outliers, and the abnormal edge points are filtered out to obtain significant edge points.

2. A high-precision positioning method for metal processing drilling according to claim 1, characterized in that: The method of fitting a circle to the connected domain comprises the steps of: According to the vectors of the pixel points on both sides of each significant edge point in the connected domain, the curvature of the significant edge point is calculated, a circular arc curve is fitted according to the curvature, the mean value of the curvature of each significant edge point is calculated, the mean value is used as the curvature of the circular arc curve, and the center coordinates of the circular arc curve are obtained, wherein each connected domain corresponds to a circular arc curve, and each circular arc curve corresponds to a center coordinate; Any connected domain is taken as the target connected domain, and the difference value between the center coordinates of the target connected domain and the center coordinates of other connected domains is calculated. The average of the difference values ​​is taken as the difference value of the target connected domain to obtain a difference value sequence. A similar arc curve is selected from the difference value sequence to fit a circle, and the circle is extended to the radius of the arc curve.

3. A high-precision positioning method for metal processing drilling according to claim 2, characterized in that: The difference value also includes the following relationship: ; In the formula, Indicates The difference value of the center coordinates of the circle in the connected domain corresponding to the significant edge points is Indicates that except The total number of other connected domains in the connected domain corresponding to the significant edge points, Indicates The horizontal coordinates of the center coordinates of the connected domain of significant edge points, Indicates The ordinate of the center coordinate of the connected region of the significant edge points, Indicates that except The other salient edge points outside the connected domain The horizontal coordinates of the center coordinates of the connected domain corresponding to the significant edge points, Indicates that except The other salient edge points outside the connected domain The ordinate of the center coordinate of the connected domain corresponding to the significant edge point, represents the inverse tangent function, Indicates the diagonal length of the flange image to be drilled.

4. A high-precision positioning method for metal processing drilling according to claim 1, characterized in that: The significant distance value satisfies the following relationship: ; In the formula, Indicates the number of holes in the flange image to be drilled. The feature vector corresponding to the feature point is the same as the feature point in the template image. The significant distance value between the feature vectors corresponding to the feature points, Indicates the feature points in the image of the drilled flange and feature points in the template image The distance weight value, Indicates the number of holes in the flange image to be drilled. feature points feature vectors, Indicates the first feature points feature vectors, express and The absolute value of the difference.

5. A high-precision positioning method for metal processing drilling according to claim 1, characterized in that: The method of obtaining the feature point matching result, determining the flange position, and performing high-precision hole positioning on the flange includes: The image of the flange to be drilled is matched with the marked template image to determine the position of the flange to be drilled, and the flange drilling position in the marked template image is mapped with the image of the flange to be drilled to obtain the precise positioning of the flange drilling.

Citation Information

Patent Citations

  • Workpiece drilling positioning method based on machine vision

    CN117011373A

  • Packaging machine defective product detection method based on machine vision

    CN115272341A

  • Robot error calibration method based on binocular vision measurement

    CN116619350A

  • Drilling multi-dimensional feature accurate recognition method based on machine vision

    CN117522794A

  • Metal machining drilling high-precision positioning method

    CN117911501A