Search

CN-121705972-B - Method for detecting and quantifying surface contour line concave-convex abnormality of workpiece

CN121705972BCN 121705972 BCN121705972 BCN 121705972BCN-121705972-B

Abstract

The invention discloses a method for detecting and quantifying the surface contour line concave-convex abnormality of a workpiece, and belongs to the technical field of precise measurement. The method comprises the following steps of S1, data acquisition, S2, parameter setting, S3, iterative abnormal section identification, S4, abnormal section finishing and type judgment, S5, dot level and section level quantization of the finished abnormal section, S6, abnormal quantization result output and visualization, S7, workpiece surface contour qualification judgment, wherein the workpiece surface contour line concave-convex abnormal detection and quantization method is higher in adaptability to complex structures of free curved surfaces and nonstandard parts, detection precision and efficiency are remarkably improved, precision and noise immunity are remarkably superior to those of a traditional threshold method and a template matching method, an industrial field complex environment is adapted, and development requirements of intelligent manufacturing on multi-scene coverage, high-precision quantization, high-efficiency response and flexible adaptation of a detection technology are met.

Inventors

  • ZHANG ZHEN
  • Niu Jiake
  • WANG KAI
  • GAO TIANYU
  • QIU GANG
  • YANG HAOQING
  • Guo jinzhou

Assignees

  • 中国机械总院集团江苏分院有限公司

Dates

Publication Date
20260508
Application Date
20260212

