Laser hole classification method based on support vector machine

Through the method based on the support vector machine, the features of laser hole images are extracted and processed, and the problems of low manual recognition accuracy and difficult neural networks to recognize unbroken and semi-broken penetration in the prior art are solved, thereby achieving efficient and accurate hole classification.

CN119810059AActive Publication Date: 2025-04-11SICHUAN RES INST OF SHANGHAI JIAOTONG UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411882893.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-11
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

In the prior art, the accuracy of manually identifying laser holes is low, and it is difficult for neural networks to accurately identify unbroken and semi-broken conditions under different processing materials and shooting environments.

Method used

Using a support vector machine-based method, by acquiring and processing the hole punched image of the laser processing cooling hole, extracting the inner and outer contours, calculating the weighted distance and the total area of ​​the inverse threshold color blocks of the central area and the annular zone, and inputting the support vector machine for classification.

Benefits of technology

Accurate identification of laser hole types is achieved, recognition efficiency and accuracy are improved, and dependence on a large number of data sets is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810059A_ABST
    Figure CN119810059A_ABST
Patent Text Reader

Abstract

The invention discloses a laser hole classification method based on a support vector machine, and the method comprises the steps: obtaining a punching image, converting the punching image into a gray image, and carrying out the reverse operation of a gray value, and obtaining a reverse image; binarizing the reverse image according to the statistical threshold A, and extracting the maximum contour in the binarized image as an inner contour; binarizing the reverse image according to the statistical threshold B, and extracting the maximum contour in the binarized image as an outer contour; determining a central area of an area where the inner contour is located, and taking a part, which does not belong to the inner contour, in the outer contour as an annular belt area; counting a plurality of color blocks formed by pixel points of which the pixel values are lower than the threshold values of the corresponding regions in the central region and the girdle region, and respectively obtaining weighted distances of the central region and the girdle region according to the areas of the color blocks of the central region and the girdle region; and inputting the weighted distance of the central region and the annular region and the total area of the respective inverse threshold color blocks into a support vector machine for classification to obtain a classification result of the cooling holes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to image classification technology, and in particular to a laser hole classification method based on a support vector machine. Background Art

[0002] Aircraft engines are one of the most important parts of aircraft, which can provide sufficient power for aircraft to climb and fly. As the core component of aircraft engines, the design and manufacturing level and working performance of turbine blades affect the service life of aircraft engines. The cooling of turbine blades is mainly achieved through the combined effect of internal flow cooling and external air film cooling. It can effectively avoid the phenomenon of excessive operating temperature of aircraft engines, and at the same time further improve the performance of aircraft engines, ensure the normal operation of aircraft engines, and ensure the safe operation of space shuttles. Therefore, the normality of cooling holes is crucial to the normal operation of aircraft engines. Due to the special small size of the cooling holes of aircraft engines, laser processing is generally used. However, laser processing has certain instability, which may cause the processed cooling holes to appear in two abnormal situations: not punched through and half punched through. Therefore, it is necessary to inspect the holes. At present, it is mainly based on the hole pictures taken manually, and the identification is one by one. This method is inefficient and has a certain probability of misjudgment. If a neural network is used to automatically extract hole features from hole images, and a classification neural network is learned and constructed, the existing neural network method is limited by the need to use a large number of pictures for labeling. In addition, since the backgrounds of the various hole states are different, the performance of undrilled and half-drilled holes varies under different processing materials and shooting environments, which makes it extremely difficult to train the neural network to produce an accurate and effective model. Summary of the invention

[0003] In view of the above-mentioned deficiencies in the prior art, the laser hole classification method based on support vector machine provided by the present invention solves the problems of low accuracy of manual recognition in the prior art and the inability of neural networks to accurately identify the situations of non-penetration and half-penetration.

[0004] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is:

[0005] A method for laser hole classification based on support vector machine is provided, which comprises the steps of:

[0006] S1, obtaining a punching image of a laser-processed cooling hole of an aero-engine, converting it into a grayscale image, and performing a reverse operation on the grayscale value of the grayscale image to obtain a reverse image;

[0007] S2, binarizing the reverse image according to the statistical threshold A, extracting the maximum contour and its contour center in the binarized image, and taking the maximum contour as the inner contour;

