Visual inspection system for vacuum corrugated pipe with high compression ratio
By designing the visual detection system of a high compression rate vacuum ripple tube, using image collection and pre -processing technology, combined with characteristic points extraction and mode recognition method, solving the problem of low accuracy and efficiency of vacuum ripple tubes Accuracy and efficiency.
Patent Information
- Application Number
- CN202411397657.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing vacuum corrugated tube crack detection method is low in accuracy and efficiency when detecting vacuum corrugated tubes with smaller cross-sections, which affects the detection effect and quality.
The visual detection system of a high compression rate vacuum ripple is designed, including image collection units, image pre -processing units, feature point extraction units, and crack defect recognition units. Survenge the light source and collect images through the laser, use the contour tracking method and the gray gray center of gravity to extract the central line of the light bars, combine the horizontal projection method and the search method to determine the crack feature point, and finally identify the decision to determine whether the crack feature point is defective.
Improve the accuracy and efficiency of crack detection, avoid scanning of non -optical bar areas, reduce the emergence of pseudo -symbols, and significantly improve the crack detection effect and detection quality of the vacuum ripple tube.
Smart Images

Figure CN119338770A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of vacuum bellows detection, in particular to a high-compression vacuum bellows visual detection system. Background Art
[0002] A vacuum bellows is a tubular shell with a specific geometric shape. Its busbar is corrugated and has a certain degree of flexibility. The bellows will stretch under the action of tensile force and shorten under the action of compressive force. With the development of industrial technology, the development trend of modern welding technology is intelligent and automated. A vacuum bellows is a tubular object that can be deformed and expanded through laser welding technology and wave plate welding. A high-compression bellows refers to a bellows with a relatively large expansion and contraction range, which is suitable for working conditions with large strokes and frequent lifting and lowering. After welding, the high-compression bellows needs to be tested for cracks to determine the pass rate of the vacuum bellows. Pipeline cracks are one of the more serious defects in industrial pipelines.
[0003] For example, the Chinese patent CN117214085A, "A double-wall corrugated pipe production quality inspection process", includes the following steps: Step 1: Detect defects on the surface of the corrugated pipe through a quality inspection system; Step 2: After completing step 1, perform compression and torsional resistance tests on the corrugated pipe; Step 3: After completing step 2, perform sealing tests on the corrugated pipe.
[0004] Traditional pipeline detection methods include eddy current detection, X-ray detection, ultrasonic detection, penetration detection, infrared detection, etc. The quality of cracks has a crucial impact on the use and life of vacuum bellows. Cracks affect the sealing effect of bellows, which in turn affects the normal use of vacuum bellows; however, when crack detection is performed on vacuum bellows with smaller cross-sections, the increase and decrease intervals of the light strips projected on the pipeline will be more than those on large-section pipelines, thereby interfering with the extraction of crack feature points on the bellows and reducing the extraction accuracy of crack feature points. At the same time, the accuracy and efficiency of existing vacuum bellows crack detection algorithms are relatively low, which affects the crack detection effect and detection quality of vacuum bellows.
[0005] In view of this, the present application proposes a high compression ratio vacuum bellows visual inspection system. Summary of the invention
[0006] The object of the present invention is to provide a high compression ratio vacuum bellows visual inspection system to solve the above-mentioned problems.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A high compression rate vacuum bellows visual inspection system comprises an image acquisition unit, an image preprocessing unit, a feature point extraction unit and a crack defect recognition unit, wherein the image acquisition unit is connected to the image preprocessing unit by signal, and the image preprocessing unit is connected to the feature point extraction unit by signal;
[0009] The image acquisition unit projects an auxiliary light source onto the surface of the corrugated pipe to be tested through a laser, and then acquires an image of the crack of the corrugated pipe to be tested where the laser stripes are located through an electron microscope;
[0010] The image preprocessing unit performs image enhancement, image difference and morphological opening operations on the crack image, performs image denoising and smoothing, then uses a contour tracking method to outline the laser stripes, and then uses a grayscale centroid method to extract the center line of the light stripes;
[0011] The feature point extraction unit uses horizontal projection to implement the first step of screening the region of interest ROI, and then performs the second step of selecting the ROI based on a column-by-column search, and uses the horizontal projection method and the column-by-column search method to set the crack feature points twice to determine the ROI range image of the crack feature points;
[0012] The crack defect recognition unit processes whether the ROI range image of the crack feature point is a defect as a pattern recognition problem, regards the image to be detected as a linear combination of sample images, and determines whether the ROI range image is a defect by obtaining a coefficient vector.
[0013] Furthermore, the image preprocessing unit includes an image enhancement unit, an image difference processing unit, a morphological opening operation unit, a contour framing unit and a centerline extraction unit;
[0014] The image enhancement unit uses image enhancement technology to adjust the contrast and perform spatial filtering on the crack image of the corrugated pipe to be tested, thereby improving the contrast of the image and highlighting its detail differences, and uses nonlinear transformation to perform image enhancement and select a specific area as the original image;
[0015] The image difference processing unit inverts the grayscale value of the original image by selecting a suitable threshold, and then performs grayscale difference between the original image and the pixel points corresponding to the inverted binary image. If the difference result is a negative number, the grayscale value of these points is converted to 0, and the noise near the light strip is removed to obtain a denoised image.
[0016] The morphological opening operation unit constructs two different structural elements a1 and a2 to corrode and dilate the image respectively by performing morphological analysis on the laser stripes of the denoised image, removes the residual spots of the image according to the opening operation processing formula, and obtains a smoothed image after smoothing the image;
[0017] The outline framing unit tracks and frames the light stripe outline of the smoothed image by using an eight-neighborhood chain code, thereby providing a starting point and a width for calculating the grayscale center of gravity of the light stripe;
[0018] The center line extraction unit calculates the grayscale centroid coordinates of the light strip cross section as the center point on the premise of locating the light strip contour, and calculates the light strip part inside the contour column by column through the grayscale centroid method to obtain the center line of the laser stripe.
[0019] Furthermore, the image difference processing unit inverts the grayscale value of the original image by selecting a suitable threshold, including the following steps:
[0020] A1. According to the maximum inter-class variance method, the threshold value for grayscale inversion is obtained. The light strip with higher grayscale value is taken as the image foreground, and the area with lower grayscale value is taken as the image background. The probability of foreground pixel point appearing is ω1, and its grayscale mean is μ1. The probability of background pixel point appearing is ω2, and its grayscale mean is μ2. The total grayscale mean value of the image is μ.
[0021] A2. Assume that the image size is M×N, select the threshold value as t, and record the number of pixels in the image whose grayscale value is greater than t as Q1, and the number of pixels whose grayscale value is less than t as Q2, then:
[0022]
[0023] A3. Calculate the inter-class variance of foreground and background. The formula is as follows:
[0024] σ 2 (t) = ω1(μ1-μ) 2 +ω2(μ2+μ) 2 ;
[0025] A4. Select the threshold according to the maximum inter-class variance. The formula is as follows:
[0026] t = arg t∈(0.255) maxσ 2 (t);
[0027] A5. Perform subtraction operations on the corresponding pixels of the image of the crack of the corrugated pipe to be tested and the image with the inverted grayscale value one by one according to the calculation formula. The calculation formula is as follows:
[0028]
[0029] Where: I s (i, j) is the grayscale value of the pixel after subtraction, I3(i, j) is the grayscale value of the pixel in the original image, and I4(i, j) is the grayscale value of the pixel in the image after the grayscale is inverted.
[0030] Furthermore, the structural element a1 and a2 matrices in the morphological opening operation unit are respectively:
[0031]
[0032] The opening operation processing formula is:
[0033] Furthermore, in the outline framing unit, the specific tracking process is as follows:
[0034] B1. During the tracking process, the threshold T is determined by calculating the maximum inter-class variance method on the smoothed image. The upper left corner of the smoothed image is taken as the starting point, and the pixels in the smoothed image are traversed from top to bottom and from left to right.
[0035] B2. When a pixel has a grayscale value greater than the threshold value T, the point is used as the center of the eight-neighborhood and the search is performed clockwise. If there are no pixels with grayscale values greater than the threshold value T around it, the search continues from the point. If there are pixels with grayscale values greater than the threshold value T around it, the point is recorded and the center of the eight-neighborhood is moved there. The search is repeated clockwise until a pixel that does not meet the threshold value T is encountered and the search is stopped.
[0036] B3. After finding a contour, jump out and continue to traverse from the largest column of the previous contour to the right in a top-down order to find the contour until all columns are traversed and then exit. The points recorded during the traversal process are the boundary points of the light bar.
[0037] Furthermore, when the center line extraction unit calculates the grayscale centroid coordinates of the light strip cross section as the center point, the calculation formula is as follows:
[0038]
[0039] Where: x j is the row coordinate of the center point of each cross section of the light strip, ω j is the width of each section of the light strip, i up is the starting point for calculating each cross section of the light strip, and I(i,j) is the grayscale value of the pixel in the i-th row and j-th column.
[0040] Furthermore, when the feature point extraction unit uses horizontal projection to implement the first step of ROI screening, the width of the useful curve light strip part and the straight line part to be removed on the horizontal axis is compared, that is, the number of consecutive rows containing white points in the two areas is compared in the center line image, and the area with more consecutive rows is selected, which represents the part of the curve area where the crack feature point is located.
[0041] Furthermore, the pattern recognition in the crack defect recognition unit is to determine the category to which the ROI range image belongs through the marked samples, which specifically includes the following steps:
[0042] C1. Use vector z to represent a grayscale image with image size of image height h × image width w, that is:
[0043]
[0044] Where: R is the real number field;
[0045] C2, vector z can be generated by arranging the pixels of the image one by one according to the principle of row or column priority. Assuming that the number of sample images is n, the n sample images can form a matrix Z. The image to be detected is regarded as a linear combination of the sample images. Let u be any image to be detected, that is:
[0046]
[0047] Where: V is the coefficient vector composed of n real coefficients, z0~z n-1 It is a vector composed of n sample images arranged one by one according to the principle of row or column priority;
[0048] C3. For the identification of vacuum bellows crack defects, the suspected defect area SDR in the Z matrix can be divided into two categories: defects and noise;
[0049] C4. The coefficients in the coefficient vector V that are not 0 are related to the type of u, and the coefficients that are not related to the type of u are 0. Therefore, V can be used to determine whether u is a defect or noise. From the perspective of image recognition, the higher the sparsity of V, the more conducive it is to the recognition of u. By introducing the penalty function g(v), we have:
[0050]
[0051] Where: λ is the penalty function coefficient;
[0052] C5. The category of the image to be detected can be determined based on the distribution of coefficients in the coefficient vector. Based on this, the following judgment standard formula is proposed. When the standard formula is met, the SDR image to be detected can be determined to be a real defect, otherwise it is determined to be noise. The standard formula is as follows:
[0053]
[0054] Beneficial effects of the present invention:
[0055] 1. In the present invention, an image of the crack of the bellows to be tested where the laser stripes are located is collected randomly by an electron microscope, and the contour tracking method is used to frame the contour of the laser stripes, thereby improving the speed and accuracy of the algorithm, avoiding scanning of the non-light stripe area when extracting the center line, improving the center line accuracy and saving the scanning time of the non-light stripe area, and according to the morphological characteristics of the center line of the laser stripe, the horizontal projection method and the column-by-column search method are used to set the key area where the crack feature points are located twice, avoiding pseudo feature points that may appear in other areas, and combining with the crack defect recognition unit to realize the recognition of the crack feature points, and the image acquisition unit of the electron microscope is used in combination with the visual detection method to accurately detect the cracks after the vacuum bellows is welded, and the qualified rate is judged, thereby improving the accuracy and efficiency of crack detection and recognition.
[0056] 2. In the present invention, the crack defect recognition unit processes the judgment of whether the ROI range image of the crack feature point is a defect as a pattern recognition problem, and regards the image to be detected as a linear combination of the sample images, and determines whether the ROI range image is a defect by obtaining the coefficient vector; by constructing a dictionary matrix composed of sample images, the image to be detected can be regarded as a linear combination of the sample images, and the type of the image to be detected can be obtained by obtaining the sparse coefficient vector. Since the recognition result is determined by all the sparse coefficients rather than a specific parameter, the accuracy of defect detection of the ROI range image is improved, and the crack detection effect and detection quality of the vacuum bellows are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 This is a system principle diagram of a high-compression vacuum bellows visual inspection system of the present invention.
[0058] In the figure: 1. Image acquisition unit; 2. Image preprocessing unit; 3. Feature point extraction unit; 4. Crack defect recognition unit. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] See also Figure 1 , This design proposes an implementation method, a high compression rate vacuum bellows visual inspection system, including an image acquisition unit 1, an image preprocessing unit 2, a feature point extraction unit 3 and a crack defect recognition unit 4, the image acquisition unit 1 and the image preprocessing unit 2 are signal-connected, and the image preprocessing unit 2 and the feature point extraction unit 3 are signal-connected;
[0061] The image acquisition unit 1 projects an auxiliary light source onto the surface of the bellows to be tested through a laser, and then collects the crack image of the bellows to be tested where the laser stripes are located through an electron microscope;
[0062] The image preprocessing unit 2 performs image enhancement, image difference and morphological opening operations on the crack image, performs image denoising and smoothing, then uses a contour tracking method to frame the laser stripes, and then uses a grayscale centroid method to extract the center line of the light stripes; the image preprocessing unit 2 includes an image enhancement unit 21, an image difference processing unit 22, a morphological opening operation unit 23, a contour framing unit 24 and a center line extraction unit 25;
[0063] The image enhancement unit 21 uses image enhancement technology to perform contrast adjustment and spatial filtering on the crack image of the corrugated pipe to be tested, thereby improving the contrast of the image and highlighting its detail differences, and uses nonlinear transformation to perform image enhancement, and selects a specific area as the original image;
[0064] The image difference processing unit 22 inverts the grayscale value of the original image by selecting a suitable threshold, and then uses the grayscale difference of each pixel point corresponding to the original image and the inverted binary image. If the difference result is a negative number, the grayscale value of these points is converted to 0, and the noise near the light strip is removed to obtain a denoised image. The image difference processing unit 22 inverts the grayscale value of the original image by selecting a suitable threshold, including the following steps:
[0065] A1. According to the maximum inter-class variance method, the threshold value for grayscale inversion is obtained. The light strip with higher grayscale value is taken as the image foreground, and the area with lower grayscale value is taken as the image background. The probability of foreground pixel point appearing is ω1, and its grayscale mean is μ1. The probability of background pixel point appearing is ω2, and its grayscale mean is μ2. The total grayscale mean value of the image is μ.
[0066] A2. Assume that the image size is M×N, select the threshold value as t, and record the number of pixels in the image whose grayscale value is greater than t as Q1, and the number of pixels whose grayscale value is less than t as Q2, then:
[0067]
[0068] A3. Calculate the inter-class variance of foreground and background. The formula is as follows:
[0069] σ 2 (t) = ω1(μ1-μ) 2 +ω2(μ2+μ) 2 ;
[0070] A4. Select the threshold according to the maximum inter-class variance. The formula is as follows:
[0071] t = arg t∈(0.255)maxσ 2 (t);
[0072] A5. Perform subtraction operations on the corresponding pixels of the image of the crack of the corrugated pipe to be tested and the image with the inverted grayscale value one by one according to the calculation formula. The calculation formula is as follows:
[0073]
[0074] Where: I s (i, j) is the gray value of the pixel after subtraction, I3(i, j) is the gray value of the pixel in the original image, and I4(i, j) is the gray value of the pixel in the image after grayscale inversion;
[0075] The morphological opening operation unit 23 performs morphological analysis on the laser stripes of the denoised image, constructs two different structural elements a1 and a2 to corrode and dilate the image respectively, removes the residual spots of the image according to the opening operation processing formula, and obtains a smoothed image after smoothing the image; the matrices of the structural elements a1 and a2 in the morphological opening operation unit 23 are respectively:
[0076]
[0077] The opening operation formula is:
[0078] The contour framing unit 24 tracks and frames the light stripe contour of the smoothed image by using the eight-neighborhood chain code to provide a starting point and width for calculating the grayscale center of gravity of the light stripe. The specific tracking process is as follows:
[0079] B1. During the tracking process, the threshold T is determined by calculating the maximum inter-class variance method on the smoothed image. The upper left corner of the smoothed image is taken as the starting point, and the pixels in the smoothed image are traversed from top to bottom and from left to right.
[0080] B2. When a pixel has a grayscale value greater than the threshold value T, the point is used as the center of the eight-neighborhood and the search is performed clockwise. If there are no pixels with grayscale values greater than the threshold value T around it, the search continues from the point. If there are pixels with grayscale values greater than the threshold value T around it, the point is recorded and the center of the eight-neighborhood is moved there. The search is repeated clockwise until a pixel that does not meet the threshold value T is encountered and the search is stopped.
[0081] B3. After finding a contour, exit, and continue to traverse from the largest column of the previous contour to the right in a top-down order to find the contour again, until all columns are traversed and then exit. The points recorded during the traversal process are the boundary points of the light bar;
[0082] The center line extraction unit 25 calculates the grayscale centroid coordinates of the light strip cross section as the center point on the premise of locating the light strip contour, and calculates the light strip part inside the contour column by column by the grayscale centroid method to obtain the center line of the laser stripe; when calculating the grayscale centroid coordinates of the light strip cross section as the center point, the calculation formula is as follows:
[0083]
[0084] Where: x j is the row coordinate of the center point of each cross section of the light strip, ω j is the width of each section of the light strip, i up is the starting point for calculating each cross section of the light strip, and I(i,j) is the grayscale value of the pixel in the i-th row and j-th column;
[0085] The feature point extraction unit 3 uses the horizontal projection method to implement the first step of screening the region of interest ROI, and then performs the second step of selecting the ROI based on the column-by-column search. The crack feature points are set twice by the horizontal projection method and the column-by-column search method to determine the ROI range image of the crack feature points; when the first step of ROI screening is implemented by the horizontal projection method, the width of the useful curve light strip part and the straight line part to be removed on the horizontal axis is compared, that is, the number of continuous rows containing white points in the two areas is compared in the center line image, and the area with more continuous rows is selected, which represents the part of the curve area where the crack feature points are located;
[0086] The crack defect recognition unit 4 processes the judgment of whether the ROI range image of the crack feature point is a defect as a pattern recognition problem, and regards the image to be detected as a linear combination of the sample images, and judges whether the ROI range image is a defect by obtaining the coefficient vector; specifically, the following steps are included:
[0087] C1. Use vector z to represent a grayscale image with image size of image height h × image width w, that is:
[0088]
[0089] Where: R is the real number field;
[0090] C2, vector z can be generated by arranging the pixels of the image one by one according to the principle of row or column priority. Assuming that the number of sample images is n, the n sample images can form a matrix Z. The image to be detected is regarded as a linear combination of the sample images. Let u be any image to be detected, that is:
[0091]
[0092] Where: V is the coefficient vector composed of n real coefficients, z0~z n-1It is a vector composed of n sample images arranged one by one according to the principle of row or column priority;
[0093] C3. For the identification of vacuum bellows crack defects, the suspected defect area SDR in the Z matrix can be divided into two categories: defects and noise;
[0094] C4. The coefficients in the coefficient vector V that are not 0 are related to the type of u, and the coefficients that are not related to the type of u are 0. Therefore, V can be used to determine whether u is a defect or noise. From the perspective of image recognition, the higher the sparsity of V, the more conducive it is to the recognition of u. By introducing the penalty function g(v), we have:
[0095]
[0096] Where: λ is the penalty function coefficient;
[0097] C5. The category of the image to be detected can be determined based on the distribution of coefficients in the coefficient vector. Based on this, the following judgment standard formula is proposed. When the standard formula is met, the SDR image to be detected can be determined to be a real defect, otherwise it is determined to be noise. The standard formula is as follows:
[0098]
[0099] In the present invention, when the system is used to perform visual inspection on a high-compression vacuum bellows, the image acquisition unit 1 projects an auxiliary light source onto the surface of the bellows to be tested through a laser, and then collects the crack image of the bellows to be tested where the laser stripes are located through an electron microscope; the image preprocessing unit 2 performs image enhancement, image difference and morphological opening operations on the crack image, denoises and smoothes the image, and then uses the grayscale centroid method to extract the center line of the light stripe; the feature point extraction unit 3 uses a horizontal projection method to implement the first step of screening the region of interest ROI, and then performs a second step of selecting the ROI based on a column-by-column search, and uses the horizontal projection method and the column-by-column search method to set the crack feature points twice to determine the ROI range image of the crack feature points; the crack defect recognition unit 4 treats the judgment of whether the ROI range image of the crack feature points is a defect as a pattern recognition problem, and regards the image to be detected as a linear combination of the sample images, and determines whether the ROI range image is a defect by obtaining the coefficient vector;
[0100] The system projects an auxiliary light source onto the surface of the tested bellows through a laser, and then collects the crack image of the tested bellows where the laser stripes are located through an electron microscope. When preprocessing the crack image of the tested bellows, the contour tracking method is used to frame the laser stripes, thereby improving the speed and accuracy of the algorithm and avoiding scanning the non-light stripe area when extracting the center line. The contour tracking method provides a starting point and width for calculating the grayscale center of gravity of the light stripe, thereby improving the accuracy of the center line and saving the scanning time of the non-light stripe area. In addition, according to the morphological characteristics of the center line of the laser stripe, after the center line of the laser stripe is extracted, the first step of ROI screening is performed to narrow the range of feature points for judgment, thereby improving the accuracy and efficiency of crack recognition. The key area where the crack feature points are located is set twice by using the horizontal projection method and the column-by-column search method, thereby avoiding pseudo feature points that may appear in other areas. The crack feature points are recognized in combination with the crack defect recognition unit 4. The cracks after welding of the vacuum bellows are accurately detected by the image acquisition unit 1 of the electron microscope in combination with the visual detection method, and the qualified rate is judged, thereby improving the accuracy and efficiency of crack detection and recognition.
[0101] At the same time, the crack defect recognition unit 4 treats the judgment of whether the ROI range image of the crack feature point is a defect as a pattern recognition problem, and regards the image to be detected as a linear combination of the sample images, and determines whether the ROI range image is a defect by obtaining the coefficient vector; by constructing a dictionary matrix composed of sample images, the image to be detected can be regarded as a linear combination of the sample images, and the type of the image to be detected can be obtained by obtaining the sparse coefficient vector. Since the recognition result is determined by all the sparse coefficients rather than a specific parameter, the accuracy of defect detection of the ROI range image is improved, and the crack detection effect and detection quality of the vacuum bellows are improved.
[0102] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A high compression rate vacuum bellows visual inspection system, characterized in that: The invention comprises an image acquisition unit (1), an image preprocessing unit (2), a feature point extraction unit (3) and a crack defect recognition unit (4), wherein the image acquisition unit (1) and the image preprocessing unit (2) are connected by signals, and the image preprocessing unit (2) and the feature point extraction unit (3) are connected by signals; The image acquisition unit (1) projects an auxiliary light source onto the surface of the corrugated pipe to be tested by means of a laser, and then acquires an image of a crack in the corrugated pipe to be tested where the laser stripes are located by means of an electron microscope; The image preprocessing unit (2) performs image enhancement, image difference and morphological opening operations on the crack image, performs image denoising and smoothing, then uses a contour tracking method to outline the laser stripe, and then uses a grayscale centroid method to extract the center line of the light stripe; The feature point extraction unit (3) uses a horizontal projection method to implement the first step of screening the region of interest (ROI), and then performs a second step of selecting the ROI based on a column-by-column search, and uses a horizontal projection method and a column-by-column search method to set the crack feature points twice to determine the ROI range image of the crack feature points; The crack defect recognition unit (4) processes the judgment of whether the ROI range image of the crack feature point is a defect as a pattern recognition problem, regards the image to be detected as a linear combination of sample images, and judges whether the ROI range image is a defect by obtaining a coefficient vector.
2. The high compression rate vacuum bellows visual inspection system according to claim 1 is characterized in that: The image preprocessing unit (2) comprises an image enhancement unit (21), an image difference processing unit (22), a morphological opening operation unit (23), a contour framing unit (24) and a centerline extraction unit (25); The image enhancement unit (21) uses image enhancement technology to perform contrast adjustment and spatial filtering on the crack image of the corrugated pipe to be tested, thereby improving the contrast of the image and highlighting its detail differences, and uses nonlinear transformation to perform image enhancement, and selects a specific area as the original image; The image difference processing unit (22) inverts the grayscale value of the original image by selecting a suitable threshold, and then uses the grayscale difference of each pixel point corresponding to the original image and the inverted binary image to perform grayscale difference. If the difference result is a negative number, the grayscale value of these points is converted to 0, and the noise near the light strip is removed to obtain a denoised image. The morphological opening operation unit (23) performs morphological analysis on the laser stripes of the denoised image, constructs two different structural elements a1 and a2 to corrode and dilate the image respectively, removes residual spots of the image according to the opening operation processing formula, and obtains a smoothed image after smoothing the image; The outline framing unit (24) tracks and frames the light stripe outline of the smoothed image by using an eight-neighborhood chain code, thereby providing a starting point and a width for calculating the grayscale center of gravity of the light stripe; The center line extraction unit (25) calculates the grayscale centroid coordinates of the light strip cross section as the center point on the premise of locating the light strip contour, and calculates the light strip part inside the contour column by column through the grayscale centroid method to obtain the center line of the laser stripe.
3. The high compression rate vacuum bellows visual inspection system according to claim 2, characterized in that: The image difference processing unit (22) inverts the grayscale value of the original image by selecting a suitable threshold, comprising the following steps: A1. According to the maximum inter-class variance method, the threshold value for grayscale inversion is obtained. The light strip with higher grayscale value is taken as the image foreground, and the area with lower grayscale value is taken as the image background. The probability of foreground pixel point appearing is ω1, and its grayscale mean is μ1. The probability of background pixel point appearing is ω2, and its grayscale mean is μ2. The total grayscale mean value of the image is μ. A2. Assume that the image size is M×N, select the threshold value as t, and record the number of pixels in the image whose grayscale value is greater than t as Q1, and the number of pixels whose grayscale value is less than t as Q2, then: ω1=Q1 / (M×N) ω2=Q2 / (M×N) ω1+ω2=1; μ=ω1×μ1+ω2×μ2 A3. Calculate the inter-class variance of foreground and background. The formula is as follows: s 2 (t)=ω1(μ1-μ) 2 +ω2(μ2+μ) 2 ; A4. Select the threshold according to the maximum inter-class variance. The formula is as follows: t=arg t∈(0.255) maxσ 2 (t); A5. Perform subtraction operations on the corresponding pixels of the image of the crack of the corrugated pipe to be tested and the image with the inverted grayscale value one by one according to the calculation formula. The calculation formula is as follows: Where: I s (i, j) is the grayscale value of the pixel after subtraction, I3(i, j) is the grayscale value of the pixel in the original image, and I4(i, j) is the grayscale value of the pixel in the image after the grayscale is inverted.
4. The high compression ratio vacuum bellows visual inspection system according to claim 2, characterized in that: The structural element matrices a1 and a2 in the morphological opening operation unit (23) are respectively: The opening operation processing formula is:
5. The high compression ratio vacuum bellows visual inspection system according to claim 2, characterized in that: In the outline framing unit (24), the specific tracking process is as follows: B1. During the tracking process, the threshold T is determined by calculating the maximum inter-class variance method on the smoothed image. The upper left corner of the smoothed image is taken as the starting point, and the pixels in the smoothed image are traversed from top to bottom and from left to right. B2. When a pixel has a grayscale value greater than the threshold value T, the point is used as the center of the eight-neighborhood and the search is performed clockwise. If there are no pixels with grayscale values greater than the threshold value T around it, the search continues from the point. If there are pixels with grayscale values greater than the threshold value T around it, the point is recorded and the center of the eight-neighborhood is moved there. The search is repeated clockwise until a pixel that does not meet the threshold value T is encountered and the search is stopped. B3. After finding a contour, jump out and continue to traverse from the largest column of the previous contour to the right in a top-down order to find the contour until all columns are traversed and then exit. The points recorded during the traversal process are the boundary points of the light bar.
6. The high compression ratio vacuum bellows visual inspection system according to claim 2, characterized in that: When the center line extraction unit (25) calculates the grayscale centroid coordinates of the light strip cross section as the center point, the calculation formula is as follows: Where: x j is the row coordinate of the center point of each cross section of the light strip, ω j is the width of each section of the light strip, i up is the starting point for calculating each cross section of the light strip, and I(i,j) is the grayscale value of the pixel in the i-th row and j-th column.
7. The high compression ratio vacuum bellows visual inspection system according to claim 1, characterized in that: When the feature point extraction unit (3) uses horizontal projection to implement the first step of ROI screening, the widths of the useful curve light strip part and the straight line part to be removed on the horizontal axis are compared, that is, the number of continuous rows containing white points in the two areas is compared in the center line image, and the area with more continuous rows is selected, which represents the part of the curve area where the crack feature point is located.
8. The high compression ratio vacuum bellows visual inspection system according to claim 1, characterized in that: The pattern recognition in the crack defect recognition unit (4) is to determine the category to which the ROI range image belongs through the marked samples, and specifically includes the following steps: C1. Use vector z to represent a grayscale image with image size of image height h × image width w, that is: Where: R is the real number field; C2, vector z can be generated by arranging the pixels of the image one by one according to the principle of row or column priority. Assuming that the number of sample images is n, the n sample images can form a matrix Z. The image to be detected is regarded as a linear combination of the sample images. Let u be any image to be detected, that is: Where: V is the coefficient vector composed of n real coefficients, z0~z n-1 It is a vector composed of n sample images arranged one by one according to the principle of row or column priority; C3. For the identification of vacuum bellows crack defects, the suspected defect area SDR in the Z matrix can be divided into two categories: defects and noise; C4. The coefficients in the coefficient vector V that are not 0 are related to the type of u, and the coefficients that are not related to the type of u are 0. Therefore, V can be used to determine whether u is a defect or noise. From the perspective of image recognition, the higher the sparsity of V, the more conducive it is to the recognition of u. By introducing the penalty function g(v), we have: Where: λ is the penalty function coefficient; C5. The category of the image to be detected can be determined based on the distribution of coefficients in the coefficient vector. Based on this, the following judgment standard formula is proposed. When the standard formula is met, the SDR image to be detected can be determined to be a real defect, otherwise it is determined to be noise. The standard formula is as follows:
Citation Information
Patent Citations
Double-wall corrugated pipe production quality detection process
CN117214085A
Metal surface defect image recognition non-destructive testing device and method
CN107782733A
Method for item identification and classification and defect detection based on machine vision
CN108647706A
Seamless steel tube quality detection method based on image processing
CN118334028A
Cited By
Dam crack propagation prediction method and system based on digital twinborn simulation
CN122366197A