Claims (20)

  1. 1. The method for detecting and quantifying the concave-convex abnormality of the contour line of the surface of the workpiece is characterized by comprising the following steps: s1, data acquisition, namely scanning the surface of a workpiece along a preset path to acquire two-dimensional coordinate data of a plurality of surface contour lines; S2, setting parameters, wherein the parameters comprise the number of control points, the number of interpolation points, the size of a sliding window, a window fitting straight line included angle threshold, a Z value approach threshold, a Jaccard similarity coefficient threshold, the maximum iteration times and a false abnormal section length threshold of B spline curve fitting; S3, iterative abnormal segment identification, namely, performing multi-round iterative detection on a single contour line, identifying an abnormal segment, judging the starting point and the end point of the abnormal segment, obtaining the length of the abnormal segment according to the two-dimensional coordinates corresponding to the starting point and the two-dimensional coordinates corresponding to the end point provided by the S1, judging the authenticity of the abnormal segment according to the length of the abnormal segment, dynamically updating Jaccard similarity coefficients in each round of iteration, and taking the last round of identification result as an initial abnormal segment after the iteration is completed; s4, carrying out the fine trimming and type judgment of the abnormal section, namely extracting the initial abnormal section, and judging the concave-convex attribute; s5, quantifying the abnormal segments, namely analyzing and counting each continuous abnormal segment after finishing to generate a quantified result, and assigning a unique number for each abnormal segment; S6, outputting and visualizing the quantized result, namely comprehensively processing multiple contour lines, repeating the steps S2-S5 on all the contour lines obtained in the step S1, and summarizing the concave-convex abnormal quantized result of all the contour lines; s7, judging whether the surface profile of the workpiece is qualified or not according to the quantification result of the step S6 and a preset qualification threshold.
  2. 2. The method for detecting and quantifying surface contour line irregularities of a workpiece according to claim 1, wherein the two-dimensional coordinate data in step S1 comprises a sequence of x and z coordinates, wherein x is position information in a line direction and z is a height measurement value.
  3. 3. The method for detecting and quantifying the surface contour line concave-convex anomaly of a workpiece according to claim 1, wherein the parameters of the number of control points and the parameters of the number of interpolation points in the step S2 are set by a scaling factor method; the value range of the control point scaling factor is 0.01-0.05, or one scanning contour line is arbitrarily selected for carrying out parameter sensitivity analysis experiments, and the control point scaling factor corresponding to the maximum F1 score is used as the detection parameter of all contour lines; The value range of the interpolation point proportionality coefficient is 0.5-2.0, or one scanning contour line is arbitrarily selected for carrying out parameter sensitivity analysis experiments, and the interpolation point proportionality coefficient with the minimum value is taken as the detection parameter of all contour lines on the premise of not influencing the F1 score.
  4. 4. The method for detecting and quantifying the surface contour line concave-convex anomaly of a workpiece according to claim 1, wherein in step S2, a sliding window size W is defined, and an included angle of a fitting straight line of adjacent windows is θ, and a parameter θ 0 of the included angle threshold satisfies the formula: Wherein n is the total number of sliding windows minus 1, and the included angle threshold value allows manual fine adjustment within the range of +/-10% of the initial value; The parameter setting method of the sliding window size comprises the steps of randomly selecting a contour line with typical concave-convex abnormal characteristics, manually marking concave-convex abnormal sections and abnormal point indexes of the contour line to form a truth value label, wherein the sliding window size W is changed within a range of 30-60 or an adaptive range is selected according to the total number of data points, executing a complete detection process on each W value, calculating a corresponding F1 score by combining an included angle threshold value, and finally selecting the W value with the maximum F1 score as a global unified window size.
  5. 5. The method for detecting and quantifying a surface profile anomaly of a workpiece according to claim 4, wherein the maximum window size is preferentially selected if the maximum value of the F1 score corresponds to a plurality of window sizes.
  6. 6. The method for detecting and quantifying the surface contour line concave-convex abnormality of a workpiece according to claim 1, wherein in the step S2, the parameter value range of the Z value near the threshold value is [0.05,0.1], the parameter value range of the Jaccard similarity coefficient threshold value is [0.9,1], and the maximum iteration number is greater than 3; The parameter setting method of the false abnormal section length threshold value is that 3 contour lines are selected, pre-identification is carried out according to the window size W of the sliding window, the maximum length of the abnormal section which is confirmed to be noise by manual rechecking is counted as the threshold value, and fine adjustment can be carried out according to the actual detection effect.
  7. 7. The method for detecting and quantifying the surface profile irregularities of a workpiece according to claim 6, wherein the parameter of the Z value approaching a threshold is 0.05mm, the parameter of the Jaccard similarity coefficient threshold is 0.95, and the maximum number of iterations is in the range of [5,10].
  8. 8. The method for detecting and quantifying the surface profile irregularities of a workpiece according to claim 1, wherein said step S3 comprises the sub-steps of: s31, carrying out iterative initialization, setting an initial value of iterative rounds as 1, initializing an abnormal mark array, and setting the initial value as 'non-abnormal'; S32.B spline fitting and interpolator construction; S33, traversing a sliding window to identify an abnormal section, wherein the identification mode comprises an abnormal section external identification mode, an abnormal section internal identification mode and a false abnormal section identification mode, the abnormal section external identification mode judges an abnormal section starting point through an included angle threshold value, and the abnormal section internal identification mode judges an abnormal section ending point through a Z value approaching threshold value; S34, judging whether iteration is ended or not.
  9. 9. The method for detecting and quantifying the surface contour line concave-convex anomaly of a workpiece according to claim 8, wherein the method for constructing the B-spline fitting and interpolation device in step S32 comprises the steps of: if the iteration is the 1 st round, fitting 3 times of non-uniform B spline curves by adopting all contour line data points; if the iteration is not the 1 st round, fitting a 3 times non-uniform B spline curve by adopting a normal data point after the abnormal mark points of the previous round are removed, generating high-density sampling points based on the fitting result, and constructing a linear interpolator to output a height predicted value corresponding to any abscissa.
  10. 10. The method for detecting and quantifying surface profile irregularities of a workpiece according to claim 8, wherein the step S33 of identifying the pattern of external abnormal section is performed by scanning the surface profile along a sliding window size W in a point-by-point manner in an area outside the abnormal section The w data points in the window are subjected to least square fitting of a straight line, w is the size of the window of the sliding window, the slope change rate of the fitting straight line is used as a local curvature agent index, and the calculation formula is as follows: Wherein 、 Respectively the nth and nth A least squares fit straight line slope of 1 sliding window, if Continuing to slide the window if The position is marked as an abnormal section starting point q, and the abnormal section internal identification mode is switched.
  11. 11. The method for detecting and quantifying surface profile relief anomalies in a workpiece according to claim 10, wherein the defining window has n data points within the window And the slope analysis expression of the fitting straight line is as follows: Wherein: is the mean value of the horizontal coordinate, Mean value of ordinate and mean deviation of abscissa Mean deviation of ordinate of 。
  12. 12. The method for detecting and quantifying surface profile irregularities of a workpiece according to claim 10, wherein the method for identifying the pattern of the intra-anomaly detection in step 33 is characterized by defining a corresponding current sliding window as the window of the anomaly I is the index of the left end point of the window, i+w-1 is the index of the right end point of the window, and the actual height value of the right end point of the window The interpolator predicts the height value for the right end point of the window Then the relationship is satisfied: ; When (when) Z value approaches the threshold value, then The sliding window continues to move; When (when) And if the Z value is less than or equal to the threshold value, marking the position as an abnormal section end point e.
  13. 13. The method for detecting and quantifying a surface profile roughness anomaly of a workpiece as claimed in claim 12, wherein the false anomaly detection mode in step 33 is characterized by defining the anomaly length to be C, then ; When C < the false abnormal section length threshold, resetting the abnormal section as a normal section; and when C is more than or equal to the length threshold value of the false abnormal section, judging the abnormal section as a real abnormal section, replacing the height values of all points in the section by adopting the predicted value of the interpolator, and then switching to an abnormal section external identification mode.
  14. 14. The method for detecting and quantifying surface contour line asperity anomalies of a workpiece according to claim 8, wherein the iterative termination determination logic in S34 is: If the iteration is the iteration of the 1 st round, the iteration round is added with 1, and the step S32 is returned, if the iteration is the iteration of the 1 st round, the Jaccard similarity coefficient of the anomaly marking array of the current round and the previous round is calculated; when the Jaccard similarity coefficient is larger than the Jaccard similarity coefficient threshold, ending iteration, and taking the current round anomaly identification result as an initial anomaly segment; When the Jaccard similarity coefficient is smaller than or equal to the Jaccard similarity coefficient threshold, and the iteration round does not exceed the maximum iteration times, adding 1 to the iteration round, updating the abnormal mark array to be the current round result, and returning to the step S32; And when the iteration turns reach the maximum iteration times, terminating the iteration, and taking the last turn of recognition result as an initial abnormal section.
  15. 15. The method for detecting and quantifying surface profile irregularities of a workpiece according to claim 14, wherein the analytical expression of Jaccard similarity coefficients in step S34 is set to be the first The abnormal segment set obtained by the round B spline fitting is First, the The abnormal segment set obtained by the round B spline fitting is Then: jaccard similarity coefficient , Wherein: Representing the number of intersection elements of set A and set B; representing the number of union elements of set a and set B.
  16. 16. The method for detecting and quantifying the surface profile irregularities of a workpiece according to claim 1, wherein said step S4 comprises the sub-steps of: s41, extracting continuous abnormal subareas in the initial abnormal section, namely traversing an abnormal mark array, dividing continuous abnormal points into subareas, and recording a start index and an end index of each subarea; S42, counting actual height values of each point in the segment of each continuous abnormal subarea And interpolator predictors The relative positions of the lower points, the upper points and the equal points are obtained, the number of the lower points is more than or equal to that of the upper points, and the lower points are judged to be concave abnormity, otherwise, the lower points are judged to be convex abnormity, and the equal points do not participate in type judgment; S43, refining the abnormal subareas.
  17. 17. The method for detecting and quantifying surface contour line asperity anomalies of a workpiece according to claim 16, wherein the determining criteria for the distribution characteristics in the step 42 are: If it is The equal points are obtained; If it is Then the upper point; If it is The lower point.
  18. 18. The method for detecting and quantifying the surface profile irregularities of a workpiece according to claim 16, wherein the finishing method in step 43 comprises: if the abnormal section is a concave abnormal section, eliminating the point above the predicted value, and reserving the point below and the equal point; if the abnormal segment is a convex abnormal segment, eliminating points below the predicted value, and reserving the upper points and the equal points; if the fine trimming is split into a plurality of continuous subareas, only the subareas with the longest length are reserved; If the number of consecutive sub-regions is 0, the outlier is directly discarded.
  19. 19. The method for detecting and quantifying surface profile irregularities of a workpiece according to claim 1, wherein the quantification result in step S5 comprises an actual height value of each of the points of irregularities And interpolator predictors The difference of (1), the starting abscissa of the abnormal section, the ending abscissa of the abnormal section, the length of the abnormal section, the type of each abnormal section, the total number of abnormal points and the abscissa of each abnormal point, the actual height measurement value and the reference model prediction value.
  20. 20. The method for detecting and quantifying the concave-convex abnormality of the contour line of the surface of the workpiece according to claim 1, wherein the specific logic for judging the qualification in the step S7 is to judge the contour of the surface of the workpiece to be qualified when the absolute values of the maximum height differences of the continuous abnormal sections after all the contour lines are refined are smaller than a preset height difference qualification threshold value and the lengths of all the abnormal sections are smaller than a preset length qualification threshold value, or else to judge the contour to be unqualified and to output the detail of the unqualified items.