[0008] S3, binarizing the reverse image according to the statistical threshold B, extracting the maximum contour and its contour center in the binarized image, and taking the maximum contour as the outer contour;

[0009] S4. According to the inner contour and the outer contour, determine the central area of ​​the area where the inner contour is located, and use the part of the outer contour that does not belong to the inner contour as the annular zone area;

[0010] S5, counting multiple color blocks consisting of pixel points whose pixel values ​​in the central area and the annular area are lower than the threshold value of the corresponding area, calculating the area of ​​each color block, counting the total area of ​​the color blocks in the central area and the annular area as the total area of ​​the anti-threshold color blocks, and calculating the distance from the contour center to the contour center of the outer contour;

[0011] S6. Perform distance weighting according to the areas of the color blocks in the central area and the annular area to obtain weighted distances of the central area and the annular area respectively;

[0012] S7. The weighted distance between the central area and the annular area and the total area of ​​the anti-threshold color block are input into a support vector machine for classification to obtain a classification result of the cooling holes; the types of cooling holes include normal penetration, half penetration and non-penetration.

[0013] Furthermore, the method for determining the central area includes:

[0014] S41. Take the center of the inner contour as the center, make several rays, record the intersection of the rays and the inner contour, get several line segments, and take the average value of all line segments as the radius r of the equivalent circle in ;

[0015] S42. According to the length of all line segments and the radius r of the equivalent circle in , calculate the skewness W and roundness D of the equivalent circle corresponding to the inner contour:

[0016]

[0017] Among them, C in is the contour center of the inner contour; C out is the contour center of the outer contour; r max is the length of the longest line segment; r min is the length of the shortest line segment; D is the roundness.

[0018] S43, determine whether any value of the skewness W and the roundness D meets the corresponding threshold condition. If so, the overlapping area of ​​the equivalent circle and the inner contour in step S41 is taken as the central area, otherwise the area where the inner contour is located is taken as the central area.

[0019] Furthermore, the threshold condition of the skewness W is W>0.382*0.618, and r in / rout <0.5, r out is the radius of the equivalent circle of the outer contour, and its acquisition method is the same as r in The acquisition method is the same; the threshold condition of the roundness D is D>0.382*0.618.

[0020] Furthermore, step S7 further includes:

[0021] S71, the weighted distance of the central area and the total area of ​​the anti-threshold color block S all,x Input the first support vector machine for classification to obtain the classification result of the cooling hole;

[0022] S72, determining whether the classification result is a punch-through type, if so, proceeding to step S73, otherwise directly outputting the classification result;

[0023] S73, inputting the weighted distance of the annular zone and the total area of ​​the anti-threshold color block into the second support vector machine for classification, and obtaining the classification result of the cooling hole.

[0024] Furthermore, the expression of weighted distance is:

[0025]

[0026] Where x is a variable. When its value is 1, it indicates the central area, and when its value is 2, it indicates the annular area. x is the total number of color blocks in x; C i,x is the distance from the center of the outline of the i-th color block in x to the center of the outer contour; S i,x is the contour area of ​​the i-th color block in x; r out is the radius of the equivalent circle of the outer contour; S all,x is the total area of ​​all color blocks in x; is the weighted distance corresponding to x.

[0027] Furthermore, the method for obtaining the statistical threshold A and the statistical threshold B includes:

[0028] A1. Binarize the reverse image according to a preset pixel range to obtain a binary image A, and extract the maximum contour A and the center position A of the maximum contour A in the binary image A;

[0029] A2, counting the number of pixel points in the binary image A whose pixel values ​​are greater than the first threshold, converting the counted number of pixel points into the area of ​​a weighted equivalent circle, and calculating the equivalent radius A of the weighted equivalent circle;

[0030] A3, counting the pixel values ​​inside a circle drawn with the center position A as the center and the equivalent radius A as the radius, and using the reverse weighted calculation statistical threshold A according to the pixel values ​​in ascending order within the circle;

[0031] A4. Binarize the reverse image according to the statistical threshold A to obtain a binary image B, and extract the maximum contour B and the center position B of the maximum contour B in the binary image B;

[0032] A5, binarizing the maximum contour area B, and performing a reverse operation to obtain a first mask; converting the pixel points of the maximum contour area B into the area of ​​an equivalent circle, and calculating the equivalent radius B of the equivalent circle;

