Hole parameter measurement and identification method based on laser scanning
By introducing laser scanning technology and deep learning recognition methods into the hole parameter measurement, combined with hierarchical differential filtering and method vector correction, the existing hole parameter measurement methods are solved, and high-precision and high-efficiency hole parameter measurement are achieved.
Patent Information
- Application Number
- CN202510085475.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-05-13
AI Technical Summary
The existing pore parameter measurement methods have problems such as low measurement efficiency, sensitivity to environmental and material characteristics, and low measurement accuracy. Especially in the field of aviation manufacturing, accurate measurement of pore parameters is relatively high.
The hole parameter measurement and recognition method based on laser scanning is adopted, and hole parameters are obtained through hierarchical differential filtering algorithm, deep learning network model identification hole area, central random search method filtering out interference, contour line circle fitting, and method vector correction is performed.
It improves the accuracy and efficiency of pore parameter measurement, is suitable for measurement under different environmental conditions, especially on the surface of strong reflective materials, which can accurately obtain hole characteristic data, improving the stability and accuracy of the measurement results.
Smart Images

Figure CN119992198A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of aviation manufacturing, and in particular to a hole parameter measurement and identification method based on laser scanning. Background Art
[0002] In the field of aerospace manufacturing, various types of holes are common processing objects. Various types of large composite skins and aircraft engine silencer structures all need to be made with holes, and the connection between these skins and the skeleton is mainly rivets and bolts. Since there may be errors or deviations between the hole positions of manual and machine holes and the theoretical hole positions on the part model, the parameters of the holes need to be measured, especially the precision and accuracy of the measurement of fine holes.
[0003] The low quality of holes in the machining process usually makes it difficult to assemble other parts or even scrap the parts. At the same time, for aviation manufacturing parts, any small error may lead to local stress concentration, resulting in fatigue and damage of parts, which may cause serious aviation accidents. Therefore, accurate measurement and evaluation of hole parameters in aviation manufacturing parts is of great significance to the production of qualified products.
[0004] Nowadays, hole parameter measurement mainly includes two types of measurement methods: contact and non-contact.
[0005] Contact measurement is mainly based on probe measurement, which has the characteristics of high measurement accuracy, but the measurement process is time-consuming. Non-contact measurement has high measurement efficiency. Under the premise of reasonable algorithm design, the accuracy of parameter measurement will not be reduced, and it can often meet engineering requirements.
[0006] Nowadays, the most common measurement method based on visual images in non-contact measurement is to use Hough transform to identify and measure hole parameters. The steps of Hough hole recognition mainly include graying of the image captured by the camera, filtering processing with different strategies, binarization processing based on thresholds or specific methods, setting the number of points on the circle and the radius threshold to achieve circle recognition and measurement. Based on the recognized result area, the hole parameters are further measured and calculated. Since this recognition method needs to set different thresholds, it has poor adaptability to different scenes. At the same time, since the grayscale corresponding to the area around the hole position in the image is different from the grayscale value of the hole in the image, it is usually difficult to obtain the ideal hole area. Especially for materials with smooth surfaces such as composite materials and metal alloy materials in the aviation field, reflection problems are more likely to occur. It is difficult to achieve accurate imaging of hole features, resulting in low measurement accuracy and failure to meet actual needs.
[0007] Summarizing the existing hole recognition measurement methods, we can see that the main defects of probe contact measurement are low measurement efficiency, measurement results are sensitive to interference such as burrs, and the price of complete sets of equipment is expensive. The existing non-contact measurement technology represented by machine vision technology is greatly affected by the environment, imaging quality, and material properties.
[0008] Therefore, in order to improve the accuracy of hole parameter measurement and improve the shortcomings of existing methods and approaches, this scheme attempts to introduce laser scanning measurement technology into the measurement of hole parameters to achieve the goal of high-quality processing and manufacturing. Summary of the invention
[0009] The present invention aims to solve the deficiencies of hole parameter measurement methods in the prior art, proposes a hole parameter measurement and identification method based on laser scanning, introduces laser scanning measurement technology into the measurement of hole parameters, improves the accuracy of hole parameter measurement, and achieves the purpose of high-quality processing and manufacturing.
[0010] In order to achieve the above-mentioned object of the invention, the technical solution of the present invention is as follows:
[0011] A method for measuring and identifying hole parameters based on laser scanning comprises the following steps:
[0012] Step a, using laser scanning to obtain the distance characteristic parameters of the hole in the area to be identified of the part, and obtaining the surface scanning data of the part;
[0013] Step b, using a hierarchical difference filtering algorithm to reduce noise on the part surface scanning data;
[0014] Step c, performing three-channel spatial mapping on the scanned data after noise reduction processing to obtain the original data image of the hole surface scan;
[0015] Step d: recognizing each hole area in the original data image of the hole surface scan based on the deep learning network model;
[0016] Step e: Use the center random search method to filter out the local interference in the hole area, and then filter out the burr interference of the hole boundary area protruding and extending;
[0017] Step f, obtaining hole parameters by combining the measurement method of contour line circle fitting, performing hole mouth normal vector plane fitting, and then correcting the obtained hole parameters based on the normal vector correction strategy;
[0018] Step g, identifying, measuring and correcting the hole parameters contained in all hole areas to obtain the hole parameters of the complete image;
[0019] Step h: reverse mapping the recognition results of the hole parameters to realize the display of the global recognition strategy results.
[0020] Furthermore, the use of a hierarchical difference filtering algorithm to reduce noise on the part surface scanning data includes:
[0021] Step b1: Calculate ∑T data (x, y) / sum(p) value, and get the result Av(T); where Tdata(x, y) represents the laser scanning data of the part surface; (x, y) represents the coordinates of each scanning point, p represents the scanning point, and sum() represents the sum of the scanning points;
[0022] Step b2, for each scan value point in the part surface scan data, count the number of effective difference values N, perform equal-spaced sampling and truncation processing on N, and the number of truncation is n;
[0023] Step b3: Get the number of valid difference values I within the unit cutoff number N (n);
[0024] Step b4: Scan the values of all scan points according to I N (n) Perform statistics, that is, get each I N (n) The number of scanned numerical points contained in the corresponding numerical area;
[0025] Step b5, calculate the average ave(n) of all the scan values of the points where the scan values fall within the n regions; determine the difference between the value ave(n) corresponding to each of the n regions and Av(T), and calculate the absolute value to obtain n difference values;
[0026] Step b6, sort the n difference values, find the area where the largest value is located, and the scan data points it contains;
[0027] Step b7, background transformation processing is performed on the data in the corresponding data point, and the number Np(x,y) corresponding to the transformed scanning point is determined, and the ratio ratio (times) of the number of valid points corresponding to the number before the transformation processing is calculated;
[0028] Step b8: After the processing is completed, filtering and noise reduction processing is performed again based on the same principle until each level difference corresponds to ratio(times)≤α, where α is a real number in the range of (0,1).
[0029] Further, step c specifically includes: processing all data points of the noise-reduced data based on the designed numerical mapping mode to obtain the specific RGB value corresponding to each point; and then performing image display processing on the calculated value to obtain the laser scanning raw data image image0; the designed numerical mapping mode is:
[0030] T data(x,y)=Transform(T data (x,y)
[0031] Hundreds → R = T data (x,y) / K(bit)
[0032] Tens → G = T data (x,y) % K(bit) / K(bit)
[0033] Units → B = T data (x,y)%K(bit)%K(bit) / K(bit)
[0034] Num(R,G,B)∈[min-v,max-v]
[0035] Among them, T data (x, y) represents a value at any point; K (bit) represents the corresponding single-channel data information; / represents rounding calculation; % represents remainder calculation; Num (R, G, B) represents a number represented by R as hundreds, G as tens, and B as ones, and its range does not exceed the value range [min-v, max-v]; Transform (T data (x,y)) represents the pair T data (x, y) is subjected to numerical transformation processing, so that the processed numerical value is transformed into an image after being mapped and the color and the scanning depth value have a corresponding relationship;
[0036] Furthermore, in step d, the recognition of each hole area in the original data image of the hole surface scan based on the deep learning network model includes: taking each independent complete hole area as the annotation object, annotating it with a rectangular frame, and the annotated rectangular frame hole and the corresponding hole have the characteristic of being surrounded by a minimum circumscribed rectangle; training the recognition network based on the training samples, initializing the detection network with the parameters obtained by the training, and detecting and identifying whether there are holes in the original laser scanning image, specifically including:
[0037] The corresponding recognition result in each detected image is represented as result(i,pro,p0,p1); where i represents the number of holes, represented by a positive integer; pro represents the corresponding probability value determined by the recognition network; p0 represents the coordinate value of the upper left corner of the recognition result box, and p1 represents the coordinate value of the lower right corner of the recognition result box;
[0038] According to the actual project, the threshold t-pro is set, and only the results with pro≥t-pro in result are retained. The coordinate values in the retained results are transformed: the X value corresponding to p0 is reduced to one NUM-c of the original length, and the Y value corresponding to p0 is reduced to one NUM-r of the original width; the X value corresponding to p1 is increased to one NUM-c of the original length; the Y value corresponding to p1 is increased to one NUM-r of the original width; where NUM-c represents the X value corresponding to p0, and NUM-r represents the Y value corresponding to p0;
[0039] Finally, the corresponding result after transformation is cropped to obtain the cropped result image image1.
[0040] Furthermore, the central random search method is used to filter out the local interference falling in the hole area, which specifically includes the following steps:
[0041] With the geometric center of the cropped result image image1 as the center, draw a circle with the designed radii of r1, r2, and r3, and r1, r2, and r3 are all less than 2 / 3 of the theoretical radius of the hole to be measured;
[0042] The R, G, B values and corresponding extreme values of all points on the circumference of the drawn circle are counted by using the distance between adjacent L pixels, and a set of extreme value data with the smallest difference is found, and its values are used as the lower and upper boundaries of the area where the hole is located;
[0043] Draw a circle again with the geometric center of the image as the center and the unit pixel deviation. The radius of the circle increases from 1 until the radius is equal to half of the length or width of the image for the first time. Calculate the circumference value corresponding to each radius, and the ratio (ratio(h)) of the minimum and maximum values of the R, G, and B values. h represents the corresponding circle.
[0044] If the corresponding ratio is ≥ 0.5, the R, G, and B values of all points on the corresponding curve are transformed into the corresponding R, G, and B mean values on the circle with a radius of r1, r2, or r3; the result image image2 is obtained after processing based on the above steps, and the outward and inward burr interference of the hole boundary area is filtered out on this basis.
[0045] Furthermore, the filtering of the outward and inward burr interference of the hole boundary area includes: using the grayscale tolerance similarity area judgment method to binarize the result image image2, constructing pattern factors in 6 directions of 0°, 45°, and 90°, removing burr-type interference based on the pattern factors, and obtaining mask2.
[0046] Furthermore, the measurement method combining contour line circle fitting to obtain hole parameters comprises the following steps:
[0047] The mask2 obtained by filtering out the outward and inward burr interference of the hole boundary area is multiplied with each channel of image2 respectively, and the result of each point multiplication is reassigned to the image2 at the same position to obtain the image2 after the noise reduction again;
[0048] Based on image image2, image2 is divided into regions with the minimum distance from the geometric center position to the rightmost and bottommost straight lines of the image as the radius R, and the region outside R is regarded as an invalid region, thus obtaining image image3;
[0049] Extract three images of red, green and blue channels from image3 respectively, and select the image that is more conducive to analysis based on the designed evaluation strategy;
[0050] Calculate the global average gradient value grad of the three images, take the image with the larger grad value as the feature image, and implement the image binarization processing based on the threshold to obtain image image4;
[0051] For image image4, the gradient values of each pixel in the X-axis and Y-axis directions are calculated respectively, and then the arithmetic square root of the sum of the squares of the two gradient values is calculated to obtain the fused gradient value of each pixel;
[0052] Set the fusion gradient screening threshold, retain the points that meet the threshold, and use the nearest neighbor principle to connect all the points on the contour to obtain the contour image;
[0053] The arc segment circle is fitted based on the points on the contour after threshold processing to obtain the equation of the circle;
[0054] The hole center coordinates and hole radius values corresponding to the hole area are determined according to the obtained equation.
[0055] Furthermore, the aperture normal vector plane fitting comprises the following steps:
[0056] The effective area in the image image3 is segmented again based on the hole area contour feature curve, the points contained in the area within the hole area contour feature curve feature in image3 are not processed, and the area below the curve feature is the segmentation effective feature point area;
[0057] The coordinate values of all points contained in the segmented effective feature point area in the image image3 and the grayscale values of their corresponding pixel positions are extracted, and the aperture normal plane is fitted based on the extracted values to obtain the direction vector β perpendicular to the plane.
[0058] Furthermore, the hole parameters acquired by correcting the normal vector correction strategy include:
[0059] Calculate the angle between the vector β and the vector γ perpendicular to the screen direction, and record the angle as aV;
[0060] Calculate the virtual straight line LV, which satisfies the property of being coplanar with the vector β and L V The common plane with vector β is PV;
[0061] Move the PV surface parallel to the center area C where the PV via area outline is located;
[0062] The hole area contour composed of points Pc(x,y) is symmetrically segmented based on the moving plane PV;
[0063] The point Pc(x,y) is restored and corrected in the x and y directions by the spatial projection transformation relationship;
[0064] Based on the correction result, the parameters of the circle where the hole is located are calculated again.
[0065] In summary, the present invention has the following advantages:
[0066] 1. The present invention is a non-contact hole parameter measurement method that is not affected by lighting. It can obtain hole parameter characteristics based on laser scanning alone under different environmental conditions, which is conducive to the acquisition of hole characteristic data on the surface of highly reflective materials and provides a guiding reference method for laser measurement of other types of characteristics;
[0067] 2. The method proposed in the present invention significantly improves the efficiency and speed of hole parameter measurement, which is suitable for group holes and rapid measurement scenarios;
[0068] 3. Compared with non-contact measurement represented by vision, the method proposed in the present invention has significantly improved the stability and accuracy of the measurement results because it does not require strict hole surface lighting requirements, and shows a more stable hole parameter measurement capability under complex environmental conditions;
[0069] 4. The method proposed in the present invention includes a multi-step noise and interference removal method and a surface normal vector correction strategy. Compared with the measurement method directly based on contour line circle fitting, the accuracy of the measurement result radius is closer to the true value, showing a better high-precision measurement capability. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 The main steps of a hole parameter measurement and identification method based on laser scanning are as follows;
[0071] Figure 2 is the image image0 obtained based on the laser scanning data;
[0072] Figure 3 The obtained cropping result image image1 is the number k;
[0073] Figure 4 It is a schematic diagram of the area in image3;
[0074] Figure 5 Schematic diagram of the relationship between β, γ and the included angle. DETAILED DESCRIPTION
[0075] In order to explain the present invention more clearly, the present invention is further described below in conjunction with preferred embodiments and drawings. It should be understood by those skilled in the art that the content described below is illustrative rather than restrictive, and should not be used to limit the scope of protection of the present invention.
[0076] The present invention provides a method for measuring and identifying hole parameters based on laser scanning, such as Figure 1 As shown, the following steps are included:
[0077] Step 1: Use a laser sensor to scan the surface of the part to obtain scanning data.
[0078] In this step, the laser sensor is used to scan the distance feature data of the hole on the measurement part in the area to be identified at a constant speed. The relative movement speed between the sensor and the measurement part is strictly controlled to remain unchanged during the entire scanning process. The laser scanning data of the part surface obtained by scanning is recorded as T data (x,y).
[0079] Step 2: Use hierarchical difference filtering algorithm to reduce noise.
[0080] In this embodiment, the steps of the hierarchical difference filtering algorithm include:
[0081] Calculate ∑T data (x,y) / sum(p) value, and get the result Av(T); where (x,y) represents the coordinates of each scanning point, p represents the scanning point, and sum() represents the sum of the scanning points;
[0082] Each point of data T data (x, y) performs statistical analysis of the number of valid difference values N;
[0083] Perform equal-interval sampling and truncation on N, with the number of truncation being n; obtain the number of valid difference values within the unit truncation number I N (n), N / n, that is, adjacent I N (n) has the characteristic of equal interval number;
[0084] Set all scan points to scan values according to I N (n) Perform statistics, that is, get each I N (n) The number of scanned numerical points contained in the corresponding numerical area, Numb(n);
[0085] The average ave(n) of the scan values of all points falling in the n regions is calculated; the difference between the value ave(n) corresponding to each of the n regions and Av(T) is determined, and the absolute value is calculated to obtain n difference values div(n);
[0086] Sort the n difference values div(n) and find the area where the largest value max(div(n)) is located and the scan value point T it contains data (x,y);
[0087] The data in the corresponding data point is subjected to background transformation processing, that is, the value corresponding to the non-part area obtained by the scanning sensor is consistent;
[0088] At the same time, determine the number Np(x,y) of the transformed scan points, and calculate the ratio ratio(times) of the number of valid points corresponding to the number before the transformation.
[0089] After the processing is completed, based on the same principle, filtering and noise reduction processing is performed again, and the processing is performed times times until each level difference corresponds to ratio(times)≤α, and α is a real number in the range of (0,1).
[0090] Step 3: Perform three-channel spatial mapping on the scanned data after filtering and noise reduction to obtain the laser scanning raw data image.
[0091] In the three-channel spatial mapping, the number of bits corresponding to each space is 8 bits, and the corresponding number is represented in binary, that is, each point can represent 2^8 data information, and the data point representation corresponding to the three channels can reach 2^24. Based on the positive integer with a bit number of 3 (corresponding to RGB, that is, R corresponds to the hundreds, G corresponds to the tens, and B corresponds to the ones, and each bit has 2^8 data information), all the scan point values are quantized, and the value range obtained after noise reduction processing is [min-v, max-v]. Then for any point value T data The (x,y) mapping is:
[0092] T data (x,y)=Transform(T data (x,y)
[0093] Hundreds → R = T data (x,y) / K(bit)
[0094] Tens → G = T data (x,y) % K(bit) / K(bit)
[0095] Units → B = T data(x,y)%K(bit)%K(bit) / K(bit)
[0096] Num(R,G,B)∈[min-v,max-v]
[0097] Among them, K (bit) represents the corresponding single-channel data information, which can be represented by 2^8; / represents rounding calculation; % represents remainder calculation; Num (R, G, B) represents a number represented by R as hundreds, G as tens, and B as ones, and its range does not exceed the scan value range [min-v, max-v]; Transform (T data (x,y)) represents the pair T data (x, y) is numerically transformed in the following way: based on the median value min-v+(max-v-min-v) / 2 in the numerical range [min-v, max-v], the numerical values are interchanged symmetrically, so that the processed numerical values are mapped and transformed to form an image with a corresponding relationship between the color and the scanning depth value, that is, the deeper the area, the larger the corresponding scanning value, and the corresponding image color is also darker.
[0098] Based on the numerical mapping mode designed above, all data points are processed to obtain the specific RGB value corresponding to each data point, and the calculated value is processed into an image to obtain the laser scanning raw data image image0, as shown in Figure 2 shown.
[0099] Step 4: Based on the deep learning detection network model, the recognition of each hole area in the laser scanning raw data image is realized.
[0100] In this step, the training samples of the deep learning detection network model are labeled in the following way: each independent complete hole area is used as the labeling object, and a rectangular frame is used for labeling. The labeled rectangular frame hole and the corresponding hole have the characteristic of being surrounded by a minimum circumscribed rectangle (that is, the edge of the labeling frame processes the boundary position of the hole, and if the frame area is reduced, the edge of the frame enters the hole, otherwise it is outside the hole).
[0101] The recognition network is trained based on the training samples, the detection network is initialized with the parameters obtained by the training, and the holes in the series of laser scanning images image0 are detected and identified.
[0102] During implementation, the recognition result corresponding to each image in the test is represented by result(i,pro,p0,p1), where i represents the number of holes, represented by a positive integer; pro represents the probability value corresponding to the recognition network judgment; p0 represents the coordinate value of the upper left corner of the recognition result box, and p1 represents the coordinate value corresponding to the lower right corner of the recognition result box. Then, the recognition result result(i,pro,p0,p1) is screened and the transformation processing of the result features is completed:
[0103] In specific implementation, the threshold t-pro is set in combination with the actual project, and only the results of pro≥t-pro in result are retained; the coordinate values in the retained results are transformed, and the X value corresponding to p0 is reduced to one NUM-c of the length of image0; the Y value corresponding to p0 is reduced to one NUM-r of the width of image0; the X value corresponding to p1 is increased to one NUM-c of the length of image0; the Y value corresponding to p1 is increased to one NUM-r of the width of image0, where NUM-c represents the X value corresponding to p0, and NUM-r represents the Y value corresponding to p0. Then, based on the corresponding result after the transformation, the data result-p(k,pro,p0,p1) is obtained, and the image image0 is cropped based on the corresponding data in result-p, and the cropped result image image1 with a number of k is obtained, as shown in Figure 3 shown.
[0104] Step 5: Use the center random search method to filter out local interference falling in the hole area.
[0105] First, take the geometric center of the image (i.e., the point corresponding to half of the row and column of image1) as the center of the circle, design the radii r1, r2, and r3 to draw a circle, and r1, r2, and r3 are all less than 2 / 3 of the theoretical radius of the hole to be measured; use the distance between adjacent L pixels to count the R, G, and B values and the corresponding extreme values max and min corresponding to all points on the circumference of the circle with radii r1, r2, and r3, and obtain the extreme values max1, min1, max2, min2, max3, and min3; compare max1, max2, max3 with min1, min2, and min3 respectively; find a set of data with the smallest difference between min and max1. x value; the corresponding values are used as the lower and upper boundaries of the hole area; again, a circle is drawn with the geometric center of the image as the center and the unit pixel deviation, and the radius of the circle increases from 1 until the radius is equal to half of the length or width of image1 for the first time; the circumference value corresponding to each radius is calculated, and the ratio ratio (h) of its R, G, B values and the corresponding values of ∈[min, max], where h represents the corresponding circle; if the ratio ratio (h) of the corresponding values is ≥ 0.5, it means that the probability that the circle of the corresponding radius belongs to the hole area is high, and the R, G, B values of all points on the corresponding curve are transformed into the corresponding R, G, B mean values on the circle with radius r1, r2 or r3. Based on the above steps, the result image image2 is obtained.
[0106] Then, filter out the outward and inward burr interference in the hole boundary area:
[0107] The image2 is binarized using the grayscale tolerance similarity region judgment method, and the pattern factors in 6 directions of 0°, 45°, and 90° are constructed. The burr-like interference is removed based on the pattern factors to obtain mask2. The grayscale corresponding to the hole area in mask2 is represented by 0, and the rest of the area is represented by 1. The obtained mask2 is multiplied with each channel of image2, and the result of each point multiplication is reassigned to the image2 at the same position to obtain the image2 after denoising again.
[0108] Step 6: Obtain hole parameters by combining the contour circle fitting measurement method, perform hole mouth normal vector plane fitting, and then correct the obtained hole parameters based on the normal vector correction strategy.
[0109] In this step, the hole parameters are obtained by combining the measurement method of contour line circle fitting, including:
[0110] Based on the image image2, the minimum distance from the geometric center to the rightmost and bottommost straight line of the image is the radius R, and the area outside R is regarded as an invalid area. The obtained image is represented by image3, as shown in Figure 4 As shown;
[0111] Extract three images img-r, img-g, and img-b of the red, green, and blue channels from image3, respectively. Based on the designed evaluation strategy, select the image that is more conducive to analysis. The optimization method is to complete the feature calculation based on the following formula:
[0112]
[0113] Among them, cols and rows represent the number of columns and rows of the image respectively; grad represents the calculated global average gradient value; and Respectively represent the rate of change of the gradient of the pixel in the horizontal and vertical directions;
[0114] The average performance of the pixel difference in the image reflects the image clarity, texture, high-frequency characteristics and other characteristics. Generally, for an image, the larger the grad, the better the image quality. Compare the results calculated in the three images, take the image corresponding to the larger grad value as the feature image, and implement the image binarization processing based on the threshold to obtain image4;
[0115] The gradient values of image4 in the X-axis and Y-axis directions are calculated respectively. The gradient values are calculated by the first-order difference method, and then the arithmetic square root of the sum of the squares of the two values is calculated to obtain the fused gradient value C. gra ;
[0116] Calculate the fused gradient value C for each pixel (x, y) gra (x,y), and then set the fusion gradient screening threshold threshold c Points smaller than the gradient threshold are removed, and points greater than or equal to the threshold are retained. The contour image can be obtained by connecting all points Pc(x,y) on the contour using the nearest neighbor principle;
[0117] Based on the points on the contour that have been processed by threshold, the arc segment circle is fitted, and the equation of the circle is: R 2 =(x a) 2 +(yb) 2 , the circle equation parameters R, a, b need to be further calculated, the formula is:
[0118] R 2 =x 2 +a 2 -2xa+y 2 +b 2 -2xb;
[0119] Further let: A = -2a, B = -2b, C = a 2 +b2 -R 2 , the equation of the circle can be rearranged as: 2 +y 2 +Ax+By+C=0; where (a,b) are the coordinates of the center of the circle. Solving the values of A, B, and C will give the equation of the circle. All the points on the line segment form the point set (ai,bi) on the circle. The size of i represents the number of points on the line segment. The mathematical model is expressed as: 2 =di 2 -R 2 =xi 2 +yi 2 +Axi+Byi+C.
[0120] Based on the above steps, the equation of the circle is obtained. According to the equation, the hole center coordinates Center (x, y) and the radius value Rc corresponding to the hole area can be determined. Since the entire scanned plane may be a curved surface, the radius value needs to be corrected. Even if the corresponding hole center coordinates are curved, their corresponding values will not affect the hole center results and do not need to be corrected.
[0121] In this step, the aperture normal vector plane fitting is performed, including:
[0122] Determine the boundary between the valid area and the invalid area from the image3 according to the corresponding R value, remove the invalid area in the image3 according to the boundary value, and the area within the boundary is regarded as the valid area. At the same time, based on the nearest neighbor original in the above steps, the effective area in the image3 is segmented again. The segmentation method is: the points contained in the area within the hole area contour feature curve in the image3 are not processed, and the area below the curve feature is the segmentation effective feature point area.
[0123] Extract all the point coordinate values (x, y) contained in the area of image3 and the grayscale values of their corresponding pixel positions, and perform aperture normal plane fitting based on the extracted values. The corresponding fitting methods are:
[0124] (1) Assume that the plane equation of area satisfies the equation Ax+By+Cz+D=0, where C is not equal to 0. Further, z can be expressed as z=-(A / C)x-(B / C)yD / C;
[0125] (2) a represents -(A / C), b represents -(B / C), and c represents -D / C. Further transformation z can be expressed as z=ax+by+c;
[0126] (3) The x and y corresponding to the area in image3 are taken as the x and y on the plane, and the original data T at the corresponding position dataThe corresponding depth value obtained in (x, y) is recorded as z. According to the area, several points on the plane can be obtained and recorded as (xi, yi, zi). i represents the number of pixels that meet the relationship used to fit the equation of the plane.
[0127] (4) Let the equation be F = ∑(ax+by+cz)^2. To minimize F, the partial derivative of a with respect to F is equal to 0, the partial derivative of b with respect to F is equal to 0, and the partial derivative of c with respect to F is equal to 0.
[0128] (5) The equation of the plane can be obtained by calculating a, b, and c based on the partial derivatives respectively; (6) From the plane equation and based on the characteristics of the straight line perpendicular to the plane, the direction vector β perpendicular to the plane is calculated.
[0129] In this step, the acquired hole parameters are corrected based on the normal vector correction strategy, including:
[0130] Based on the deviation of the angle, the hole radius value Rc is corrected by calculating the angle between the vector β and the vector γ perpendicular to the screen direction, such as Figure 5 As shown, the angle is recorded as aV; calculate the virtual straight line LV, which satisfies the property of being coplanar with the vector β, and the common plane where LV and the vector β are located is PV; move the PV plane parallel to the central area C where the PV passes through the hole area contour; based on the moving plane PV, the hole area contour composed of the points Pc (x, y) is symmetrically divided; the point Pc (x, y) is restored and corrected in the x and y directions according to the spatial projection transformation relationship; based on the correction result, the parameters of the circle where the hole is located are calculated again.
[0131] Step 8: Identify, measure and correct the hole parameters contained in each identified independent area to obtain the hole parameters contained in the complete image. Each identification result is fused to obtain the parameters of all holes.
[0132] Step 9: De-map the result value to display the global recognition strategy results.
[0133] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification or equivalent change made to the above embodiment based on the technical essence of the present invention shall fall within the protection scope of the present invention.
Claims
1. A method for measuring and identifying hole parameters based on laser scanning, characterized in that: The steps include: Step a, using laser scanning to obtain the distance characteristic parameters of the hole in the area to be identified of the part, and obtaining the surface scanning data of the part; Step b, using a hierarchical difference filtering algorithm to reduce noise on the part surface scanning data; Step c, performing three-channel spatial mapping on the scanned data after noise reduction processing to obtain the original data image of the hole surface scan; Step d: recognizing each hole area in the original data image of the hole surface scan based on the deep learning network model; Step e: Use the center random search method to filter out the local interference falling in the hole area; Step f, obtaining hole parameters by combining the measurement method of contour line circle fitting, performing hole mouth normal vector plane fitting, and then correcting the obtained hole parameters based on the normal vector correction strategy; Step g, identifying, measuring and correcting the hole parameters contained in all hole areas to obtain the hole parameters of the complete image; Step h: reverse mapping the recognition results of the hole parameters to realize the display of the global recognition strategy results.
2. A method for measuring and identifying hole parameters based on laser scanning as claimed in claim 1, characterized in that: The method of using a hierarchical difference filtering algorithm to reduce noise on the surface scanning data of a part includes: Step b1: Calculate ∑T data (x, y) / sum(p) value, and get the result Av(T); where Tdata(x, y) represents the laser scanning data of the part surface; (x, y) represents the coordinates of each scanning point, p represents the scanning point, and sum() represents the sum of the scanning points; Step b2, for each scan value point in the part surface scan data, count the number of effective difference values N, perform equal-spaced sampling and truncation processing on N, and the number of truncation is n; Step b3: Get the number of valid difference values I within the unit cutoff number N (n); Step b4: Scan the values of all scan points according to I N (n) Perform statistics, that is, get each I N (n) The number of scanned numerical points contained in the corresponding numerical area; Step b5, calculate the average ave(n) of all the scan values of the points where the scan values fall within the n regions; determine the difference between the value ave(n) corresponding to each of the n regions and Av(T), and calculate the absolute value to obtain n difference values; Step b6, sort the n difference values, find the area where the largest value is located, and the scan data points it contains; Step b7, performing background transformation processing on the data in the corresponding data point, determining the number of the transformed scanning points, and calculating the ratio (times) of the number of valid points corresponding to the number before the transformation processing; Step b8: After the processing is completed, filtering and noise reduction processing is performed again based on the same principle until each level difference corresponds to ratio(times)≤α, where α is a real number in the range of (0,1).
3. The hole parameter measurement and identification method based on laser scanning according to claim 1, characterized in that: Step c specifically includes: processing all data points of the noise-reduced data based on the designed numerical mapping mode to obtain the specific RGB value corresponding to each point; then performing image display processing on the calculated value to obtain the laser scanning raw data image image0; the designed numerical mapping mode is: T data (x,y)=Transform(T data (x,y)) Hundreds → R = T data (x,y) / K(bit) Tens → G = T data (x,y) % K(bit) / K(bit) Units → B = T data (x,y)%K(bit)%K(bit) / K(bit) Num(R,G,B)∈[min-v,max-v] Among them, T data (x, y) represents a value at any point; K (bit) represents the corresponding single-channel data information; / represents rounding calculation; % represents remainder calculation; Num (R, G, B) represents a number represented by R as hundreds, G as tens, and B as ones, and its range does not exceed the value range [min-v, max-v]; Transform (T data (x,y)) represents the pair T data (x, y) is transformed so that the processed values are transformed into images and the colors and scanning depth values have a corresponding relationship.
4. The hole parameter measurement and identification method based on laser scanning according to claim 1, characterized in that: In step d, the recognition of each hole area in the original data image of the hole surface scan is realized based on the deep learning network model, including: taking each independent complete hole area as the annotation object, annotating it with a rectangular frame, and the annotated rectangular frame hole and the corresponding hole have the characteristic of being surrounded by the minimum circumscribed rectangle; training the recognition network based on the training samples, initializing the detection network with the parameters obtained by the training, and detecting and identifying whether there are holes in the original laser scanning image, specifically including: The corresponding recognition result in each detected image is represented as result(i,pro,p0,p1); where i represents the number of holes, represented by a positive integer; pro represents the corresponding probability value determined by the recognition network; p0 represents the coordinate value of the upper left corner of the recognition result box, and p1 represents the coordinate value of the lower right corner of the recognition result box; According to the actual project, the threshold t-pro is set, and only the results with pro≥t-pro in result are retained. The coordinate values in the retained results are transformed: the X value corresponding to p0 is reduced to one NUM-c of the original length, and the Y value corresponding to p0 is reduced to one NUM-r of the original width; the X value corresponding to p1 is increased to one NUM-c of the original length; the Y value corresponding to p1 is increased to one NUM-r of the original width; where NUM-c represents the X value corresponding to p0, and NUM-r represents the Y value corresponding to p0; Finally, the corresponding result after transformation is cropped to obtain the cropped result image image1.
5. The method for hole parameter measurement and identification based on laser scanning according to claim 1, characterized in that: The method of using the center random search method to filter out local interference falling in the hole area includes: With the geometric center of the cropped result image image1 as the center, draw a circle with the designed radii of r1, r2, and r3, and r1, r2, and r3 are all less than 2 / 3 of the theoretical radius of the hole to be measured; The R, G, B values and corresponding extreme values of all points on the circumference of the drawn circle are counted by using the distance between adjacent L pixels, and a set of extreme value data with the smallest difference is found, and its values are used as the lower and upper boundaries of the area where the hole is located; Draw a circle again with the geometric center of the image as the center and the unit pixel deviation. The radius of the circle increases from 1 until the radius is equal to half of the length or width of the image for the first time. Calculate the circumference value corresponding to each radius, and the ratio (ratio(h)) of the minimum and maximum values of the R, G, and B values. h represents the corresponding circle. If the corresponding ratio is ≥ 0.5, the R, G, and B values of all points on the corresponding curve are transformed into the corresponding R, G, and B mean values on the circle with a radius of r1, r2, or r3; the result image image2 is obtained after processing based on the above steps, and the outward and inward burr interference of the hole boundary area is filtered out on this basis.
6. A method for measuring and identifying hole parameters based on laser scanning as claimed in claim 5, characterized in that: The filtering of the outward and inward burr interference in the hole boundary area includes: using the grayscale tolerance similarity area judgment method to binarize the result image image2, constructing pattern factors in 6 directions of 0°, 45°, and 90°, removing burr-type interference based on the pattern factors, and obtaining mask2.
7. A method for measuring and identifying hole parameters based on laser scanning as claimed in claim 6, characterized in that: The method of obtaining hole parameters by combining the measurement method of contour line circle fitting includes the following steps: The mask2 obtained by filtering out the outward and inward burr interference of the hole boundary area is multiplied with each channel of image2 respectively, and the result of each point multiplication is reassigned to the image2 at the same position to obtain the image2 after the noise reduction again; Based on image image2, image2 is divided into regions with the minimum distance from the geometric center position to the rightmost and bottommost straight lines of the image as the radius R, and the region outside R is regarded as an invalid region, thus obtaining image image3; Extract three images of red, green and blue channels from image3 respectively, and select the image that is more conducive to analysis based on the designed evaluation strategy; Calculate the global average gradient value grad of the three images, take the image with the larger grad value as the feature image, and implement the image binarization processing based on the threshold to obtain image image4; For image image4, the gradient values of each pixel in the X-axis and Y-axis directions are calculated respectively, and then the arithmetic square root of the sum of the squares of the two gradient values is calculated to obtain the fused gradient value of each pixel; Set the fusion gradient screening threshold, retain the points that meet the threshold, and use the nearest neighbor principle to connect all the points on the contour to obtain the contour image; The arc segment circle is fitted based on the points on the contour after threshold processing to obtain the equation of the circle; The hole center coordinates and hole radius values corresponding to the hole area are determined according to the obtained equation.
8. The method for measuring and identifying hole parameters based on laser scanning according to claim 7, characterized in that: The aperture normal vector plane fitting described comprises the following steps: The effective area in the image image3 is segmented again based on the hole area contour feature curve, the points contained in the area within the hole area contour feature curve feature in image3 are not processed, and the area below the curve feature is the segmentation effective feature point area; The coordinate values of all points contained in the segmented effective feature point area in the image image3 and the grayscale values of their corresponding pixel positions are extracted, and the aperture normal plane is fitted based on the extracted values to obtain the direction vector β perpendicular to the plane.
9. The hole parameter measurement and identification method based on laser scanning according to claim 8, characterized in that: The hole parameters obtained by correcting the normal vector correction strategy include: Calculate the angle between the vector β and the vector γ perpendicular to the screen direction, and record the angle as aV; Calculate the virtual straight line LV, which satisfies the property of being coplanar with the vector β and L V The common plane with vector β is PV; Move the PV surface parallel to the center area C where the PV via area outline is located; The hole area contour composed of points Pc(x,y) is symmetrically segmented based on the moving plane PV; The point Pc(x,y) is restored and corrected in the x and y directions by the spatial projection transformation relationship; Based on the correction result, the parameters of the circle where the hole is located are calculated again.
Citation Information
Cited By
Method, device and equipment for measuring appearance of composite material product and medium
CN120577823A