Contour stripe extraction method of line laser stripe image for thin-walled complex curved surface components
By extracting contoured light bars from the linear laser light bar images of thin-walled complex curved surface components, the problem of eliminating abnormal areas in the point cloud is solved, and a fast, accurate and low-cost processing effect is achieved.
Patent Information
- Application Number
- CN202411698172.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-26
AI Technical Summary
The prior art is difficult to eliminate the problem of measuring abnormal areas in point clouds in a universal, fast and low-cost way.
A contour strip extraction method for laser light strip images of thin-walled complex curved surface components is proposed. By positioning the key column position, extracting the center of the light strip, calculating local extreme values, determining the search starting point and direction, dividing the search area, and using the sliding window method to search and extract the contour strips.
It realizes rapid, batch and accurate removal of outliers, ensures the quality of the measured point cloud, reduces computer performance requirements, and is suitable for the geometric characteristics of different thin-walled complex curved surface components.
Smart Images

Figure CN119205886B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image data processing. Background Art
[0002] Thin-walled complex curved surface components are widely used in high-end transportation equipment in the fields of aviation, aerospace, and navigation. With the growing demand for high-end transportation equipment, it is urgent to study the fast and accurate measurement technology of thin-walled complex curved surface components to achieve flexible and efficient industrial manufacturing. Line laser scanner is a flexible and efficient non-contact profile sensor that can obtain the measurement point cloud of thin-walled complex curved surface components, providing a strong boost for the manufacturing process control, manufacturing quality evaluation, and service status maintenance of thin-walled complex curved surface components.
[0003] Affected by factors such as the measurement accuracy of the measuring equipment, the structure of the component itself, and the external environment, the measurement point cloud of thin-walled complex curved surface components obtained by line laser scanners inevitably has outliers (sparse measurement points that deviate from the main body of the measurement point cloud), which greatly reduces the quality of the measurement point cloud and affects the measurement accuracy. For such outliers, there are currently many methods to eliminate them. However, in the manufacturing site measurement task of a certain model of thin-walled complex curved surface components of an aircraft engine, we found that the measurement point cloud obtained by the line laser scanner had a new problem: the outliers in the measurement point cloud are not the conventional sparse measurement points that deviate from the main body of the measurement point cloud, but a large number of continuous measurement points that deviate from the main body of the measurement point cloud, and the spatial distribution and neighborhood relationship of these continuous measurement points are extremely similar to those of the contour points, especially when the contour points are missing. For the convenience of subsequent description, we define the area where these continuous measurement points that deviate from the main body of the measurement point cloud are located as the abnormal area.
[0004] Regarding the processing of the measurement point cloud with the above-mentioned abnormal area, since the essence of the abnormal area is an outlier, those skilled in the art usually think of using an outlier removal method to process it. Traditional outlier removal methods mainly include statistical-based methods, radius-based methods, and clustering-based methods. These methods mainly judge outliers based on point-to-point distance or neighborhood relationship, and are only applicable to the removal of sparse measurement points that deviate from the main body of the measurement point cloud. However, since the measurement points in the abnormal area are extremely similar to the contour point features, the traditional outlier removal method is difficult to process the above-mentioned abnormal area. The Chinese invention patent with application number 202410675454.2 discloses a method for processing online measurement point clouds in the manufacturing process of thin-walled complex curved surface components. The outliers, missing and noise problems of the measurement point cloud can be processed simultaneously through a non-rigid registration strategy of first local and then global. If the method disclosed in the invention patent is used to process the measurement point cloud with the above-mentioned abnormal area, the abnormal area can be theoretically removed from the measurement point cloud, but it has been verified that the processing results of the abnormal area by this method are unstable. Moreover, since this method requires multiple uses of non-rigid registration, it must rely on high-performance computers to quickly remove abnormal areas, which is costly.
[0005] In addition, those skilled in the art may also think of using the point cloud segmentation method to segment the measurement points in the abnormal area from the measurement point cloud, in order to realize the processing of the measurement point cloud with the above-mentioned abnormal area. A deep learning-based outlier segmentation method is proposed in the Chinese invention patent application with application number 202310577670.9. By extracting the local fine features of the point cloud through a hierarchical network architecture and multi-scale grouping, the accurate segmentation of outliers can be achieved. If the outlier segmentation method disclosed in the patent application is borrowed, in theory, the measurement points in the above-mentioned abnormal area can be accurately segmented from the measurement point cloud. However, this deep learning method relies on effective training data and label data, and in the field of thin-walled complex curved surface component manufacturing, the acquisition and storage conditions of training data and label data are extremely harsh, and the acquisition is time-consuming and labor-intensive. Therefore, the implementation cost of using this method to process abnormal areas is very high. At the same time, different thin-walled complex curved surface components have different geometric characteristics, which challenges the generalization ability of the deep learning method.
[0006] There is currently another method for processing measurement point clouds with the above-mentioned abnormal areas, which is to circumvent them by adjusting the measurement angle of view. However, this method is not applicable when the structure of thin-walled complex curved surface components is compact and small in size, such as high-temperature alloy sealing rings of aircraft engines. At this time, if you want to avoid the problem of abnormal areas in the measurement point cloud, you can only give up the real-time detection method of online point cloud measurement in the manufacturing process and choose to stop the machine for planing and testing of thin-walled complex curved surface components, which affects the detection efficiency.
[0007] Therefore, how to process the measurement point cloud with the above-mentioned abnormal areas in a universal, fast and low-cost manner has become the key to realizing line laser measurement of thin-walled complex curved surface components. Summary of the invention
[0008] In order to solve the problem that the existing point cloud processing methods and methods for adjusting the measurement viewing angle are difficult to remove abnormal areas in the measurement point cloud of thin-walled complex curved surface components in a universal, fast and low-cost manner, the present invention proposes a contour light strip extraction method for the line laser light strip image of thin-walled complex curved surface components. The contour light strip extraction of the present invention is different from the conventional light strip extraction in the field. The conventional light strip extraction in the field refers to the extraction of the light strip center, while the present invention extracts the entire contour light strip containing all the measuring points of the contour, and obtains the contour light strip without abnormal areas. Then, the measurement point cloud extracted from the contour light strip without abnormal areas does not contain abnormal values, thereby realizing the rapid, batch and accurate removal of abnormal values.
[0009] The technical solution of the present invention is:
[0010] The method for extracting contour light stripes from a line laser light stripe image of a thin-walled complex curved surface component is special in that the method for extracting contour light stripes is applicable to a line laser light stripe image without contour light strip missing, and comprises the following steps:
[0011] Step 1: Locate the key column position of the line laser light strip image;
[0012] On the line laser light strip image, locate the first key column position y E1 , the second key column position y E2 and the third key column position y E3 , the first key column position y E1 and the second key column position y E2 They are the columns where the light bar starts and ends, respectively. The third key column position y E3 The column where the maximum grayscale value of the light bar is located or the first key column position y E1 and the second key column position y E2 The middle column of
[0013] Step 2: extract the light stripe center of the line laser light stripe image;
[0014] Step 3: Calculate the local extreme value of the center of the light strip;
[0015] Step 4: Determine the search starting point of the contour light bar;
[0016] In the local extreme value of the center of the light bar, select the distance y from the third key column position E3 The nearest pixel point is used as the search starting point of the contour light bar, denoted as S start = (x m, y n );
[0017] Step 5: Determine the search direction of the contour light strip;
[0018] Will point from the search starting point to the first key column position y E1 direction, from the search starting point to the second key column position y E2 The direction of the first search direction y n y E1 and the second search direction y n y E2 ;
[0019] Step 6: Determine the search area of the contour light strip;
[0020] Set the first key column position y E1 The column position y where the search starting point is n The area between the second key column position y E2 The column position y where the search starting point is n The area between is determined as the first search area and the second search area respectively;
[0021] Step 7: Search and extract the contour light strip in the search area;
[0022] Step 7.1 Search for the pixel with the maximum gray value in each column;
[0023] Along the first search direction y n y E1 , starting from the search starting point, use the sliding window method to search column by column in the first search area to obtain the pixel with the maximum gray value in each column in the first search area;
[0024] Along the second search direction y n y E2 , starting from the search starting point, use the sliding window method to search column by column in the second search area to obtain the pixel with the maximum gray value in each column in the second search area;
[0025] During the column-by-column search, the sliding search window initially used is centered at the search starting point and extends upward and downward by R n The remaining sliding search windows are respectively expanded upward and downward by R with the pixel with the maximum gray value in each column as the center. n The size of all sliding search windows in the column direction is greater than or equal to the maximum width of the contour light bar and less than the minimum distance between the contour light bar and the abnormal light bar;
[0026] Step 7.2 search and extract the contour light strip;
[0027] The search starting point and the pixel with the maximum gray value in each column obtained in step 7.1 are used as the contour extraction pixel points. Each contour extraction pixel point is used as the center, and the pixels are expanded upward and downward by R n The extraction range of the contour light strip is obtained, and all pixel points within the extraction range are searched and extracted to obtain the contour light strip;
[0028] Step 8: Output the contour light strip obtained in step 7.
[0029] Further, in step 1: the first key column position y E1 and the second key column position y E2 Determined by the maximum between-class variance method.
[0030] Furthermore, in step 2: the center of the light stripe is extracted from the line laser light stripe image using a grayscale centroid method, an extreme value method, a Steger method or a threshold method.
[0031] The present invention also provides a method for extracting contour light stripes from a line laser light stripe image of a thin-walled complex curved surface component, the special feature of which is that the method for extracting contour light stripes is applicable to a line laser light stripe image with missing contour light stripes, and comprises the following steps:
[0032] Step 1: Locate the key column position of the line laser light strip image;
[0033] On the line laser light strip image, locate the first key column position y E1 , the second key column position y E2 and the third key column position y E3 , the first key column position y E1 and the second key column position y E2 They are the columns where the light bar starts and ends, respectively. The third key column position y E3 The column where the maximum grayscale value of the light bar is located or the first key column position y E1 and the second key column position y E2 The middle column of
[0034] Step 2: extract the light stripe center of the line laser light stripe image;
[0035] Step 3: Calculate the local extreme value of the center of the light strip;
[0036] Step 4: Determine the search starting point of the contour light bar;
[0037] In the local extreme value of the center of the light bar, select the distance y from the third key column position E3 The nearest pixel point is used as the search starting point of the contour light bar, denoted as S start= (x m , y n );
[0038] Step 5: Determine the search direction of the contour light strip;
[0039] Will point from the search starting point to the first key column position y E1 direction, from the search starting point to the second key column position y E2 The direction of the first search direction y n y E1 and the second search direction y n y E2 ;
[0040] Step 6: Determine the search area of the contour light strip;
[0041] The local extrema at the center of the light bar, the local extrema located on the left and right of the search starting point are respectively recorded as the first local extrema S 1_z1 =(x extreme1_z1 , y extreme1_z1 ) and the second local extremum S 1_z2 =(x extreme1_z2 ,y extreme1_z2 ), z1 and z2 are the indices of the first local extremum and the second local extremum respectively, z1=0,…,t1, z2=0,…,t2;
[0042] The column position y of the first local extreme value extreme1_z1 The column position y where the search starting point is n with the first key column position y E1 The area between is divided into several search areas along the first search direction y n y E1 They are denoted as the first search area, ..., the Cth search area; C = t1+2;
[0043] The column position y of the second local extreme value extreme1_z2 The column position y where the search starting point is n with the second key column position y E2 The area between is divided into several search areas, along the second search direction y n y E2 They are recorded as the C+1th search area, ..., the C+Dth search area; D = t2+2;
[0044] Step 7: Search and extract the contour light strip in the search area;
[0045] Step 7.1 Search for the pixel with the maximum gray value in each column;
[0046] Along the first search direction y n y E1 , starting from the search starting point, sequentially in the first search area, ..., the Cth search area, based on the direction of the contour light strip, a sliding window method is used to search column by column to obtain the pixel point with the maximum gray value in each column in the first search area, ..., the Cth search area;
[0047] Along the second search direction y n y E2 , starting from the search starting point, in the C+1th search area, ..., C+Dth search area, based on the direction of the contour light strip, a sliding window method is used to search column by column to obtain the pixel point with the maximum gray value in each column in the C+1th search area, ..., C+Dth search area;
[0048] During the column-by-column search, the sliding search window initially used is extended upward / downward 2R from the search starting point as the endpoint n The remaining sliding search windows are expanded upward / downward by 2R with the maximum grayscale pixel of each column as the endpoint. n The size of all sliding search windows in the column direction is greater than or equal to the maximum width of the contour light bar and less than the minimum distance between the contour light bar and the abnormal light bar;
[0049] Step 7.2 search and extract the contour light strip;
[0050] The search starting point and the pixel with the maximum gray value in each column obtained in step 7.1 are used as the contour extraction pixel points. Each contour extraction pixel point is used as the endpoint, and the contour light strip is extended upward / downward by 2R based on the direction of the contour light strip. n The extraction range of the contour light strip is obtained, and all pixel points within the extraction range are searched and extracted to obtain the contour light strip;
[0051] Step 8: Output the contour light strip obtained in step 7.
[0052] Further, in step 1: the first key column position y E1 and the second key column position y E2 Determined by the maximum between-class variance method.
[0053] Furthermore, in step 2: the center of the light stripe is extracted from the line laser light stripe image using a grayscale centroid method, an extreme value method, a Steger method or a threshold method.
[0054] Furthermore, in step 7.1, 2R is determined n The method for row expansion direction is:
[0055] In the first search area and the C+1 search area, based on the relative position relationship between the local extreme value of the corresponding light bar center and the search starting point, determine the direction of the contour light bar in the current search area. If the contour light bar is moving upward, expand upward by 2R n If the outline light strip is moving downward, extend it downward by 2R. n OK;
[0056] Along the first search direction y n y E1 In the second search area, ..., the Cth search area, based on the relative position relationship between two adjacent first local extrema, the direction of the contour light strip in the current search area is determined. If the contour light strip is upward, the contour light strip is extended upward by 2R n If the contour is going downward, extend downward by 2R n OK;
[0057] Along the second search direction y n y E2 In the C+2 search area, ..., C+D search area, based on the relative position relationship between two adjacent second local extrema, the direction of the contour light bar in the current search area is determined. If the contour light bar is upward, the direction is extended upward by 2R n If the contour is going downward, extend downward by 2R n OK;
[0058] In step 7.2:
[0059] If the outline light strip is pointing upward, it will extend upward by 2R. n If the outline light strip is moving downward, it will extend downward by 2R. n OK.
[0060] The present invention also provides another method for extracting contour light stripes from a line laser light stripe image of a thin-walled complex curved surface component, which is special in that the method is applicable to a line laser light stripe image with missing contour light stripes, and comprises the following steps:
[0061] Step 1: Locate the key column position of the line laser light strip image;
[0062] On the line laser light strip image, locate the first key column position y E1 , the second key column position y E2 and the third key column position y E3 , the first key column position y E1 and the second key column position y E2 They are the columns where the light bar starts and ends, respectively. The third key column position y E3The column where the maximum grayscale value of the light bar is located or the first key column position y E1 and the second key column position y E2 The middle column of
[0063] Step 2: extract the light stripe center of the line laser light stripe image;
[0064] Step 3: Calculate the local extreme value of the center of the light strip;
[0065] Step 4: Determine the search starting point of the contour light bar;
[0066] In the local extreme value of the center of the light bar, select the distance y from the third key column position E3 The nearest pixel point is used as the search starting point of the contour light bar, denoted as S start = (x m , y n );
[0067] Step 5: Determine the search direction of the contour light strip;
[0068] Will point from the search starting point to the first key column position y E1 direction, from the search starting point to the second key column position y E2 The direction of the first search direction y n y E1 and the second search direction y n y E2 ;
[0069] Step 6: Determine the search area of the contour light strip;
[0070] The local extrema at the center of the light bar, the local extrema located on the left and right of the search starting point are respectively recorded as the first local extrema S 1_z1 =(x extreme1_z1 , y extreme1_z1 ) and the second local extremum S 1_z2 =(x extreme1_z2 ,y extreme1_z2 ), z1 and z2 are the indices of the first local extremum and the second local extremum respectively, z1=0,…,t1, z2=0,…,t2;
[0071] The column position y of the first local extreme value extreme1_z1 The column position y where the search starting point is n with the first key column position y E1 The area between is divided into several search areas along the first search direction y n y E1They are denoted as the first search area, ..., the Cth search area; C = t1+2;
[0072] The column position y of the second local extreme value extreme1_z2 The column position y where the search starting point is n with the second key column position y E2 The area between is divided into several search areas, along the second search direction y n y E2 They are recorded as the C+1th search area, ..., the C+Dth search area; D = t2+2;
[0073] Step 7: Search and extract the contour light strip in the search area;
[0074] Step 7.1 Search for the pixel with the maximum gray value in each column;
[0075] Along the first search direction y n y E1 , starting from the search starting point, sequentially in the first search area, ..., the Cth search area, based on the direction of the contour light strip, a sliding window method is used to search column by column to obtain the pixel point with the maximum gray value in each column in the first search area, ..., the Cth search area;
[0076] Along the second search direction y n y E2 , starting from the search starting point, in the C+1th search area, ..., C+Dth search area, based on the direction of the contour light strip, a sliding window method is used to search column by column to obtain the pixel point with the maximum gray value in each column in the C+1th search area, ..., C+Dth search area;
[0077] During the column-by-column search, the sliding search window initially used is extended upward / downward 2R from the search starting point as the endpoint n The remaining sliding search windows are expanded upward / downward by 2R with the maximum grayscale pixel of each column as the endpoint. n The size of all sliding search windows in the column direction is greater than or equal to the maximum width of the contour light bar and less than the minimum distance between the contour light bar and the abnormal light bar;
[0078] Step 7.2 search and extract the contour light strip;
[0079] Step 7.2.1 search and extract the first contour light strip;
[0080] Along the first search direction y n y E1, take the search starting point and the pixel with the maximum gray value in each column in the first search area as the first contour extraction pixel point, and take each first contour extraction pixel point as the endpoint, and expand 2R upward / downward based on the direction of the contour light strip n The first contour light strip extraction range is obtained, and all pixel points within the first contour light strip extraction range are searched and extracted to obtain the first contour light strip;
[0081] Step 7.2.2 searches for and extracts the second contour light strip, ..., the Cth contour light strip;
[0082] Along the first search direction y n y E1 , take the pixel with the maximum gray value in each column in the second search area as the second contour extraction pixel, and use each second contour extraction pixel as the endpoint, and expand 2R upward / downward based on the direction of the contour light strip n The second contour light strip extraction range is obtained, and all pixel points within the second contour light strip extraction range are searched and extracted to obtain the second contour light strip;
[0083] Using the same method, along the first search direction y n y E1 By searching and extracting area by area, the third contour light strip, ..., the Cth contour light strip can be obtained;
[0084] Step 7.2.3 Along the second search direction y n y E2 Search and extract contour light strips area by area;
[0085] Use the same method as step 7.2.2 to search along the second direction y n y E2 By searching and extracting area by area, the C+1th contour light strip, ..., the C+Dth contour light strip can be obtained;
[0086] Step 7.3: Combine to get the outline light strip;
[0087] The Cth contour light strip, ..., the second contour light strip, the first contour light strip, the C+1th contour light strip, ..., the C+Dth contour light strip obtained in step 7.2 are sequentially spliced to obtain the final contour light strip;
[0088] Step 8: Output the final contour light strip obtained in step 7.3.
[0089] Further, in step 1: the first key column position y E1 and the second key column position y E2Determined according to the maximum inter-class variance method; in step 2: using the grayscale centroid method, extreme value method, Steger method or threshold method to extract the light stripe center from the line laser light stripe image.
[0090] Furthermore, in step 7.1, 2R is determined n The method for row expansion direction is:
[0091] In the first search area and the C+1 search area, based on the relative position relationship between the local extreme value of the corresponding light bar center and the search starting point, determine the direction of the contour light bar in the current search area. If the contour light bar is moving upward, expand upward by 2R n If the outline light strip is moving downward, extend it downward by 2R. n OK;
[0092] Along the first search direction y n y E1 In the second search area, ..., the Cth search area, based on the relative position relationship between two adjacent first local extrema, the direction of the contour light strip in the current search area is determined. If the contour light strip is upward, the contour light strip is extended upward by 2R n If the contour is going downward, extend downward by 2R n OK;
[0093] Along the second search direction y n y E2 In the C+2 search area, ..., C+D search area, based on the relative position relationship between two adjacent second local extrema, the direction of the contour light bar in the current search area is determined. If the contour light bar is upward, the direction is extended upward by 2R n If the contour is going downward, extend downward by 2R n OK;
[0094] In steps 7.2.1-7.2.3:
[0095] If the outline light strip is pointing upward, it will extend upward by 2R. n If the outline light strip is moving downward, it will extend downward by 2R. n OK.
[0096] The beneficial effects of the present invention are as follows:
[0097] 1. According to the principle of line laser measurement, the measurement point cloud is extracted from the line laser light strip image taken by the line laser scanner based on the light strip center extraction algorithm, calibration coefficient, etc. The abnormal area of the measurement point cloud corresponds to the abnormal light strip (essentially an abnormal value) in the line laser light strip image. The present invention breaks away from the conventional idea of eliminating abnormal values in the measurement point cloud, and instead starts from the line laser light strip image, extracts the contour light strips in the line laser light strip image according to the geometric characteristics of thin-walled complex curved surface components and image processing theory, realizes the segmentation of contour light strips and abnormal light strips, and extracts the measurement point cloud based on the output result of the present invention, so as to obtain a measurement point cloud without abnormal values, thereby ensuring the quality of the measurement point cloud; in terms of data processing, the point cloud data is essentially a collection of coordinate points, and the line laser light strip image is essentially a matrix with grayscale values as elements. Relatively speaking, the data structure of the line laser light strip image is simpler, so the present invention chooses to process the line laser light strip image, which can quickly realize the extraction of contour light strips in the laser light strip, thereby completing the elimination of abnormal areas at the image level. Compared with processing point cloud data, the method of the present invention is simpler, more efficient, and has lower requirements on computer performance; in addition, the present invention guides the search for contour light strips based on the common characteristics of the measured contour of thin-walled complex curved surface components, namely, the continuity of contour lines, and has more advantages in universality.
[0098] 2. Even if the technicians in this field can think of converting the problem of eliminating abnormal areas (serious outliers) of the measurement point cloud into the problem of extracting contour light stripes of the line laser light stripe image, in the field of image data processing, it is still difficult to effectively distinguish abnormal light stripes that are extremely similar to the features of contour light stripes using non-deep learning methods, so it is difficult to realize the search and extraction of contour light stripes. In response to this technical problem, the present invention innovatively proposes a strategy to guide the search for contour light stripes based on the continuity of the contour line of the measured contour of the thin-walled complex curved surface component, and formulates a strategy to first locate the first key column position, the second key column position and the search starting point of the contour light strip, and then establish the search direction and search area. In the process of searching for contour light strips area by area along the search direction, a sliding search window with a size and position that meets specific requirements is set in the image column direction to avoid searching for abnormal light strips, thereby realizing the segmentation of contour light strips and abnormal light strips, and ensuring the accurate extraction of contour light strips.
[0099] 3. Thin-walled complex curved components usually have large curvatures. The line laser light strip images acquired by the line laser scanner may have missing contour light strips in compact slope areas. The missing contour light strips will cause the contour points to be isolated, making abnormal areas more difficult to identify. In the line laser light strip image, one of the key issues is how to guide the contour light strip search based on the continuity of the contour line when the contour light strip is missing, and avoid interference from abnormal light strips. This is also the difficulty of the present invention. Although the problem of missing contour light strips cannot be avoided, there are still some weak light strips in the compact slope area, and the grayscale of these weak light strips is different from the grayscale of the background light strips. Therefore, the present invention innovatively proposes to first calculate the local extrema of the light strip center of the line laser light strip image (except the starting point and the end point of the light strip center, the remaining local extrema are located on the circular features of the measured contour), and based on the local extrema, the area between the key column position and the column where the search starting point of the contour light strip is located is divided into multiple search areas, and then under the constraint of the local extrema, the sliding window method is used to search for the contour light strip column by column in each search area, thereby realizing the search and extraction of contour light strips from the line laser light strip image with the problem of missing contour light strips.
[0100] 4. In the contour light bar search method, the present invention adopts a divide-and-conquer strategy: when there is no contour light bar missing problem, the search range direction in the sliding window method is bidirectional (that is, the sliding search window is centered on the search starting point / the pixel with the maximum gray value and extends upward and downward by R n The search direction is guided by the continuity of the contour line; when there is a problem of missing contour light strips, the search range direction in the sliding window method is unidirectional (that is, the sliding search window is extended upward / downward by 2R from the search starting point / pixel point with the maximum gray value as the endpoint). n When constructing the sliding search window, the expansion direction is constrained according to the local extreme value to avoid interference from abnormal light strips.
[0101] 5. Experimental results show that the present invention can accurately extract the contour light strips in the laser light strip images of high-temperature alloy sealing rings with different cross-sectional shapes: Figure 2 The processing speed of the laser light strip image of the high-temperature alloy sealing ring line is 0.5727s; Fig.11 The processing speed of the laser light strip image of the high-temperature alloy sealing ring line shown is 0.4644s. BRIEF DESCRIPTION OF THE DRAWINGS
[0102] Figure 1 The present invention is a flow chart of the method.
[0103] Figure 2 This is the line laser light strip image to be processed in Example 1 of the present invention.
[0104] Figure 3Pixel index description of the centerline laser light stripe image of the present invention.
[0105] Figure 4 These are the first key column position and the second key column position located in the linear laser light stripe image in Embodiment 1 of the present invention.
[0106] Figure 5 It is the light stripe center of the line laser light stripe image extracted in Example 1 of the present invention (the red line in the figure).
[0107] Figure 6 It is the search starting point of the contour light strip determined in Example 1 of the present invention.
[0108] Figure 7 These are the first search direction and the second search direction determined in Embodiment 1 of the present invention.
[0109] Figure 8 These are the first search area and the second search area determined in Embodiment 1 of the present invention.
[0110] Fig. 9 This is a schematic diagram of the search method used in Example 1 of the present invention.
[0111] Fig.10 This is the contour light strip extracted from the line laser light strip image in Example 1 of the present invention.
[0112] Fig.11 This is the line laser light strip image to be processed in Example 2 of the present invention.
[0113] Fig.12 The search starting point of the contour light strip determined in Example 2 of the present invention and the local extrema at the circular features on both sides of the search starting point (the red dot in the middle of the figure is the search starting point, and the red dots on both sides are local extrema).
[0114] Fig.13 These are the first search area, the second search area, the third search area, and the fourth search area determined in Embodiment 2 of the invention.
[0115] Fig.14 Schematic diagram of the search method used in Example 2 of the present invention Figure 1 .
[0116] Fig.15 Schematic diagram of the search method used in Example 2 of the present invention Figure 2 .
[0117] Fig.16 This is the contour light strip extracted from the line laser light strip image in Example 2 of the present invention.
[0118] Reference numerals:
[0119] 1-sliding search window 1; 2-search starting point of the contour light strip; 3-pixel point with maximum grayscale value in sliding search window 1; 4-sliding search window 2; 5-local extreme value at the circular feature. DETAILED DESCRIPTION
[0120] In the following, in combination with the accompanying drawings and embodiments, the present invention is further described by taking the processing of line laser light strip images of two W-shaped high-temperature alloy sealing rings with different cross-sections in an aircraft engine obtained by line laser measurement as an example.
[0121] Embodiment 1:
[0122] This embodiment is Figure 2 The line laser light stripe image of the W-shaped high-temperature alloy sealing ring cross section shown in the figure is used to extract the contour light stripe. The line laser light stripe image does not have the problem of missing contour light stripes. The line laser light stripe image is recorded as P={p mn =(x m , y n )},p mn represents the pixel at the mth row and nth column in the line laser light strip image, x m Represents pixel p mn The row coordinates of y, m represents the row coordinate index, m=0, …, M-1, n Represents pixel p mn The column coordinates of M, n represents the column coordinate index, n=0, …, N-1, M N represents the number of pixels in the line laser light strip image P. For the row and column coordinate index description of the pixels in the line laser light strip image P, see Figure 3 .
[0123] Reference Figure 1 , 4 -10, this embodiment specifically includes the following steps:
[0124] Step 1: Locate the key column position of the line laser light strip image;
[0125] Locate the first key column position y on the line laser light strip image P E1 , the second key column position y E2 and the third key column position y E3 ,like Figure 4 As shown. Among them, the first key column position y E1 and the second key column position y E2 are the columns where the light bar start point and light bar end point are located respectively, which can be determined according to the maximum inter-class variance method; the third key column position y E3 Determine based on the column where the gray value is the maximum (applicable to both symmetrical and asymmetrical thin-walled complex curved surface components), or solve based on the following formula (the following formula is applicable to symmetrical thin-walled complex curved surface components):
[0126] y E3 =(y E1 +y E2 ) / 2;
[0127] Among them, E1, E2, and E3 are the serial numbers of the key columns, 0 <E1<E3<E2<N-1。
[0128] Step 2: extract the light stripe center of the line laser light stripe image;
[0129] Extract the light stripe center S from the line laser light stripe image P using the grayscale centroid method, extreme value method, Steger method or threshold method light_k =(x light_k , y light_k ),like Figure 5 As shown by the red line in the figure; light_k Indicates the row coordinate of the kth pixel at the center of the light bar, y light_k represents the column coordinates of the kth pixel at the center of the light strip, k represents the index of the pixel at the center of the light strip, k=0, …, K-1, K represents the number of pixels at the center of the light strip, K M N.
[0130] Step 3: Calculate the local extremum at the center of the light strip;
[0131] Calculate the light strip center S light_k The local extreme value S extreme_z =(x extreme_z , y extreme_z ), x extreme_z The row coordinate of the local extremum representing the center of the light bar, y extreme_z represents the column coordinates of the local extrema at the center of the light bar, z represents the index of the local extrema at the center of the light bar, z=0, …, Z-1, Z represents the number of local extrema at the center of the light bar, Z K, wherein the local minimum of the light bar center is solved based on the isolocalmax function of MATLAB, and the local maximum of the light bar center is solved based on the isolocalmin function of MATLAB. The local extreme value of the light bar center described in the present invention is a local extreme value on a mathematical function, and the curve formed by the light bar center can be regarded as a function. Therefore, the local extreme value of the light bar center is essentially a pixel point.
[0132] Step 4: Determine the search starting point of the contour light bar;
[0133] The local extremum S at the center of the light strip calculated from step 3 extreme_z , select the distance from the third key column position y E3 The nearest pixel point is used as the search starting point of the contour light bar, denoted as Sstart = (x m , y n ); The search starting point of the contour light strip determined in this embodiment is a local minimum value, such as Figure 6 Indicated by the red dot.
[0134] Step 5: Determine the search direction of the contour light strip;
[0135] Search starting point S according to the contour light bar start = (x m , y n ), the first key column position y E1 with the second key column position y E2 , determine two search directions, starting from the search starting point S of the contour light bar start = (x m , y n ) points to the first key column position y E1 The direction and the search starting point S from the contour light bar start = (x m , y n ) points to the second key column position y E2 The direction of the first search direction y n y E1 , second search direction y n y E2 ,like Figure 7 shown.
[0136] Step 6: Determine the search area of the contour light strip;
[0137] In the first search direction y n y E1 On the left, change the first key column position to y E1 The column position y where the search starting point is n The area between is determined as the first search area, such as Figure 8 As shown;
[0138] In the second search direction y n y E2 On the left, change the second key column position to y E2 The column position y where the search starting point is n The area between is determined as the second search area, such as Figure 8 shown.
[0139] Step 7: Search and extract the contour light strip in the search area;
[0140] The line laser light strip image P of this embodiment has no missing contour light strips, so the sliding window method can be directly used to search for contour light strips column by column in the first search area and the second search area:
[0141] Step 7.1 Search for the pixel with the maximum gray value in each column in the first search area;
[0142] Step 7.1.1 determining a first sliding search window;
[0143] In the first search area, the search starting point S of the contour light strip is start = (x m , y n ) as the center, and expand upward and downward R n row, and obtain the first sliding search window.
[0144] Step 7.1.2 Slide to search;
[0145] In the first search area, from the search starting point S of the contour light bar start = (x m , y n ) starts, moving the first sliding search window along the first search direction y n y E1 Slide 1 column, and the first sliding search window reaches the n-1th column. In the n-1th column, find the pixel with the largest grayscale value in the first sliding search window, which is recorded as the pixel with the largest grayscale value S max_(n-1) =(x max_(n-1) , y n-1 );
[0146] Step 7.1.3 determines a second sliding search window;
[0147] In the first search area, the pixel with the maximum gray value S max_(n-1) = (x max_(n-1) , y n-1 ) as the center, and expand upward and downward R n row, and obtain the second sliding search window;
[0148] Step 7.1.4 Slide to search;
[0149] In the first search area, from the pixel with the maximum gray value S max_(n-1) = (x max_(n-1) , y n-1 ) starts, moving the second sliding search window along the first search direction y n y E1Slide 1 column, and the second sliding search window reaches the n-2th column. In the n-2th column, find the pixel with the largest grayscale value in the second sliding search window, which is recorded as the pixel with the largest grayscale value S max_(n-2) = (x max_(n-2) , y n-2 );
[0150] Step 7.1.5: determining a third sliding search window;
[0151] In the first search area, the pixel with the maximum gray value S max_(n-2) = (x max_(n-2) , y n-2 ) as the center, and expand upward and downward R n row, and obtain the third sliding search window;
[0152] Step 7.1.6 Slide to search;
[0153] In the first search area, from the pixel with the maximum gray value S max_(n-2) = (x max_(n-2) , y n-2 ), the third sliding search window is moved along the first search direction y n y E1 Slide 1 column, and the third sliding search window reaches the n-3th column. In the n-3th column, find the pixel with the largest grayscale value in the third sliding search window, which is recorded as the pixel with the largest grayscale value S max_(n-3) = (x max_(n-3) , y n-3 );
[0154] Step 7.1.7 Based on the continuity of the contour light strip, the same method as steps 7.1.1-7.1.6 is used to search column by column until the first search area is searched, and finally the maximum grayscale pixel point in each column of the first search area is obtained, which are the maximum grayscale pixel point S max_(n-1) = (x max_(n-1) , y n-1 ), the pixel with the maximum gray value S max_(n-2) = (x max_(n-2) ,y n-2 ), the pixel with the maximum gray value S max_(n-3) = (x max_(n-3) , y n-3 ),…, the pixel with the maximum gray value S max_(n-k) =(x max_(n-k) , y n-k );
[0155] Step 7.2 searches for the pixel with the maximum gray value in each column in the second search area;
[0156] Using the same method as step 7.1, in the second search area, start from the search starting point S of the contour light bar. start =(x m , y n ), slide and search column by column along the second search direction until the second search area is searched, and finally obtain the pixel point with the maximum grayscale value in each column of the second search area, which are the pixel points with the maximum grayscale value S and S respectively. max_(n+1) = (x max_(n+1) ,y n+1 ), the pixel with the maximum gray value S max_(n+2) = (x max_(n+2) , y n+2 ),…, the pixel with the maximum gray value S max_(n+h) =(x max_(n+h) , y n+h ).
[0157] In the above steps 7.1-7.2, all sliding search windows involved have the same size in the column direction. n The value of should make the size of the resulting sliding search window in the column direction greater than or equal to the maximum width of the contour light bar and less than the minimum distance between the contour light bar and the abnormal light bar, thereby ensuring that the sliding search window can search all the contour light bars and no abnormal light bars during the search.
[0158] For ease of understanding, here we will use Fig. 9 For example (R n Take 1) to further explain the above sliding window method. Fig. 9 In Figure a, the blue square is the search starting point 2 of the contour light bar, and the red dotted box is the search starting point 2 of the contour light bar, which is centered on the upward and downward extension R n The resulting sliding search window is 1; Fig. 9 Figure b shows the position of the sliding search window 1 after sliding the sliding search window 1 by 1 column along the first search direction; Fig. 9 The blue square in the red dotted box in Figure c is the pixel point 3 with the maximum gray value in the sliding search window 1; Fig. 9 The red dashed box in the figure is centered on the pixel point 3 with the maximum gray value in the sliding search window 1, and extends upward and downward by R n The obtained sliding search window is 4; Fig. 9 The red dotted box in Figure e is the position of the sliding search window 24 after sliding the sliding search window 24 along the first search direction by 1 column.
[0159] Step 7.3 search and extract the contour light strip;
[0160] Set the search starting point S of the contour light barstart = (x m , y n ) and the maximum pixel S of each gray value obtained in steps 7.1-7.2 max_(n-k) = (x max_(n-k) , y n-k ), S max_(n-k+1) = (x max_(n-k+1) , y n-k+1 ), …, S max_(n-1) =(x max_(n-1) , y n-1 ), S max_(n+1) = (x max_(n+1) , y n+1 ), …, S max_(n+h) = (x max_(n+h) , y n+h ) as the contour to extract pixel point S extract (x extract_p , y p ), p takes nk, n-k+1, ..., n, n+1, ..., n+h respectively, and searches for each contour to extract pixel point S extract (x extract_p , y p ) and the corresponding pixel point (x extract_p-Rn , y p ), (x extract_p-Rn+1 ,y p ) ,…, (x extract_p , y p ), (x extract_p+1 , y p ) ,…, (x extract_p+Rn , y p ), you can get the contour light strip S profile .
[0161] Step 8: Output the search result of the line laser light strip image;
[0162] The search contour light bar S profile Output, see Fig.10 As can be seen from the figure, the contour light strip S profile There are no abnormal light strips (abnormal areas).
[0163] Embodiment 2:
[0164] This embodiment is Fig.11 The line laser stripe image of the W-shaped high-temperature alloy sealing ring cross section shown in the figure is used to extract the contour stripe. The line laser stripe image has a local contour stripe missing problem. The line laser stripe image is recorded as P={p mn =(x m , yn )},p mn represents the pixel at the mth row and nth column in the line laser light strip image, x m Represents pixel p mn The row coordinates of y, m represents the row coordinate index, m=0, …, M-1, n Represents pixel p mn The column coordinates of M, n represents the column coordinate index, n=0, …, N-1, M N represents the number of pixels in the line laser light strip image P. For the row and column coordinate index description of the pixels in the line laser light strip image P, see Figure 3 .
[0165] Reference Figure 1 , 11 -16, this embodiment specifically includes the following steps:
[0166] Step 1: Locate the key column position of the line laser light strip image;
[0167] Locate the first key column position y on the line laser light strip image P E1 , the second key column position y E2 and the third key column position y E3 Among them, the first key column position y E1 and the second key column position y E2 are the columns where the light bar start point and light bar end point are located respectively, which can be determined according to the maximum inter-class variance method; the third key column position y E3 Determine based on the column where the gray value is the maximum (applicable to both symmetrical and asymmetrical thin-walled complex curved surface components), or solve based on the following formula (the following formula is applicable to symmetrical thin-walled complex curved surface components):
[0168] y E3 =(y E1 +y E2 ) / 2;
[0169] Among them, E1, E2, and E3 are the serial numbers of the key columns, 0 <E1<E3<E2<N。
[0170] Step 2: extract the light stripe center of the line laser light stripe image;
[0171] Extract the light stripe center S from the line laser light stripe image P using the grayscale centroid method, extreme value method, Steger method or threshold method light_k =(x light_k , y light_k ), x light_k Indicates the row coordinate of the kth pixel at the center of the light bar, y light_krepresents the column coordinates of the kth pixel at the center of the light strip, k represents the index of the pixel at the center of the light strip, k=0, …, K-1, K represents the number of pixels at the center of the light strip, K M N.
[0172] Step 3: Calculate the local extremum at the center of the light strip;
[0173] Calculate the light strip center S light_k The local extreme value S extreme_z =(x extreme_z , y extreme_z ), x extreme_z The row coordinate of the local extremum representing the center of the light bar, y extreme_z Represents the column coordinates of the local extrema at the center of the light bar, z represents the index of the local extrema, z=0, …, Z-1, Z represents the number of local extrema, Z K, wherein the local minimum of the light bar center is solved based on the isolocalmax function of MATLAB, and the local maximum of the light bar center is solved based on the isolocalmin function of MATLAB. The local extreme value of the light bar center described in the present invention is a local extreme value on a mathematical function, and the curve formed by the light bar center can be regarded as a function. Therefore, the local extreme value of the light bar center is essentially a pixel point.
[0174] Step 4: Determine the search starting point of the contour light bar;
[0175] The local extremum S at the center of the light strip calculated from step 3 extreme_z , select the distance from the third key column position y E3 The nearest pixel point is used as the search starting point of the contour light bar, denoted as S start =(x m , y n ); The search starting point of the contour light strip determined in this embodiment is as follows Fig.12 As shown by the red dot in the middle.
[0176] Step 5: Determine the search direction of the contour light strip;
[0177] Search starting point S according to the contour light bar start =(x m , y n ), the first key column position y E1 with the second key column position y E2 , determine two search directions, starting from the search starting point S start =(x m , y n ) points to the first key column position y E1 The direction and the search starting point S start=(x m , y n ) points to the second key column position y E2 The direction of the first search direction y n y E1 , second search direction y n y E2 .
[0178] Step 6: Determine the search area of the contour light strip;
[0179] The line laser light strip image P of this embodiment has a missing outline light strip ( Fig.11 The dotted part of the middle contour light bar is the missing part of the contour light bar). To avoid search errors caused by interference from abnormal light bars, it is necessary to divide the search area with the help of the local extreme values of the light bar centers on both sides of the search starting point.
[0180] like Fig.12 As shown, there are three circular features in the W-shaped high-temperature alloy sealing ring in this embodiment. The search starting point is located on the middle circular feature. There is a local extreme value at each of the left and right circular features. The local extreme values at the left and right circular features are respectively recorded as the first local extreme value S 1_z1 =(x extreme1_z1 , y extreme1_z1 ) and the second local extremum S 2_z2 =(x extreme2_z2 , y extreme2_z2 ), the first local extremum S 1_z1 =(x extreme1_z1 , y extreme1_z1 ) is located in the first search direction y n y E1 On the second local extreme S 2_z2 =(x extreme2_z2 , y extreme2_z2 ) is located in the second search direction y n y E2 Above; z1 represents the index of the first local extreme value, z1=0,…,t1, and in this embodiment z1=0; z2 represents the index of the second local extreme value, z2=0,…,t2, and in this embodiment z2=0.
[0181] In the first search direction y n y E1 On the left, search for the column position y where the starting point is n With the first local extremum S 1_z1 Column position y extreme1_z1 The area between is determined as the first search area, and the first local extreme value S1_z1 Column position y extreme1_z1 with the first key column position y E1 The area between is determined as the second search area, such as Fig.13 shown.
[0182] In the second search direction y n y E2 On the left, search for the column position y where the starting point is n and the second local extremum S 2_z2 Column position y extreme2_z2 The area between is determined as the third search area, and the second local extreme value S 2_z2 Column position y extreme2_z2 with the second key column position y E2 The area between is determined as the fourth search area. Fig.13 shown.
[0183] Step 7: Search for the outline light bar in the search area;
[0184] Although the line laser light strip image P of this embodiment has missing contour light strips, in step 6, local extrema are selected at the left and right circle features, and four search areas, namely the first search area to the fourth search area, are divided based on the column position of the local extrema, the key column position and the search starting point. The local extrema can be used as a constraint for establishing a sliding search window to avoid search errors. Therefore, under the constraint of the local extrema, the sliding window method can be used to search for contour light strips column by column in the first search area, the second search area, the third search area and the fourth search area:
[0185] Step 7.1 Search for the pixel with the maximum gray value in each column in the first search area;
[0186] Step 7.1.1 determining a first sliding search window;
[0187] In the first search area, x extreme1_z1 >x m , that is, the first local extreme value S at the left circular feature 1_z1 =(x extreme1_z1 , y extreme1_z1 ) is at the search starting point S of the contour light bar start = (x m , y n ), indicating that the direction of the contour light bar in the first search area is from the contour light bar search starting point S start = (x m , y n ) downward, therefore, the search starting point S of the contour light bar start = (xm , y n ) is the endpoint, extending downward 2R n row, and obtain the first sliding search window.
[0188] Step 7.1.2 Slide to search;
[0189] In the first search area, from the search starting point S of the contour light bar start = (x m , y n ) starts, moving the first sliding search window along the first search direction y n y E1 Slide 1 column, and the first sliding search window reaches the n-1th column. In the n-1th column, find the pixel with the largest grayscale value in the first sliding search window, which is recorded as the pixel with the largest grayscale value S max_(n-1) =(x max_(n-1) , y n-1 );
[0190] Step 7.1.3 determines a second sliding search window;
[0191] In the first search area, the pixel with the maximum gray value S max_(n-1) = (x max_(n-1) , y n-1 ) is the endpoint, extending downward 2R n row, and obtain the second sliding search window;
[0192] Step 7.1.4 Slide to search;
[0193] In the first search area, from the pixel with the maximum gray value S max_(n-1) = (x max_(n-1) , y n-1 ) starts, moving the second sliding search window along the first search direction y n y E1 Slide 1 column, and the second sliding search window reaches the n-2th column. In the n-2th column, find the pixel with the largest grayscale value in the second sliding search window, which is recorded as the pixel with the largest grayscale value S max_(n-2) = (x max_(n-2) , y n-2 );
[0194] Step 7.1.5: determining a third sliding search window;
[0195] In the first search area, the pixel with the maximum gray value S max_(n-2) = (x max_(n-2) , y n-2 ) is the endpoint, extending downward 2R nrow, and obtain the third sliding search window;
[0196] Step 7.1.6 Slide to search;
[0197] In the first search area, from the pixel with the maximum gray value S max_(n-2) = (x max_(n-2) , y n-2 ), the third sliding search window is moved along the first search direction y n y E1 Slide 1 column, and the third sliding search window reaches the n-3th column. In the n-3th column, find the pixel with the largest grayscale value in the third sliding search window, which is recorded as the pixel with the largest grayscale value S max_(n-3) = (x max_(n-3) , y n-3 );
[0198] Step 7.1.7 Based on the continuity of the contour light strip, the same method as steps 7.1.1-7.1.6 is used to search column by column until the first search area is searched, and finally the maximum grayscale pixel point in each column of the first search area is obtained, which are the maximum grayscale pixel point S max_(n-1) = (x max_(n-1) , y n-1 ), the pixel with the maximum gray value S max_(n-2) = (x max_(n-2) ,y n-2 ), the pixel with the maximum gray value S max_(n-3) = (x max_(n-3) , y n-3 ),…, the pixel with the maximum gray value S max_(n-k) =(x max_(n-k) , y n-k );
[0199] Step 7.2 Search for the pixel with the maximum gray value in each column in the second search area;
[0200] Step 7.2.1: determining a fourth sliding search window;
[0201] In the second search area, x light_0 <x extreme1_z1 , that is, the starting point S of the light strip center light_0 =(x light_0 ,y light_0 ) (Light bar center starting point S light_0 It can be regarded as a local extreme value at a special position) The first local extreme value S at the left circular feature 1_z1 =(x extreme1_z1 , y extreme1_z1 ), indicating that the direction of the contour light strip in the second search area is from the first local extreme value S1_z1 =(x extreme1_z1 , y extreme1_z1 ) upward, therefore, with the first local extreme value S 1_z1 =(x extreme1_z1 , y extreme1_z1 ) is the endpoint, extending upward 2R n The fourth sliding search window is obtained.
[0202] Step 7.2.2 Slide to search;
[0203] In the second search area, the first local extreme value S at the left circular feature is 1_z1 =(x extreme1_z1 ,y extreme1_z1 ) starts, moving the fourth sliding search window along the first search direction y n y E1 Slide 1 column, and the fourth sliding search window reaches the nk-1th column. In the nk-1th column, find the pixel with the largest grayscale value in the fourth sliding search window, which is recorded as the pixel with the largest grayscale value S max_(n-k-1) = (x max_(n-k-1) , y n-k-1 );
[0204] Step 7.2.3: determining the fifth sliding search window;
[0205] In the second search area, the pixel with the maximum gray value S max_(n-k-1) = (x max_(n-k-1) , y n-k-1 ) is the endpoint, extending upward 2R n row, and obtain the fifth sliding search window;
[0206] Step 7.2.4 Slide to search;
[0207] In the second search area, from the pixel with the maximum gray value S max_(n-k-1) = (x max_(n-k-1) , y n-k-1 ) starts, moving the fifth sliding search window along the first search direction y n y E1 Slide 1 column, and the fifth sliding search window reaches the nk-2th column. In the nk-2th column, find the pixel with the largest grayscale value in the fifth sliding search window, which is recorded as the pixel with the largest grayscale value S max_(n-k-2) = (x max_(n-k-2) , y n-k-2 );
[0208] Step 7.2.5: determining the sixth sliding search window;
[0209] In the second search area, the pixel with the maximum gray value S max_(n-k-2) = (x max_(n-k-2) , y n-k-2 ) is the endpoint, extending upward 2R n row, and obtain the sixth sliding search window;
[0210] Step 7.2.6 Slide to search;
[0211] In the second search area, from the pixel with the maximum gray value S max_(n-k-2) = (x max_(n-k-2) , y n-k-2 ), the sixth sliding search window is moved along the first search direction y n y E1 Slide 1 column, and the sixth sliding search window reaches the nk-3th column. In the nk-3th column, find the pixel with the largest grayscale value in the sixth sliding search window, which is recorded as the pixel with the largest grayscale value S max_(n-k-3) = (x max_(n-k-3) , y n-k-3 );
[0212] Step 7.2.7 uses the same method as steps 7.2.1-7.2.6 to search column by column until the second search area is searched, and finally the pixel with the maximum grayscale value in each column of the second search area is obtained, which are the pixel with the maximum grayscale value S and S. max_(n-k-1) = (x max_(n-k-1) , y n-k-1 ), the pixel with the maximum gray value S max_(n-k-2) = (x max_(n-k-2) , y n-k-2 ), the pixel with the maximum gray value S max_(n-k-3) = (x max_(n-k-3) , y n-k-3 ),…, the pixel with the maximum gray value S max_(n-k-j) =(x max_(n-k-j) , y n-k-j );
[0213] Step 7.3 Search for the pixel with the maximum gray value in each column in the third search area:
[0214] Using the same method as step 7.1, in the third search area, start from the search starting point S of the contour light bar. start =(x m , y n ) and follow the second search direction y n y E2Slide the search column by column until the third search area is searched, and finally the pixel with the maximum gray value in each column of the third search area is obtained, which are the pixel with the maximum gray value S max_(n+1) =(x max_(n+1) ,y n+1 ), the pixel with the maximum gray value S max_(n+2) = (x max_(n+2) , y n+2 ),…, the pixel with the maximum gray value S max_(n+h) = (x max_(n+h) , y n+h ).
[0215] Step 7.4 Search for the pixel with the maximum gray value in each column in the fourth search area:
[0216] In the fourth search area, x light_K <x extreme1_z2 , that is, the center end point S of the light strip light_K =(x light_K ,y light_K ) (Light bar center end point S light_K It can be regarded as a local extreme value at a special position) The second local extreme value S at the right circular feature 1_z2 =(x extreme1_z2 , y extreme1_z2 ), indicating that the direction of the contour light strip in the fourth search area is from the second local extreme value S 1_z2 =(x extreme1_z2 , y extreme1_z2 ) upward, therefore, using the same method as step 7.2, in the fourth search area, from the second local extreme value S at the right circular feature 1_z2 =(x extreme1_z2 , y extreme1_z2 ) and follow the second search direction y n y E2 Slide the search column by column until the fourth search area is searched, and finally the pixel with the maximum grayscale value in each column of the fourth search area is obtained, which are the pixel with the maximum grayscale value S max_(n+h+1) = (x max_(n+h+1) ,y n+h+1 ), …, S max_(n+h+r) = (x max_(n+h+r) , y n+h+r ).
[0217] In the above steps 7.1-7.4, all sliding search windows involved have the same size in the column direction. nThe value of should make the size of the resulting sliding search window in the column direction greater than or equal to the maximum width of the contour light bar and less than the minimum distance between the contour light bar and the abnormal light bar, so as to ensure that the sliding search window can search all the contour light bars and no abnormal light bars during the search.
[0218] For ease of understanding, here we will use Fig.14 , 15 For example (R n Take 1) to further explain the above sliding window method.
[0219] Fig.14 In the figure a, the blue square is the search starting point 2 of the contour light bar, and the red square is the local extreme value 5 of the circle feature; since the local extreme value 5 of the circle feature is located above the search starting point 2 of the contour light bar, the search starting point 2 of the contour light bar is used as the endpoint and extended upward by 2R n The sliding search window is 1. Fig.14 As shown in the red dotted box in Figure a; Fig.14 Figure b shows the position of the sliding search window 1 after sliding the sliding search window 1 by 1 column along the first search direction; Fig.14 The blue square in the red dotted box in Figure c is the pixel point 3 with the maximum gray value in the sliding search window 1; Fig.14 The red dashed box in the figure is the pixel with the maximum gray value 3 in the sliding search window as the endpoint, extending upward by 2R n The obtained sliding search window is 4; Fig.14 The red dotted box in Figure e is the position of the sliding search window 24 after sliding the sliding search window 24 along the first search direction by 1 column.
[0220] Fig.15 In the figure a, the blue square is the search starting point 2 of the contour light bar, and the red square is the local extreme value 5 of the circle feature; since the local extreme value 5 of the circle feature is located below the search starting point 2 of the contour light bar, the search starting point 2 of the contour light bar is used as the endpoint and extended downward by 2R n The sliding search window is 1. Fig.15 As shown in the red dotted box in Figure a; Fig.15 Figure b shows the position of the sliding search window 1 after sliding the sliding search window 1 by 1 column along the first search direction; Fig.15 The blue square in the red dotted box in Figure c is the pixel point 3 with the maximum gray value in the sliding search window 1; Fig.15 The red dashed box in the figure is the pixel with the maximum gray value 3 in the sliding search window as the endpoint, extending downward by 2R n The obtained sliding search window is 4; Fig.15The red dotted box in Figure e is the position of the sliding search window 2 4 after sliding the sliding search window 2 4 from the pixel point 3 with the maximum gray value in the sliding search window 1 along the first search direction for 1 column.
[0221] Step 7.5 Search for the contour light bar;
[0222] Step 7.5.1 Search for the first contour light strip;
[0223] Set the search starting point S of the contour light bar start = (x m , y n ) and the maximum grayscale pixel S in the first search area obtained in step 7.1 max_(n-1) = (x max_(n-1) , y n-1 ), S max_(n-2) = (x max_(n-2) , y n-2 ), …, S max_(n-k) = (x max_(n-k) , y n-k ) as the first contour to extract pixel point S extract1 (x extract_p1 , y p1 ), p1 takes n, n-1, n-2, …, nk, and searches for each first contour extraction pixel point S extract1 (x extract_p1 , y p1 ) and the corresponding pixel point (x extract_p1 , y p1 ), (x extract_p1+1 , y p1 ), (x extract_p1+2 , y p1 ), …, (x extract_p1+2Rn-1 ,y p1 ), (x extract_p1+2Rn , y p1 ), the first contour light strip S can be obtained profile1 .
[0224] Step 7.5.2 searches for the second contour light strip;
[0225] The pixel points S with the maximum grayscale value in the second search area obtained in step 7.2 are max_(n-k-1) =(x max_(n-k-1) , y n-k-1 ), S max_(n-k-2) = (x max_(n-k-2) , y n-k-2 ), …, S max_(n-k-j) = (x max_(n-k-j) , y n-k-j) are used as the second contour to extract pixel points S extract2 (x extract_p2 , y p2 ), p2 takes nk-1, nk-2,…, n- kj, and searches for the second contour extraction pixel point S extract2 (x extract_p2 , y p2 ) and the corresponding pixel point (x extract_p2 , y p2 ), (x extract_p2-1 , y p2 ), (x extract_p2-2 , y p2 ), …, (x extract_p2-2Rn , y p2 ), the second contour light strip S can be obtained profile2 .
[0226] Step 7.5.3 search for the third contour light strip;
[0227] The pixel points S with the maximum gray value in the third search area obtained in step 7.3 are max_(n+1) = (x max_(n+1) ,y n+1 ), S max_(n+2) = (x max_(n+2) , y n+2 ), …, S max_(n+h) = (x max_(n+h) , y n+h ) are used as the third contour to extract pixel points S extract3 (x extract_p3 , y p3 ), p3 takes n+1, n+2,…, n+h, searches for the third contour extraction pixel point S extract3 (x extract_p3 , y p3 ) and the corresponding pixel point (x extract_p3 , y p3 ), (x extract_p3+1 , y p3 ), (x extract_p3+2 , y p3 ), …, (x extract_p3+2Rn , y p3 ), the third contour light strip S can be obtained profile3 .
[0228] Step 7.5.4 Search for the fourth contour light strip;
[0229] The pixel points S with the maximum gray value in the fourth search area obtained in step 7.4 are max_(n+h+1) =(x max_(n+h+1), y n+h+1 ), …, S max_(n+h+r) = (x max_(n+h+r) , y n+h+r ) are used as the fourth contour to extract pixel points S extract4 (x extract_p4 , y p4 ), p4 takes n+h+1, n+h+2, ..., n+h+r, searches for each fourth contour to extract pixel point S extract4 (x extract_p4 , y p4 ) and the corresponding pixel point (x extract_p4 , y p4 ), (x extract_p4-1 , y p4 ),…,(x extract_p4-2Rn , y p4 ), the fourth contour light strip S can be obtained profile4 .
[0230] Step 7.5.5: Combine to get the outline light strip;
[0231] The second contour light strip S searched in steps 7.5.1-7.5.4 is profile2 , first contour light strip S profile1 , the third contour light strip S profile3 And the fourth contour light bar S profile3 Splice them one by one to get the contour light strip S profile .
[0232] Of course, in step 7.5, the above-mentioned method of searching in separate search areas and then stitching can be replaced by a holistic search method, that is, the search starting point and the pixel point with the maximum grayscale value in each column obtained in steps 7.1-7.4 are used as the contour extraction pixel points, and each contour extraction pixel point is used as the endpoint to expand upward / downward by 2R. n The extraction range of the contour light strip is obtained by extracting all the pixel points within the extraction range of the contour light strip to obtain the contour light strip S. profile For each contour extraction pixel point, choose whether to expand 2R upward or downward n The line can be judged according to the direction of the contour light bar in the current search area, and the expansion of 2R n The direction of the row is consistent with the direction of the contour light strip.
[0233] Step 8: Output the search result of the line laser light strip image;
[0234] The contour light strip S that is searched and extracted profile Output, see Fig.16 As can be seen from the figure, the contour light strip S profileThere are no abnormal light strips (abnormal areas).
[0235] Technical effect:
[0236] It has been verified in practice that the present invention achieves accurate segmentation of abnormal light strips in both the above two embodiments, and the processing speed in embodiment 1 is 0.5727 s; the processing speed in embodiment 2 is 0.4644 s.
Claims
1. A method for extracting contour light stripes from line laser light strip images of thin-walled complex curved surface components, characterized in that: The contour light stripe extraction method is applicable to a line laser light stripe image without contour light stripe missing, and comprises the following steps: Step 1: Locate the key column position of the line laser light strip image; On the line laser light strip image, locate the first key column position y E1 , the second key column position y E2 and the third key column position y E3 , the first key column position y E1 and the second key column position y E2 They are the columns where the light bar starts and ends, respectively. The third key column position y E3 The column where the maximum grayscale value of the light bar is located or the first key column position y E1 and the second key column position y E2 The middle column of Step 2: extract the light stripe center of the line laser light stripe image; Step 3: Calculate the local extreme value of the center of the light strip; Step 4: Determine the search starting point of the contour light bar; In the local extreme value of the center of the light bar, select the distance y from the third key column position E3 The nearest pixel point is used as the search starting point of the contour light bar, denoted as S start = (x m , y n ); Step 5: Determine the search direction of the contour light strip; Will point from the search starting point to the first key column position y E1 direction, from the search starting point to the second key column position y E2 The direction of the first search direction y n y E1 and the second search direction y n y E2 ; Step 6: Determine the search area of the contour light strip; Set the first key column position y E1 The column position y where the search starting point is n The area between the second key column position y E2 The column position y where the search starting point is n The area between is determined as the first search area and the second search area respectively; Step 7: Search and extract the contour light strip in the search area; Step 7.1 Search for the pixel with the maximum gray value in each column; Along the first search direction y n y E1 , starting from the search starting point, use the sliding window method to search column by column in the first search area to obtain the pixel with the maximum gray value in each column in the first search area; Along the second search direction y n y E2 , starting from the search starting point, use the sliding window method to search column by column in the second search area to obtain the pixel with the maximum gray value in each column in the second search area; During the column-by-column search, the sliding search window initially used is centered at the search starting point and extends upward and downward by R n The remaining sliding search windows are respectively expanded upward and downward by R with the pixel with the maximum gray value in each column as the center. n The size of all sliding search windows in the column direction is greater than or equal to the maximum width of the contour light bar and less than the minimum distance between the contour light bar and the abnormal light bar; Step 7.2 search and extract the contour light strip; The search starting point and the pixel with the maximum gray value in each column obtained in step 7.1 are used as the contour extraction pixel points. Each contour extraction pixel point is used as the center, and the pixels are expanded upward and downward by R n The extraction range of the contour light strip is obtained, and all pixel points within the extraction range are searched and extracted to obtain the contour light strip; Step 8: Output the contour light strip obtained in step 7.
2. The method for extracting contour light stripes from a line laser light stripe image of a thin-walled complex curved surface component according to claim 1, characterized in that: In step 1: the first key column position y E1 and the second key column position y E2 Determined by the maximum between-class variance method.
3. The method for extracting contour light stripes from a line laser light stripe image of a thin-walled complex curved surface component according to claim 1, characterized in that: In step 2: the center of the light stripe is extracted from the line laser light stripe image using the grayscale centroid method, the extreme value method, the Steger method or the threshold method.
4. A method for extracting contour light stripes from a line laser light strip image of a thin-walled complex curved surface component, characterized in that: The contour light stripe extraction method is applicable to a line laser light stripe image with missing contour light stripes, and comprises the following steps: Step 1: Locate the key column position of the line laser light strip image; On the line laser light strip image, locate the first key column position y E1 , the second key column position y E2 and the third key column position y E3 , the first key column position y E1 and the second key column position y E2 They are the columns where the light bar starts and ends, respectively. The third key column position y E3 The column where the maximum grayscale value of the light bar is located or the first key column position y E1 and the second key column position y E2 The middle column of Step 2: extract the light stripe center of the line laser light stripe image; Step 3: Calculate the local extreme value of the center of the light strip; Step 4: Determine the search starting point of the contour light bar; In the local extreme value of the center of the light bar, select the distance y from the third key column position E3 The nearest pixel point is used as the search starting point of the contour light bar, denoted as S start = (x m , y n ); Step 5: Determine the search direction of the contour light strip; Will point from the search starting point to the first key column position y E1 direction, from the search starting point to the second key column position y E2 The direction of the first search direction y n y E1 and the second search direction y n y E2 ; Step 6: Determine the search area of the contour light strip; The local extrema at the center of the light bar, the local extrema located on the left and right of the search starting point are respectively recorded as the first local extrema S 1_z1 =(x extreme1_z1 , y extreme1_z1 ) and the second local extremum S 1_z2 =(x extreme1_z2 ,y extreme1_z2 ), z1 and z2 are the indices of the first local extremum and the second local extremum respectively, z1=0,…,t1, z2=0,…,t2; The column position y of the first local extreme value extreme1_z1 The column position y where the search starting point is n with the first key column position y E1 The area between is divided into several search areas along the first search direction y n y E1 They are denoted as the first search area, ..., the Cth search area; C = t1+2; The column position y of the second local extreme value extreme1_z2 The column position y where the search starting point is n with the second key column position y E2 The area between is divided into several search areas, along the second search direction y n y E2 They are recorded as the C+1th search area, ..., the C+Dth search area; D = t2+2; Step 7: Search and extract the contour light strip in the search area; Step 7.1 Search for the pixel with the maximum gray value in each column; Along the first search direction y n y E1 , starting from the search starting point, sequentially in the first search area, ..., the Cth search area, based on the direction of the contour light strip, a sliding window method is used to search column by column to obtain the pixel point with the maximum gray value in each column in the first search area, ..., the Cth search area; Along the second search direction y n y E2 , starting from the search starting point, in the C+1th search area, ..., C+Dth search area, based on the direction of the contour light strip, a sliding window method is used to search column by column to obtain the pixel point with the maximum gray value in each column in the C+1th search area, ..., C+Dth search area; During the column-by-column search, the sliding search window initially used is extended upward / downward 2R from the search starting point as the endpoint n The remaining sliding search windows are expanded upward / downward by 2R with the maximum grayscale pixel of each column as the endpoint. n The size of all sliding search windows in the column direction is greater than or equal to the maximum width of the contour light bar and less than the minimum distance between the contour light bar and the abnormal light bar; Step 7.2 search and extract the contour light strip; The search starting point and the pixel with the maximum gray value in each column obtained in step 7.1 are used as the contour extraction pixel points. Each contour extraction pixel point is used as the endpoint, and the contour light strip is extended upward / downward by 2R based on the direction of the contour light strip. n The extraction range of the contour light strip is obtained, and all pixel points within the extraction range are searched and extracted to obtain the contour light strip; Step 8: Output the contour light strip obtained in step 7.
5. The method for extracting contour light stripes from a line laser light stripe image of a thin-walled complex curved surface component according to claim 4, characterized in that: In step 1: the first key column position y E1 and the second key column position y E2 Determined by the maximum between-class variance method.
6. The method for extracting contour light stripes from a line laser light stripe image of a thin-walled complex curved surface component according to claim 4, characterized in that: In step 2: the center of the light stripe is extracted from the line laser light stripe image using the grayscale centroid method, the extreme value method, the Steger method or the threshold method.
7. The method for extracting contour light stripes from a line laser light stripe image of a thin-walled complex curved surface component according to any one of claims 4 to 6, characterized in that: Determine 2R in step 7.1 n The method for row expansion direction is: In the first search area and the C+1 search area, based on the relative position relationship between the local extreme value of the corresponding light bar center and the search starting point, determine the direction of the contour light bar in the current search area. If the contour light bar is moving upward, expand upward by 2R n If the outline light strip is moving downward, extend it downward by 2R. n OK; Along the first search direction y n y E1 In the second search area, ..., the Cth search area, based on the relative position relationship between two adjacent first local extrema, the direction of the contour light strip in the current search area is determined. If the contour light strip is upward, the contour light strip is extended upward by 2R n If the contour is going downward, extend downward by 2R n OK; Along the second search direction y n y E2 In the C+2 search area, ..., C+D search area, based on the relative position relationship between two adjacent second local extrema, the direction of the contour light bar in the current search area is determined. If the contour light bar is upward, the direction is extended upward by 2R n If the contour is going downward, extend downward by 2R n OK; In step 7.2: If the outline light strip is pointing upward, it will extend upward by 2R. n If the outline light strip is moving downward, it will extend downward by 2R. n OK.
8. A method for extracting contour light stripes from a line laser light strip image of a thin-walled complex curved surface component, characterized in that: The contour light stripe extraction method is applicable to a line laser light stripe image with missing contour light stripes, and comprises the following steps: Step 1: Locate the key column position of the line laser light strip image; On the line laser light strip image, locate the first key column position y E1 , the second key column position y E2 and the third key column position y E3 , the first key column position y E1 and the second key column position y E2 They are the columns where the light bar starts and ends, respectively. The third key column position y E3 The column where the maximum grayscale value of the light bar is located or the first key column position y E1 and the second key column position y E2 The middle column of Step 2: extract the light stripe center of the line laser light stripe image; Step 3: Calculate the local extreme value of the center of the light strip; Step 4: Determine the search starting point of the contour light bar; In the local extreme value of the center of the light bar, select the distance y from the third key column position E3 The nearest pixel point is used as the search starting point of the contour light bar, denoted as S start = (x m , y n ); Step 5: Determine the search direction of the contour light strip; Will point from the search starting point to the first key column position y E1 direction, from the search starting point to the second key column position y E2 The direction of the first search direction y n y E1 and the second search direction y n y E2 ; Step 6: Determine the search area of the contour light strip; The local extrema at the center of the light bar, the local extrema located on the left and right of the search starting point are respectively recorded as the first local extrema S 1_z1 =(x extreme1_z1 , y extreme1_z1 ) and the second local extremum S 1_z2 =(x extreme1_z2 ,y extreme1_z2 ), z1 and z2 are the indices of the first local extremum and the second local extremum respectively, z1=0,…,t1, z2=0,…,t2; The column position y of the first local extreme value extreme1_z1 The column position y where the search starting point is n with the first key column position y E1 The area between is divided into several search areas along the first search direction y n y E1 They are denoted as the first search area, ..., the Cth search area; C = t1+2; The column position y of the second local extreme value extreme1_z2 The column position y where the search starting point is n with the second key column position y E2 The area between is divided into several search areas, along the second search direction y n y E2 They are recorded as the C+1th search area, ..., the C+Dth search area; D = t2+2; Step 7: Search and extract the contour light strip in the search area; Step 7.1 Search for the pixel with the maximum gray value in each column; Along the first search direction y n y E1 , starting from the search starting point, sequentially in the first search area, ..., the Cth search area, based on the direction of the contour light strip, a sliding window method is used to search column by column to obtain the pixel point with the maximum gray value in each column in the first search area, ..., the Cth search area; Along the second search direction y n y E2 , starting from the search starting point, in the C+1th search area, ..., C+Dth search area, based on the direction of the contour light strip, a sliding window method is used to search column by column to obtain the pixel point with the maximum gray value in each column in the C+1th search area, ..., C+Dth search area; During the column-by-column search, the sliding search window initially used is extended upward / downward 2R from the search starting point as the endpoint n The remaining sliding search windows are expanded upward / downward by 2R with the maximum grayscale pixel of each column as the endpoint. n The size of all sliding search windows in the column direction is greater than or equal to the maximum width of the contour light bar and less than the minimum distance between the contour light bar and the abnormal light bar; Step 7.2 search and extract the contour light strip; Step 7.2.1 search and extract the first contour light strip; Along the first search direction y n y E1 , take the search starting point and the pixel with the maximum gray value in each column in the first search area as the first contour extraction pixel point, and use each first contour extraction pixel point as the endpoint, and expand 2R upward / downward based on the direction of the contour light strip n The first contour light strip extraction range is obtained, and all pixel points within the first contour light strip extraction range are searched and extracted to obtain the first contour light strip; Step 7.2.2 searches for and extracts the second contour light strip, ..., the Cth contour light strip; Along the first search direction y n y E1 , take the pixel with the maximum gray value in each column in the second search area as the second contour extraction pixel, and use each second contour extraction pixel as the endpoint, and expand 2R upward / downward based on the direction of the contour light strip n The second contour light strip extraction range is obtained by searching and extracting all pixel points within the second contour light strip extraction range to obtain the second contour light strip; Using the same method, along the first search direction y n y E1 By searching and extracting area by area, the third contour light strip, ..., the Cth contour light strip can be obtained; Step 7.2.3 Along the second search direction y n y E2 Search and extract contour light strips area by area; Use the same method as step 7.2.2 to search along the second direction y n y E2 By searching and extracting area by area, the C+1th contour light strip, ..., the C+Dth contour light strip can be obtained; Step 7.3: Combine to get the outline light strip; The Cth contour light strip, ..., the second contour light strip, the first contour light strip, the C+1th contour light strip, ..., the C+Dth contour light strip obtained in step 7.2 are sequentially spliced to obtain the final contour light strip; Step 8: Output the final contour light strip obtained in step 7.
3.
9. The method for extracting contour light stripes from a line laser light stripe image of a thin-walled complex curved surface component according to claim 8, characterized in that: In step 1: the first key column position y E1 and the second key column position y E2 Determined by the maximum between-class variance method; In step 2: the center of the light stripe is extracted from the line laser light stripe image using the grayscale centroid method, the extreme value method, the Steger method or the threshold method.
10. The method for extracting contour light stripes from a line laser light stripe image of a thin-walled complex curved surface component according to claim 8 or 9, characterized in that: Determine 2R in step 7.1 n The method for row expansion direction is: In the first search area and the C+1 search area, based on the relative position relationship between the local extreme value of the corresponding light bar center and the search starting point, determine the direction of the contour light bar in the current search area. If the contour light bar is moving upward, expand upward by 2R n If the outline light strip is moving downward, extend it downward by 2R. n OK; Along the first search direction y n y E1 In the second search area, ..., the Cth search area, based on the relative position relationship between two adjacent first local extrema, the direction of the contour light strip in the current search area is determined. If the contour light strip is upward, the contour light strip is extended upward by 2R n If the contour is going downward, extend downward by 2R n OK; Along the second search direction y n y E2 In the C+2 search area, ..., C+D search area, based on the relative position relationship between two adjacent second local extrema, the direction of the contour light bar in the current search area is determined. If the contour light bar is upward, the direction is extended upward by 2R n If the contour is going downward, extend downward by 2R n OK; In steps 7.2.1-7.2.3: If the outline light strip is pointing upward, it will extend upward by 2R. n If the outline light strip is moving downward, it will extend downward by 2R. n OK.
Citation Information
Patent Citations
Point cloud processing method for keeping non-rigid registration based on deep learning and adaptive topology
CN116703989A
Processing and quality assessment method of online measurement point cloud of thin-walled complex components
CN118279363B
Discrete laser stripe center point tracking method based on direction search
CN113643178A
Line laser contour extraction method and device, electronic equipment and storage medium
CN118258321A