[0033] A6, taking the center position B as the center and the preset multiple of the equivalent radius B as the radius to obtain a circle B, and performing binarization processing on the part outside the circle B area to obtain a second mask;

[0034] A7, overlapping the first mask and the second mask, performing inverse calculation on the pixel values ​​of the circular area to obtain a statistical area, and calculating a statistical threshold B by inverse weighting according to the ascending pixel values ​​in the statistical area.

[0035] Furthermore, the method for extracting the maximum contour in step S2, step S3, step A1 and step A4 is:

[0036] The dilation function, erosion function and denoising function in the opencv2 software are used to process the binary image, and then the contour recognition function of opencv2 is used to identify the contour to obtain the maximum contour in the binary image;

[0037] The method for extracting the center position of the maximum contour in step S2, step S3, step A1 and step A4 is: using the center extraction function in the opencv2 software to extract the center position of the maximum contour.

[0038] Furthermore, the expressions of the statistical threshold A and the statistical threshold B calculated by reverse weighting are both:

[0039]

[0040] Where k is a variable, Th1 is the statistical threshold A, Th2 is the statistical threshold B; V p,k , P k 、V i,k and N k are the weight distribution rate corresponding to k, the number division rate, the i-th pixel value in the region in ascending order, and the total number of i-th pixel values ​​in the region; M p,k and V p,k are the intermediate variables corresponding to k respectively; is the mean parameter corresponding to k;

[0041] The central area corresponds to the area threshold th c =Th1; the corresponding area threshold of the ring area: th b=Th2*0.9; the expression of the first threshold Th1 is Th1=0.618*255.

[0042] Furthermore, the calculation formula of the equivalent radius A in step A2 is:

[0043]

[0044] Among them, r A is the equivalent radius A; S A is the area of ​​the weighted equivalent circle of the maximum contour A; N A is the number of pixels counted in the maximum contour A;

[0045] The calculation formulas for the equivalent radius B in A5 are:

[0046]

[0047] Among them, r B is the equivalent radius B; S B is the area of ​​the equivalent circle corresponding to the maximum contour B; N B is the number of pixels counted in the maximum contour B.

[0048] Further, according to the preset pixel range, the method of performing binarization processing on the reverse image is: setting the pixel values ​​in the reverse image within the preset pixel range to 255, and setting the remaining pixel values ​​to 0;

[0049] In step S2 and step A4, according to the statistical threshold A, the method of binarizing the reverse image is as follows: setting the pixel values ​​in the reverse image that are greater than the statistical threshold A to 255, and setting the remaining pixel values ​​to 0;

[0050] In step S3 and step A5, according to the statistical threshold B, the method of binarizing the reverse image is as follows: the pixel values ​​in the reverse image that are greater than the statistical threshold B are set to 255, and the remaining pixel values ​​are set to 0.

[0051] Compared with the prior art, the present invention has the following beneficial effects:

[0052] (1) This scheme can accurately extract the inner and outer contours by setting the threshold. On this basis, it can accurately and automatically extract the features of the perforation state of the corresponding image (two weighted distances). Then, combined with the trained support vector machine, it can accurately identify the type of laser-processed holes. Compared with manual work, it is more convenient, efficient and accurate. Compared with the calibration and processing of neural networks for images, it does not require a large amount of data sets as initial training.

[0053] (2) When performing image processing, this scheme can automatically extract the weighted distance between the central area and the annular area. Then, combined with the support vector machine, it can greatly reduce the workload of operators, achieve highly automated recognition and classification processing, and improve the efficiency of hole detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 Flowchart of a method for laser hole classification based on support vector machine.

[0055] Figure 2 It is the original image of the punched image that needs edge extraction.

[0056] Figure 3 A visualization of the grayscale pixel value distribution of the image.

[0057] Figure 4 It is the inverse grayscale image of pixel value.

[0058] Figure 5 To roughly process the binary image.

[0059] Figure 6 Binarized image for dilation and corrosion denoising.

[0060] Figure 7 Schematic diagram of the maximum contour B.

[0061] Figure 8 is the first mask image.

[0062] Fig. 9 For the second mask image.