Description

Method for detecting and quantifying surface contour line concave-convex abnormality of workpiece Technical Field The invention relates to the technical field of precision measurement, in particular to a method for detecting and quantifying the concave-convex abnormality of a workpiece surface contour line. Background The detection of the concave-convex abnormality of the surface contour line of a workpiece is used as a key link of precision manufacture and quality control, the requirements on the surface appearance precision are more strict in the fields of aerospace, semiconductor manufacture, medical equipment, optical element processing and the like, and the market provides comprehensive requirements of full-size adaptation, high precision identification, strong anti-interference and no reference compatibility. The prior detection technology has the prominent technical shortboards that (1) the size and the contour suitability are poor, most schemes are designed only aiming at specific sizes or simple contours, and are difficult to simultaneously consider parts with large, medium and small different sizes, the adaptability to complex structures such as free curved surfaces, nonstandard parts and the like is poor, the flexibility of transformation detection is poor, (2) the precision and the noise immunity are difficult to realize balance, the optical method is easy to be interfered by high-roughness surface noise, the high-precision detection technology cannot adapt to the complex environment of an industrial field due to severe environmental requirements, the detection efficiency and the quantization capability are limited, the detection time of the contact method is long, the response speed of part of the non-contact scheme is low, and most technologies can only qualitatively judge defects, and are difficult to accurately output key quantization indexes such as depth and length, and the like. In view of these short boards, it is difficult for the current detection technology to meet the development requirements of intelligent manufacturing on "multi-scene coverage, high-precision quantization, high-efficiency response, and flexible adaptation" proposed by the detection technology. Disclosure of Invention The invention aims to solve the technical problems that: in order to solve the technical problems of poor multi-dimensional adaptability, difficult collaborative optimization of precision and noise resistance, weak quantization capability, detection failure in a non-reference scene and the like in the prior detection technology, the invention provides a workpiece surface contour line concave-convex anomaly detection and quantization method, which realizes the accurate detection, type distinction and comprehensive quantization of concave-convex anomalies through accurate parameter setting, B-spline fitting in rounds, sliding window recognition logic with 'inside/outside abnormal section' differentiation, false abnormal section filtering and Jaccard similarity coefficient iteration termination judgment. The technical scheme adopted for solving the technical problems is that the method for detecting and quantifying the concave-convex abnormality of the contour line of the surface of the workpiece comprises the following steps: s1, data acquisition, namely scanning the surface of a workpiece along a preset path by using a line laser scanner to acquire two-dimensional coordinate data of a plurality of surface contour lines, wherein the two-dimensional coordinate data comprise x and z coordinate sequences, x is position information in the line direction, and z is a height measurement value; S2, setting parameters, wherein the parameters comprise the number of control points, the number of interpolation points, the size of a sliding window, a window fitting straight line included angle threshold, a Z value approach threshold, a Jaccard similarity coefficient threshold, the maximum iteration times and a false abnormal section length threshold of B spline curve fitting; S3, performing multi-round iterative detection on a single contour line, wherein the iterative abnormal segment identification comprises the following steps of: S31, carrying out iterative initialization, setting an initial value of iterative rounds as 1, and initializing an abnormal mark array (the initial is all non-abnormal); S32.B spline fitting and interpolator construction; S33, traversing a sliding window to identify an abnormal section, wherein the identification mode comprises an abnormal section external identification mode, an abnormal section internal identification mode and a false abnormal section identification mode, the abnormal section external identification mode judges an abnormal section starting point through an included angle threshold value, and the abnormal section internal identification mode judges an abnormal section ending point through a Z value approaching threshold value; S34, judging iteration termination, namely