[0063] Fig.10 It is a statistical area map of the ring threshold.

[0064] Fig.11 This is the outer contour effect diagram.

[0065] Fig.12 These are two typical pictures of cooling holes being drilled normally.

[0066] Fig.13 Here are two pictures of typical cooling holes that are half-drilled.

[0067] Fig.14 Here are two typical pictures of cooling holes that have not been drilled.

[0068] Fig.15 These are side photos of circles in three different states (normal penetration, half penetration and not penetrated).

[0069] Fig.16 Schematic diagram of the area after the punched image is processed, where (a) is a schematic diagram of the inner contour, (b) is a schematic diagram of the outer contour, and (c) is a schematic diagram of the annular area.

[0070] Fig.17 Schematic diagram of the formation of the central area, where (a) is the equivalent circle of the inner contour; (b) is the central area formed by the overlap of the inner contour and the equivalent circle of the inner contour; (c) is the central area formed by the inner contour.

[0071] Fig.18 Schematic diagrams of three strange states of unpierced circles; (a) is a schematic diagram of a sieve circle; (b) is a schematic diagram of a crescent circle; and (d) is a schematic diagram of a deformed circle.

[0072] Fig.19 It is the anti-threshold color block distribution diagram of the center area of ​​the circle and the strip area of ​​three types (normal penetration, half penetration and no penetration). DETAILED DESCRIPTION

[0073] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.

[0074] When classifying the cooling holes processed in the punching image, the types include punched through and not punched through, among which the punched through includes half punched through and normal punched through. That is, the cooling holes are classified into three types: half punched through, normal punched through and not punched through. For ease of understanding, this scheme provides the top view and side view of normal punched through, half punched through and not punched through. For details, please refer to Figure 12 to Figure 15 .

[0075] refer to Figure 1 , Figure 1 A flow chart of a method for laser hole classification based on support vector machine is shown; Figure 1 As shown, the method S includes steps S1 to S7.

[0076] In S1, a drilling image of a cooling hole of an aero-engine is obtained by laser processing (a schematic diagram of the drilling image can be referred to Figure 2 ) and convert it into a grayscale image (a schematic diagram of a grayscale image can be found in Figure 3 ), perform the reverse operation on the grayscale value of the grayscale image to obtain the reverse image (a schematic diagram of the reverse image can be referred to Figure 4 ).

[0077] During implementation, the solution preferably converts the punched image into a grayscale image using the expression:

[0078] V=0.299*R+0.587*G+0.114*B

[0079] Among them, V is the gray value; R is the red component; G is the green component; B is the blue component;

[0080] The expression for the reverse operation is:

[0081] V`=255-V

[0082] Wherein, V` is the value after V is reversed.

[0083] In step S2, the reverse image is binarized according to the statistical threshold A, and the maximum contour and its contour center in the binarized image are extracted, and the maximum contour is used as the inner contour. The schematic diagram of the inner contour can be referred to Fig.16 (a) in .

[0084] In step S3, the reverse image is binarized according to the statistical threshold B, and the maximum contour and its contour center in the binarized image are extracted, and the maximum contour is used as the outer contour. The schematic diagram of the outer contour can be referred to Fig.16 (b) in .

[0085] In one embodiment of the present invention, a method for obtaining the statistical threshold A and the statistical threshold B includes:

[0086] A1. Binarize the reverse image according to the preset pixel range to obtain a binary image A (a schematic diagram of the binary image A can be referred to Figure 5 ), and extract the maximum contour A and the center position A of the maximum contour A in the binary image A; according to the preset pixel range, the method for binarizing the reverse image is: setting the pixel values ​​in the reverse image within the preset pixel range to 255, and setting the remaining pixel values ​​to 0; wherein the preset pixel range is 60-255.

[0087] A2. Count the number of pixel points in the binary image A whose pixel values ​​are greater than the first threshold, convert the counted number of pixel points into the area of ​​a weighted equivalent circle, and calculate the equivalent radius A of the weighted equivalent circle; when implemented, this scheme preferably calculates the expression of the first threshold Th1 as Th1=0.618*255.

[0088] The calculation formula for the equivalent radius A in step A2 is:

[0089]

[0090] Among them, r A is the equivalent radius A; S A is the area of ​​the weighted equivalent circle of the maximum contour A; N A is the number of pixels counted in the maximum contour A;

[0091] A3, counting the pixel values ​​inside a circle drawn with the center position A as the center and the equivalent radius A as the radius, and using the reverse weighted calculation statistical threshold A according to the pixel values ​​in ascending order within the circle;

[0092] A4. According to the statistical threshold A, the reverse image is binarized to obtain the binarized image B, and the maximum contour B and the maximum contour B in the binarized image B are extracted (for details, please refer to Figure 7 )'s center position B; in step S2 and step A4, according to the statistical threshold A, the method for binarizing the reverse image is: setting the pixel values ​​in the reverse image that are greater than the statistical threshold A to 255, and setting the remaining pixel values ​​to 0.

[0093] A5. Binarize the largest contour area B and perform the reverse operation to obtain the first mask (see Figure 8 ); convert the pixel points of the maximum contour B area into the area of ​​the equivalent circle, and calculate the equivalent radius B of the equivalent circle. In step S3 and step A5, according to the statistical threshold B, the method of binarizing the reverse image is: set the pixel values ​​in the reverse image that are greater than the statistical threshold B to 255, and set the remaining pixel values ​​to 0.

[0094] The calculation formula for the equivalent radius B in step A5 is:

[0095]

[0096] Among them, r B is the equivalent radius B; S B is the area of ​​the equivalent circle corresponding to the maximum contour B; N B is the number of pixels counted in the maximum contour B.

[0097] A6. With the center position B as the center and the preset multiple of the equivalent radius B as the radius, circle B is obtained. The part outside the circle B area is binarized to obtain the second mask (reference Fig. 9 ); The preset multiple is preferably 2.5 to 2.8, and the best value is 2.5.

[0098] A7. Overlap the first mask and the second mask, and perform inverse calculation on the pixel values ​​of the circular area to obtain the statistical area (refer to Fig.10 ), according to the ascending pixel values ​​in the statistical area, the statistical threshold B is calculated by reverse weighting.

[0099] This scheme adjusts the threshold by performing certain weighted operations based on the number of pixels inside the extracted contour and the distribution characteristics of the pixel values, and performs more accurate local statistics on the characteristics of the hole edges, making the statistical thresholds A and B more accurate, thereby greatly improving the accuracy of the final contour extraction and hole classification.

[0100] In step S4, the center area of ​​the area where the inner contour is located is determined based on the inner contour and the outer contour, and the part of the outer contour that does not belong to the inner contour is used as the annular area. The schematic diagram of the annular area can be referred to Fig.16 (c) in .

[0101] In one embodiment of the present invention, the method for determining the central area includes:

[0102] S41. Take the center of the inner contour as the center, make several rays (in this solution, it is preferred to make one ray for each degree increase in the central angle), record the intersection position of the ray and the inner contour, obtain several line segments, and take the average value of all line segments as the radius r of the equivalent circle in , the schematic diagram of the equivalent circle of the inner contour can be referred to Fig.17 (a) in .

[0103] S42. According to the length of all line segments and the radius r of the equivalent circle in , calculate the skewness W and roundness D of the equivalent circle corresponding to the inner contour:

[0104]

[0105] Among them, C in is the contour center of the inner contour; C out is the contour center of the outer contour; r max is the length of the longest line segment; r min is the length of the shortest line segment; D is the roundness.

[0106] S43, determine whether any value of the skewness W and the roundness D meets the corresponding threshold condition. If so, the overlapping area of ​​the equivalent circle and the inner contour in step S41 is taken as the central area. For details, please refer to Fig.17 Otherwise, the area where the inner contour is located is taken as the central area. For details, please refer to Fig.17 (c) in .

[0107] This scheme defines the central area to take into account the sieve circle (see Fig.18 Middle (a)), crescent (see Fig.18 (b)), deformed circle (see Fig.18 In special cases such as (c), it is necessary to avoid the situation where only part of the inner contour is detected at the inner contour position, which affects the determination of the annular area and further affects the detection of subsequent classification.

[0108] Among them, the threshold condition of skewness W is W>0.382*0.618, and r in / r out <0.5, r out is the radius of the equivalent circle of the outer contour, and its acquisition method is the same as r inThe acquisition method is the same; the threshold condition of the roundness D is D>0.382*0.618.

[0109] In step S5, multiple color blocks consisting of pixel points whose pixel values ​​in the central area and the annular area are lower than the threshold value of the corresponding area are counted, the area of ​​each color block is calculated, the total area of ​​the color blocks in the central area and the annular area is counted as the total area of ​​the anti-threshold color blocks, and the distance from the contour center to the contour center of the outer contour is calculated;

[0110] In step S6, distance weighting is performed according to the areas of the color blocks in the central area and the annular area to obtain weighted distances of the central area and the annular area, respectively, wherein the expression of the weighted distance is:

[0111]

[0112] Where x is a variable. When its value is 1, it indicates the central area, and when its value is 2, it indicates the annular area. x is the total number of color blocks in x; C i,x is the distance from the center of the outline of the i-th color block in x to the center of the outer contour; S i,x is the contour area of ​​the i-th color block in x; r out is the radius of the equivalent circle of the outer contour; S all,x is the total area of ​​all color blocks in x; is the weighted distance corresponding to x.

[0113] In step S7, the weighted distance between the central area and the annular area and the total area of ​​the anti-threshold color block are input into the support vector machine for classification to obtain the classification result of the cooling holes; the types of cooling holes include normal penetration, half penetration and non-penetration.

[0114] During implementation, the preferred step S7 of this solution further includes:

[0115] S71, inputting the weighted distance of the central area and the total area of ​​the anti-threshold color block into the first support vector machine for classification, to obtain the classification result of the cooling hole;

[0116] S72, determining whether the classification result is a punch-through type, if so, proceeding to step S73, otherwise directly outputting the classification result (not punched through);

[0117] S73, inputting the weighted distance of the annular zone and the total area of ​​the anti-threshold color block into the second support vector machine for classification, and obtaining the classification result of the cooling hole (normal penetration or half penetration).

[0118] When training the first support vector machine and the second support vector machine, this scheme obtains a number of perforated images including normal perforation, half perforation and non-perforation, and adopts the method of steps S1 to S6 of this scheme to obtain the weighted distance between the central area and the annular area and the total area of ​​the anti-threshold color block respectively for these images; the weighted distance of the central area, the total area of ​​the anti-threshold color block and the label (here the labels for half perforation and normal perforation are both perforated, and the label for non-perforation remains as non-perforation) are used as the data set to train the first support vector machine.

[0119] The weighted distances and total areas of the annular zones corresponding to all labels of half-drilling and normal drilling, as well as the anti-threshold color blocks, are used as training sets to train the second support vector machine. The labels of the drilling images can be obtained by looking at the side view of the cooling hole processed by the laser (see Fig.15 ) to confirm.

[0120] In one embodiment of the present invention, the method of extracting the maximum contour in step S2, step S3, step A1 and step A4 is:

[0121] The dilation function, corrosion function and denoising function in opencv2 software are used to process the binary image. The processed image can be referred to Figure 6 , and then use the contour recognition function of opencv2 to identify the contour and obtain the maximum contour in the binary image;

[0122] The method for extracting the center position of the maximum contour in step S2, step S3, step A1 and step A4 is: using the center extraction function in the opencv2 software to extract the center position of the maximum contour.

[0123] During implementation, in the preferred step A1 of this scheme, when extracting the maximum contour, the kernel of the dilation function is 3*3, the kernel of the erosion function is 3*3, the kernel of the denoising function is 5*5, the dilation and erosion are iterated once, and the denoising is performed once.

[0124] In one embodiment of the present invention, the expressions of the statistical threshold A and the statistical threshold B calculated by inverse weighting are both:

[0125]

[0126] Where k is a variable, Th1 is the statistical threshold A, Th2 is the statistical threshold B; V p,k , P k 、V i,k and N k are the weight distribution rate corresponding to k, the number division rate, the i-th pixel value in the region in ascending order, and the total number of i-th pixel values ​​in the region; M p,k and V p,k are the intermediate variables corresponding to k respectively; is the mean parameter corresponding to k;

[0127] The central area corresponds to the area threshold th c =Th1; the corresponding area threshold of the ring area: th b =Th2*0.9; the expression of the first threshold Th1 is Th1=0.618*255.

[0128] When calculating the statistical threshold A, the corresponding weight distribution rate is 30%, and the quantity division rate is 70%; when calculating the statistical threshold B, the corresponding weight distribution rate is 61.8%, and the quantity division rate is 70%.

[0129] In summary, the classification algorithm provided by this solution solves the inefficiency of the existing traditional method of manually judging and classifying punched pictures, effectively improves the accuracy of identifying the hole status, and greatly improves the efficiency of hole classification.

Claims

1. A method for laser hole classification based on support vector machine, characterized in that: Includes steps: S1, obtaining a punching image of a laser-processed cooling hole of an aero-engine, converting it into a grayscale image, and performing a reverse operation on the grayscale value of the grayscale image to obtain a reverse image; S2, binarizing the reverse image according to the statistical threshold A, extracting the maximum contour and its contour center in the binarized image, and taking the maximum contour as the inner contour; S3, binarizing the reverse image according to the statistical threshold B, extracting the maximum contour and its contour center in the binarized image, and taking the maximum contour as the outer contour; S4. According to the inner contour and the outer contour, determine the central area of ​​the area where the inner contour is located, and use the part of the outer contour that does not belong to the inner contour as the annular zone area; S5, counting multiple color blocks consisting of pixel points whose pixel values ​​in the central area and the annular area are lower than the threshold value of the corresponding area, calculating the area of ​​each color block, counting the total area of ​​the color blocks in the central area and the annular area as the total area of ​​the anti-threshold color blocks, and calculating the distance from the contour center to the contour center of the outer contour; S6. Perform distance weighting according to the color block areas of the central area and the annular area to obtain weighted distances of the central area and the annular area respectively; S7. The weighted distance between the central area and the annular area and the total area of ​​the anti-threshold color block are input into a support vector machine for classification to obtain a classification result of the cooling holes; the types of cooling holes include normal penetration, half penetration and non-penetration.

2. The method for laser hole classification based on support vector machine according to claim 1, characterized in that: Methods for determining the central area include: S41. Take the center of the inner contour as the center, make several rays, record the intersection of the rays and the inner contour, get several line segments, and take the average value of all line segments as the radius r of the equivalent circle in ; S42. According to the length of all line segments and the radius r of the equivalent circle in , calculate the skewness W and roundness D of the equivalent circle corresponding to the inner contour: Among them, C in is the contour center of the inner contour; C out is the contour center of the outer contour; r max is the length of the longest line segment; r min is the length of the shortest line segment; D is the roundness. S43, determine whether any value of the skewness W and the roundness D meets the corresponding threshold condition. If so, the overlapping area of ​​the equivalent circle and the inner contour in step S41 is taken as the central area, otherwise the area where the inner contour is located is taken as the central area.

3. The method for laser hole classification based on support vector machine according to claim 2, characterized in that: The threshold condition of the skewness W is W>0.382*0.618, and r in / r out <0.5, r out is the radius of the equivalent circle of the outer contour, and its acquisition method is the same as r in The acquisition method is the same; the threshold condition of the roundness D is D>0.382*0.

618.

4. The method for laser hole classification based on support vector machine according to claim 1, characterized in that: Step S7 further comprises: S71, inputting the weighted distance of the central area and the total area of ​​the anti-threshold color block into the first support vector machine for classification, to obtain the classification result of the cooling hole; S72, determining whether the classification result is a punch-through type, if so, proceeding to step S73, otherwise directly outputting the classification result; S73, inputting the weighted distance of the annular zone and the total area of ​​the anti-threshold color block into the second support vector machine for classification, and obtaining the classification result of the cooling hole.

5. The method for laser hole classification based on support vector machine according to claim 1, characterized in that: The expression of weighted distance is: Where x is a variable. When its value is 1, it indicates the central area, and when its value is 2, it indicates the annular area. x is the total number of color blocks in x; C i,x is the distance from the center of the outline of the i-th color block in x to the center of the outer contour; S i,x is the contour area of ​​the i-th color block in x; r out is the radius of the equivalent circle of the outer contour; S all,x is the total area of ​​all color blocks in x; is the weighted distance corresponding to x.

6. The method for laser hole classification based on support vector machine according to claim 1, characterized in that: The method for obtaining the statistical threshold A and the statistical threshold B includes: A1. Binarize the reverse image according to a preset pixel range to obtain a binary image A, and extract the maximum contour A and the center position A of the maximum contour A in the binary image A; A2, counting the number of pixel points in the binary image A whose pixel values ​​are greater than the first threshold, converting the counted number of pixel points into the area of ​​a weighted equivalent circle, and calculating the equivalent radius A of the weighted equivalent circle; A3, counting the pixel values ​​inside a circle drawn with the center position A as the center and the equivalent radius A as the radius, and using the reverse weighted calculation statistical threshold A according to the pixel values ​​in ascending order within the circle; A4. Binarize the reverse image according to the statistical threshold A to obtain a binary image B, and extract the maximum contour B and the center position B of the maximum contour B in the binary image B; A5, binarizing the maximum contour area B, and performing a reverse operation to obtain a first mask; converting the pixel points of the maximum contour area B into the area of ​​an equivalent circle, and calculating the equivalent radius B of the equivalent circle; A6, taking the center position B as the center and the preset multiple of the equivalent radius B as the radius to obtain a circle B, and performing binarization processing on the part outside the circle B area to obtain a second mask; A7, overlapping the first mask and the second mask, performing inverse calculation on the pixel values ​​of the circular area to obtain a statistical area, and calculating a statistical threshold B by inverse weighting according to the ascending pixel values ​​in the statistical area.

7. The method for laser hole classification based on support vector machine according to claim 6, characterized in that: The method for extracting the maximum contour in step S2, step S3, step A1 and step A4 is: The dilation function, erosion function and denoising function in the opencv2 software are used to process the binary image, and then the contour recognition function of opencv2 is used to identify the contour to obtain the maximum contour in the binary image; The method for extracting the center position of the maximum contour in step S2, step S3, step A1 and step A4 is: using the center extraction function in the opencv2 software to extract the center position of the maximum contour.

8. The method for laser hole classification based on support vector machine according to claim 6, characterized in that: The expressions of the statistical threshold A and the statistical threshold B calculated by reverse weighting are: M p,k =N k *P k Where k is a variable, Th1 is the statistical threshold A, Th2 is the statistical threshold B; V p,k , P k 、V i,k and N k are the weight distribution rate corresponding to k, the number division rate, the i-th pixel value in the region in ascending order, and the total number of i-th pixel values ​​in the region; M p,k and V p,k are the intermediate variables corresponding to k respectively; is the mean parameter corresponding to k; The central area corresponds to the area threshold th c =Th1; the corresponding area threshold of the ring area: th b =Th2*0.9; the expression of the first threshold Th1 is Th1=0.618*255.

9. The method for laser hole classification based on support vector machine according to claim 6, characterized in that: The calculation formula for the equivalent radius A in step A2 is: S A =N A *0.618 Among them, r A is the equivalent radius A; S A is the area of ​​the weighted equivalent circle of the maximum contour A; N A is the number of pixels counted in the maximum contour A; The calculation formulas for the equivalent radius B in A5 are: S B =N B *0.618 Among them, r B is the equivalent radius B; S B is the area of ​​the equivalent circle corresponding to the maximum contour B; N B is the number of pixels counted in the maximum contour B.

10. The method for laser hole classification based on support vector machine according to claim 6, characterized in that: According to the preset pixel range, the method of binarizing the reverse image is as follows: setting the pixel values ​​in the reverse image within the preset pixel range to 255, and setting the remaining pixel values ​​to 0; In step S2 and step A4, according to the statistical threshold A, the method of binarizing the reverse image is as follows: setting the pixel values ​​in the reverse image that are greater than the statistical threshold A to 255, and setting the remaining pixel values ​​to 0; In step S3 and step A5, according to the statistical threshold B, the method of binarizing the reverse image is as follows: the pixel values ​​in the reverse image that are greater than the statistical threshold B are set to 255, and the remaining pixel values ​​are set to 0.

Citation Information

Patent Citations

  • Lunar surface rock detection method based on super-pixel description

    CN103871062A

  • Sound hole defect detection method and system for cellphone glass panel

    CN105321182A

  • Electric power well chamber wall surface hole identification method and device, electronic equipment and storage medium

    CN115482373A