Visual inspection method and system for laser cutting product

By setting up a camera on the laser cutting machine, the low-frequency and high-frequency subband characteristic values ​​of the image are detected and analyzed in real time, the problems of low accuracy and low automation in traditional laser cutting processes are solved, and efficient and automated defect detection and products are achieved Quality improvement.

CN119399722AActive Publication Date: 2025-02-07SHENZHEN JIZI OPTICAL TECHNOLOGY CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411539520.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-07
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

Traditional laser cutting processes have problems such as slow speed, low accuracy and low automation, resulting in reduced product qualification rates and waste of materials.

Method used

The laser cutting product visual detection method based on real-time camera detection is adopted. By filtering and extracting the collected images and calculating the characteristic values ​​of low-frequency and high-frequency subbands, we determine whether the product has hole depressions, cracks and edge defects.

Benefits of technology

High-precision and automated defect detection of laser cutting products is achieved, production efficiency and product quality are improved, and material waste is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119399722A_ABST
    Figure CN119399722A_ABST
Patent Text Reader

Abstract

The invention discloses a visual detection method and system for a laser cutting product, and the method comprises the steps: collecting a product image obtained through cutting through a camera, and carrying out the filtering of the collected image, and extracting the high-frequency sub-band information and the low-frequency sub-band information; extracting global brightness change characteristics based on the low-frequency sub-band information, and calculating a low-frequency sub-band global brightness change characteristic value as a low-frequency sub-band characteristic value; calculating a high-frequency sub-band texture feature value and an edge feature value based on the high-frequency sub-band information; performing multi-scale fusion on the texture feature value and the edge feature value of the high-frequency sub-band to obtain a high-frequency sub-band feature value; judging whether the low-frequency sub-band characteristic value is greater than a low-frequency sub-band threshold value or not, and judging whether the high-frequency sub-band characteristic value is greater than a high-frequency sub-band threshold value or According to the method, the high-frequency sub-band information and the low-frequency sub-band information are extracted, and the multi-scale and multi-direction feature information of the image is analyzed and extracted, so that the defects of cracks, edges, holes and recesses are effectively classified and identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of laser cutting machine visual inspection, and in particular to a laser cutting product visual inspection method and system. Background Art

[0002] Laser cutting is a high-precision processing technology that is widely used in the processing of metal and non-metal materials. The laser cutting machine will focus the laser emitted from the laser into a high-power density laser beam through the optical path system. As the relative position of the beam and the workpiece moves, the material will eventually form a slit, thereby achieving the purpose of cutting. Laser cutting has the characteristics of high precision, high speed, low processing cost, processing of any plane, large-scale whole-plate cutting, and no need to open molds. It will gradually improve or replace traditional metal cutting process equipment. With the rapid development of the manufacturing industry, the demand for high-precision and large-volume mechanical parts is increasing. As a widely used industrial cutting process, laser cutting has the advantages of high flexibility and no contact pressure, and is widely used in modern factories.

[0003] However, the traditional cutting process has disadvantages such as slow speed, low precision and low automation. Usually, quality inspection in the cutting process mainly relies on manual inspection. The traditional manual inspection method is inefficient and easily affected by comprehensive factors such as differences in worker quality, work fatigue, subjective factors and errors in measuring tools, which will lead to a decrease in product qualification rate and unnecessary waste of plates. This is also one of the reasons for the low precision of traditional metal cutting products. Therefore, in order to meet the high-speed and high-precision technical requirements of domestic laser cutting machines, it is crucial to develop an automated and high-precision visual inspection method to improve production efficiency and product quality. Summary of the invention

[0004] The purpose of the present invention is to provide a method and system for visual inspection of laser cut products to solve the deficiencies in the background technology.

[0005] In order to achieve the above object, the present invention provides the following technical solution: a method for visual inspection of laser cut products, the method performs real-time inspection of products based on a camera set on a laser cutting machine, and collects images of products obtained by cutting, comprising the following steps:

[0006] S1, filtering the collected image and extracting high-frequency sub-band information and low-frequency sub-band information;

[0007] S2, extracting the global brightness change characteristics of the surface of the inspected product from the acquired low-frequency sub-band information, and calculating the low-frequency sub-band global brightness change characteristic value as the low-frequency sub-band characteristic value;

[0008] S3, extracting the texture features and edge features of the surface of the inspected product from the acquired high-frequency sub-band information, calculating the texture feature value and edge feature value of the high-frequency sub-band; performing multi-scale fusion on the texture feature value and edge feature value of the high-frequency sub-band to obtain the high-frequency sub-band feature value;

[0009] S4, determining whether the low-frequency sub-band characteristic value is greater than the low-frequency sub-band threshold, and at the same time determining whether the high-frequency sub-band characteristic value is greater than the high-frequency sub-band threshold;

[0010] If the low-frequency sub-band characteristic value is greater than the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is greater than the high-frequency sub-band threshold, it is determined that the inspected product has both hole and concave defects and crack and edge defects;

[0011] If the low-frequency sub-band characteristic value is less than or equal to the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is greater than the high-frequency sub-band threshold, it is determined that the inspected product has only cracks and edge defects;

[0012] If the low-frequency sub-band characteristic value is greater than the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is less than or equal to the high-frequency sub-band threshold, it is determined that the inspected product has only hole and concave defects;

[0013] If the low-frequency sub-band characteristic value is less than or equal to the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is less than or equal to the high-frequency sub-band threshold, it is determined that the inspected product has neither hole or depression defects nor crack or edge defects.

[0014] As a preferred embodiment of the present invention, the step S1 of extracting the high-frequency sub-band information and the low-frequency sub-band information comprises the following steps:

[0015] S11: Apply Daubechies wavelet to perform one-dimensional wavelet decomposition on each row of the input image I(x, y), and calculate the low-frequency part L and the high-frequency part H of each row of the input image;

[0016] S12: Based on the step S11, the Daubechies wavelet is further applied to each column of the input image for two-dimensional decomposition to obtain LL subband, LH subband, HL subband and HH subband:

[0017]

[0018] Wherein, h is the function coefficient of the low-pass filter, g is the function coefficient of the high-pass filter; LL(i,j) is the LL subband, LH(i,j) is the LH subband, HL(i,j) is the HL subband, HH(i,j) is the HH subband, (i,j) is the corresponding image point after the input image I(x,y) is decomposed; I(i,j) is the sub-image after the input image I(x,y) is decomposed;

[0019] S13: define the LL sub-band as low-frequency sub-band information, and define the HL sub-band, HL sub-band and HH sub-band as high-frequency sub-band information.

[0020] As a preferred embodiment of the present invention, the step S2 comprises:

[0021] S21: Calculate the gradient strength G of the low-frequency subband LL(i,j) LL (i,j):

[0022] G LL,x (i,j),G LL,y (i, j) are the low-frequency subband gradients of the image point (i, j) in the x-axis direction and the low-frequency subband gradients in the y-axis direction, respectively.

[0023] S22: Constructing a third-order spherical harmonic illumination model

[0024]

[0025] Where l is the spherical harmonic order, 0≤l≤2; represents the frequency component of the spherical order function; m is an integer that satisfies -l≤m≤l, called the magnetic quantum number; θ and They are the polar angle (or latitude angle) and azimuth angle (or precision angle) in spherical coordinates, 0≤θ≤π, is the associated Legendre polynomial; δ is an imaginary number,

[0026]

[0027] Among them, X, Y and Z are the horizontal coordinate, vertical coordinate and vertical coordinate of the point (x, y) in the two-dimensional image coordinate system corresponding to the input image I(x, y) in the three-dimensional coordinate system respectively;

[0028]

[0029] Among them, (-1) m is the Shortley-Condon phase, η∈[-1,1]; when m=0, P l (x), To seek P l (η) m-th order derivative with respect to the independent variable η;

[0030] S23: Calculate the spherical harmonic coefficients c lm :

[0031]

[0032] S24: Calculate the global brightness change characteristic value of the low-frequency sub-band:

[0033]

[0034] As a preferred embodiment of the present invention, the S3 step comprises:

[0035] S31: Using bandpass filters to extract texture features from the LH subband, HL subband and HH subband obtained in step S12, respectively. The texture feature filter value calculation formula is as follows:

[0036]

[0037] I(i′,j′)=I(i,j)*g(i,j;λ,Φ,ψ,σ,γ);

[0038] Where I(i′,j′) is the smoothed image of image I(i,j) in the two-dimensional pixel coordinate system after being filtered by the Gabor filter; * represents the convolution calculation; Φ is the filter direction, λ is the filter wavelength, σ is the standard deviation of the filter Gaussian function, γ is the spatial aspect ratio, and ψ is the phase offset; the width of image I(x,y) is W and the height is H; i′=i cosΦ+j sinΦ; j′=-i sinΦ+j cosΦ;

[0039] S32: Use the Sobel operator to calculate the horizontal gradient G of the high-frequency subband H,x (i′, j′) and the vertical gradient G H,y (i′,j′):

[0040]

[0041] Among them, H includes LH, HL and HH;

[0042] S33: Calculate the gradient direction β(i′, j′) and gradient value G of the high frequency subband H (i′,j′):

[0043]

[0044] S34: Based on the gradient direction β(i′, j′) of the high frequency sub-band in step S33, non-maximum suppression is performed on the high frequency sub-band;

[0045] For each pixel (i′, j′), compare its gradient direction β(i′, j′) with 180°, 90°, 45°, and 135°;

[0046] If its gradient direction β(i′, j′) is closer to 180°, then further compare the gradient values ​​of the current pixel (i′, j′) with its left pixel and right pixel;

[0047] If its gradient direction β(i′, j′) is closer to 90°, the gradient values ​​of the current pixel (i′, j′) are further compared with those of the upper pixel and the lower pixel;

[0048] If its gradient direction β(i′,j′) is closer to 45° or closer to 135° (, then further compare the gradient values ​​of the current pixel (i′,j′) with its adjacent diagonal pixels;

[0049] In the above-mentioned process of comparing pixel values ​​one by one along the gradient direction, if the pixel (i′, j′) is a local maximum in the corresponding gradient direction, the point is retained; otherwise, its gradient value is set to 0;

[0050] S35: Based on the result of step S34, further performing double threshold detection on the gradient value of pixel (i′, j′) to distinguish strong edge, weak edge and non-edge pixels of the image;

[0051] S36: performing edge tracking processing on the high frequency sub-band image processed in step S35, connecting weak edge pixels of the high frequency sub-band image to strong edges through a hysteresis effect;

[0052] S37: Calculate the high-frequency sub-band feature value based on the high-frequency sub-band information obtained after the dual threshold detection and edge tracking processing.

[0053] As a preferred embodiment of the present invention, the dual threshold detection in step S35 includes:

[0054] S351: Setting high threshold G H,max and low threshold G H,min :

[0055]

[0056] Where M is the total number of pixel horizontal coordinates i′, N is the total number of pixel vertical coordinates j′; Max(G H,max ) is the maximum value of the high-frequency sub-band gradient values ​​of multiple pixels, Min(G H,max ) is the minimum value among the high-frequency sub-band gradient values ​​of multiple pixels;

[0057] S352: If the gradient value G H (i′,j′)>G H,max , then the pixel (i′, j′) is identified as a strong edge pixel;

[0058] If the gradient value G H (i′,j′) <G H,min , then the pixel (i′, j′) is identified as a non-edge pixel;

[0059] If the gradient value GH,min ≤G H (i′,j′)≤G H,max , then the pixel (i′, j′) is identified as a weak edge pixel.

[0060] As a preferred embodiment of the present invention, the logic of the edge tracking processing in step S36 is as follows: traverse all weak edge pixels to check whether they are adjacent to strong edge pixels, and if so, mark them as edge pixels; if not, delete them.

[0061] 7. The method for visual inspection of laser cut products according to claim 4, characterized in that the calculation formula for calculating the high frequency sub-band eigenvalue in step S37 is as follows:

[0062]

[0063] Where α is the coupling coefficient, 0<α<1; g H (i, j; λ, Φ, ψ, σ, γ) is the sum of the texture feature filter values ​​of the high-frequency sub-band, ∑ LH,HL,HH G H (i′, j′) is the sum of the high-frequency subband gradient values;

[0064] g H (i, j; λ, Φ, ψ, σ, γ) = g LH (i,j;λ,φ,ψ,σ,γ)+g HL (i,j;λ,φ,ψ,σ,γ)+g HH (i, j; λ, φ, ψ, σ, γ);

[0065] ∑ LH,HL,HH G H (i′,j′)=G LH (i′,j′)+G HL (i′,j′)+G HH (i′, j′);

[0066] The present invention also provides a laser cutting product visual inspection system using the above method, the system comprising a camera arranged on a laser cutting machine, for real-time inspection of the product and collecting images of the product obtained by cutting; the system further comprises a sub-band information extraction module, a low-frequency sub-band eigenvalue calculation module, a high-frequency sub-band eigenvalue calculation module and a screening control module;

[0067] The sub-band information extraction module is used to filter the collected image and extract high-frequency sub-band information and low-frequency sub-band information;

[0068] The low-frequency sub-band characteristic value calculation module is used to extract the global brightness change characteristics of the surface of the detected product from the acquired low-frequency sub-band information, and calculate the low-frequency sub-band global brightness change characteristic value as the low-frequency sub-band characteristic value;

[0069] The high-frequency sub-band eigenvalue calculation module is used to extract the texture features and edge features of the surface of the detected product from the acquired high-frequency sub-band information, calculate the high-frequency sub-band texture eigenvalue and edge eigenvalue; perform multi-scale fusion on the texture eigenvalue and edge eigenvalue of the high-frequency sub-band to obtain the high-frequency sub-band eigenvalue;

[0070] The screening control module is used to determine whether the low-frequency sub-band characteristic value is greater than the low-frequency sub-band threshold, and at the same time determine whether the high-frequency sub-band characteristic value is greater than the high-frequency sub-band threshold;

[0071] If the low-frequency sub-band characteristic value is greater than the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is greater than the high-frequency sub-band threshold, it is determined that the inspected product has both hole and concave defects and crack and edge defects;

[0072] If the low-frequency sub-band characteristic value is less than or equal to the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is greater than the high-frequency sub-band threshold, it is determined that the inspected product has only cracks and edge defects;

[0073] If the low-frequency sub-band characteristic value is greater than the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is less than or equal to the high-frequency sub-band threshold, it is determined that the inspected product has only hole and concave defects;

[0074] If the low-frequency sub-band characteristic value is less than or equal to the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is less than or equal to the high-frequency sub-band threshold, it is determined that the inspected product has neither hole or depression defects nor crack or edge defects.

[0075] In the above technical solution, the technical effects and advantages provided by the present invention are:

[0076] 1. The present invention uses a camera to collect images of cut products simultaneously illuminated by different light sources, and further extracts high-frequency sub-band information and low-frequency sub-band information. By analyzing these sub-band information, multi-scale and multi-directional feature information of the image can be extracted, thereby effectively classifying and identifying defects such as cracks, edges, holes and depressions.

[0077] 2. By using spherical harmonic functions to continue fitting the illumination model to the extracted low-frequency self-contained information and then performing reversible linear mapping, the directionality and distribution of image illumination can be more accurately described. This method is suitable for scenes that need to deal with complex illumination conditions, such as backlighting and strong light. The global brightness change eigenvalue obtained by solving the problem effectively reflects the illumination information of the image, and can accurately analyze whether the original acquired image has defects such as depressions and holes.

[0078] 3. After using a bandpass filter to extract texture features from the high-frequency sub-band information, the Sobel operator is further used to extract edge features, and then the double threshold method is further used to screen and detect the high-frequency sub-band feature values. By further performing double threshold detection on the high-frequency sub-band information after edge information extraction, product defects can be effectively identified and classified, and subtle defects caused by the cutting process can be more accurately distinguished, thereby ensuring product quality and production efficiency.

[0079] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.

[0080] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0082] Figure 1 A schematic diagram of the process flow of the laser cutting product visual inspection method provided by the present invention;

[0083] Figure 2 A schematic diagram of a camera, a light source, and image acquisition results of a laser cutting machine for inspecting a product in an embodiment of the present invention;

[0084] Figure 3 Schematic diagram of various product defects detected in an embodiment of the present invention;

[0085] Figure 4 A schematic diagram of extracting and decomposing high-frequency sub-band information and low-frequency sub-band information in an embodiment of the present invention;

[0086] Figure 5 A schematic diagram of calculating the global brightness eigenvalue of low-frequency sub-band information using a spherical harmonic function in an embodiment of the present invention;

[0087] Figure 6 This is a schematic diagram of the result of extracting texture information from high-frequency sub-band information through a bandpass filter and then using the Sobel operator to extract edge information;

[0088] Figure 7 This is a schematic diagram of the structure of the laser cutting product visual inspection system provided by the present invention. DETAILED DESCRIPTION

[0089] The technical scheme in the specific embodiment of the present invention will be described in detail and completely in conjunction with the accompanying drawings. Obviously, the described embodiments are only some specific implementation methods of the overall technical scheme of the present invention, rather than all implementation methods. Based on the overall concept of the present invention, all other embodiments obtained by ordinary technicians in this field fall within the scope of protection of the present invention.

[0090] like Figure 1 As shown, a laser cutting product visual inspection method provided by the present invention is as follows: Figure 2 As shown, the method of the present invention is based on real-time detection of products by a camera arranged on a laser cutting machine. A light source emitting light in the direction opposite to the running direction of the cutting product production line is arranged at another angle of the camera. Under the illumination of the light source, the camera collects images of the products obtained by cutting. The method of the present invention comprises the following steps:

[0091] S1, filtering the collected image and extracting high-frequency sub-band information and low-frequency sub-band information;

[0092] S2. Extracting the global brightness change characteristics of the surface of the inspected product from the acquired low-frequency sub-band information, detecting uneven brightness or abnormal morphological defects, and then determining whether it is a hole or concave defect type, and calculating the low-frequency sub-band global brightness change characteristic value as the low-frequency sub-band characteristic value;

[0093] S3, extracting the texture features and edge features of the surface of the inspected product from the acquired high-frequency sub-band information, and then determining whether it is a crack or an edge irregularity defect type, and calculating the high-frequency sub-band texture feature value and edge feature value; performing multi-scale fusion on the texture feature value and edge feature value of the high-frequency sub-band to obtain the high-frequency sub-band feature value;

[0094] S4, determining whether the low-frequency sub-band characteristic value is greater than the low-frequency sub-band threshold, and at the same time determining whether the high-frequency sub-band characteristic value is greater than the high-frequency sub-band threshold;

[0095] like Figure 3 As shown, Figure 3 (a) indicates that the product has been detected to have crack defects. Figure 3 (b) indicates that the product has edge defects, Figure 3 (c) indicates that the product has a hole defect. Figure 3 (d) indicates that the product has a concave defect; if the low-frequency sub-band feature value is greater than the low-frequency sub-band threshold, and the high-frequency sub-band feature value is greater than the high-frequency sub-band threshold, then it is determined that the product under test has both Figure 3 (c) and Figure 3 The hole depression defect shown in (d) also has the following characteristics: Figure 3 (a) and Figure 3(b) Cracks and edge defects shown;

[0096] If the low-frequency subband characteristic value ≤ low-frequency subband threshold, and the high-frequency subband characteristic value > high-frequency subband threshold, then it is determined that the product under test has only Figure 3 The crack shown in (a) and Figure 3 (b) The edge defect shown;

[0097] If the low-frequency subband characteristic value is greater than the low-frequency subband threshold, and the high-frequency subband characteristic value is less than or equal to the high-frequency subband threshold, then it is determined that the product under test has only Figure 3 (c) The holes shown and Figure 3 (d) The concave defect shown;

[0098] If the low-frequency subband eigenvalue is less than or equal to the low-frequency subband threshold, and the high-frequency subband eigenvalue is less than or equal to the high-frequency subband threshold, then it is determined that the product under test has neither Figure 3 (c) and Figure 3 The hole depression defect shown in (d) also does not have the Figure 3 (a) and Figure 3 (b) Cracks and edge defects shown.

[0099] like Figure 2 The figure shows the result of real-time detection of cut products on a laser cutting production line using the visual detection method provided by the present invention.

[0100] In the inspection of laser-cut products, the extraction of low-frequency sub-band information and high-frequency sub-band information is helpful for the detection and classification of defects such as cracks, edge scratches, holes and dents. Low-frequency sub-bands usually contain the main structural information of the image, such as shape and size, while high-frequency sub-bands contain detailed information of the image, such as edges and textures. In the quality control of laser-cut products, the detection of defects such as cracks, edge scratches, holes and dents is crucial because these defects will affect the structural integrity and functionality of the product.

[0101] Cracks and scratches may form on the surface or edge of the product, while holes and dents may be caused by uneven energy distribution or incomplete material removal during the cutting process. The overall morphology and distribution of these defects can be effectively detected by extracting low-frequency sub-band information. High-frequency sub-band extraction helps to identify the specific shape and size of these defects, allowing for more accurate classification and evaluation.

[0102] For example, edge information in the high-frequency sub-band can help detect tiny cracks and scratches, while morphological information in the low-frequency sub-band can help identify larger holes and depressions. By combining the information of the low-frequency and high-frequency sub-bands, the quality of laser-cut products can be more comprehensively evaluated to ensure that they meet the requirements of industrial applications. Therefore, as another preferred embodiment of the present invention, step S1 extracts the high-frequency sub-band information and the low-frequency sub-band information, including the following steps:

[0103] S11: Apply Daubechies wavelet to perform one-dimensional wavelet decomposition on each row of the input image I(x, y), and calculate the low-frequency part L and the high-frequency part H of each row of the input image;

[0104] S12: Based on step S11, Daubechies wavelet is further applied to each column of the input image for two-dimensional decomposition to obtain LL subband, LH subband, HL subband and HH subband:

[0105]

[0106]

[0107] Wherein, h is the function coefficient of the low-pass filter, g is the function coefficient of the high-pass filter; LL(i,j) is the LL subband, LH(i,j) is the LH subband, HL(i,j) is the HL subband, HH(i,j) is the HH subband, (i,j) is the corresponding image point after the input image I(x,y) is decomposed; I(i,j) is the sub-image after the input image I(x,y) is decomposed;

[0108] like Figure 4 As shown, after decomposing the I(i+1,j+1) sub-image, the I(i,j) sub-image is obtained, which has a low-frequency sub-band LL1 and high-frequency sub-bands HL1, LH1 and HH1; the low-frequency sub-band LL1 is further decomposed in two dimensions based on the Daubechies wavelet to obtain the I(i-1,j-1) sub-image, which has a low-frequency sub-band LL2 and high-frequency sub-bands HL2, LH2 and HH2;

[0109] S13: define the LL sub-band as low-frequency sub-band information, and define the HL sub-band, HL sub-band, and HH sub-band as high-frequency sub-band information.

[0110] The image is decomposed two-dimensionally one by one by Daubechies wavelet, and the corresponding high-frequency subband information and low-frequency subband information are obtained, so that the feature information of different scales and directions of the image collected by the camera is effectively decomposed. The obtained low-frequency subband (LL) is used to represent the global features of the image, and the high-frequency subband (LH, HL, HH) is used to represent the local detail features of the image (such as horizontal, vertical and diagonal edges); further, LH (low frequency-high frequency) represents the high-frequency information in the horizontal direction of the image, including horizontal edge details; HL (high frequency-low frequency) represents the high-frequency information in the vertical direction of the image, including vertical edge details; HH (high frequency-high frequency) contains the high-frequency information in the diagonal direction of the image, representing diagonal edge information and noise information. By analyzing these subband information, the multi-scale and multi-directional feature information of the image can be extracted, and then the defects of cracks, edges, holes and depressions can be classified and identified.

[0111] Step S2 includes:

[0112] S21: Calculate the gradient strength G of the low-frequency subband LL(i,j) LL (i,j):

[0113] G LL,x (i,j),G LL,y (i, j) are the low-frequency subband gradients of the image point (i, j) in the x-axis direction and the low-frequency subband gradients in the y-axis direction, respectively.

[0114] The spherical harmonic illumination model is used to approximate the distribution of light sources, especially in the calculation of global illumination and reflection in complex scenes, which is conducive to the fusion of light sources on the product surface from multiple angles, facilitates the detection accuracy of product images, and avoids the occurrence of misclassification of product detection defects due to illumination angles. Therefore, step S22 is further performed;

[0115] S22: Constructing a third-order spherical harmonic illumination model

[0116]

[0117] Where l is the spherical harmonic order, 0≤l≤2; represents the frequency component of the spherical order function; m is an integer that satisfies -l≤m≤l, called the magnetic quantum number; θ and They are the polar angle (or latitude angle) and azimuth angle (or precision angle) in spherical coordinates, 0≤θ≤π, is the associated Legendre polynomial; δ is an imaginary number,

[0118]

[0119] Among them, X, Y and Z are the horizontal coordinate, vertical coordinate and vertical coordinate of the point (x, y) in the two-dimensional image coordinate system corresponding to the input image I(x, y) in the three-dimensional coordinate system respectively;

[0120]

[0121] Among them, (-1) m is the Shortley-Condon phase, η∈[-1,1]; when m=0, To seek P l (η) m-th order derivative with respect to the independent variable η;

[0122] S23: Calculate the spherical harmonic coefficients c lm :

[0123]

[0124] S24: Calculate the global brightness change characteristic value of the low-frequency sub-band:

[0125]

[0126] Polar angle θ and azimuth angle are two angles in the spherical coordinate system, describing the position of a point on the sphere. Their calculation depends on the rectangular coordinates of the point. The order l and the magnetic quantum number m describe the oscillation characteristics of the spherical harmonic function. The order l controls the global oscillation frequency of the function, while the magnetic quantum number m controls the oscillation in the azimuth direction. By fitting the illumination model, the directionality and distribution of illumination can be described more accurately, which is suitable for scenes that need to deal with complex illumination conditions, such as backlighting and strong light.

[0127] Associated Legendre polynomials https: / / zhuanlan.zhihu.com / p / 166211193

[0128] .like Figure 5 As shown, Figure 5 (a) shows the reconstruction limit of the spherical harmonic spectrum under the lateral restriction of the magnetic quantum number m and the spherical harmonic order l = B-1. Figure 5 (b) indicates that Figure 5 (a) The image information under different spectra is obtained by reversible linear mapping of the image after the low-frequency sub-band information is extracted under the reconstruction constraint condition. Figure 5 (c) Indicates Figure 5 (b) Under the image information obtained, the spherical harmonic function coefficients c of step S23 are further performed lm, perform global brightness change eigenvalue Vb(i,j) on image expansion calculation of different sub-band information, and then obtain accurate global brightness eigenvalue of the image extracted from the low-frequency sub-band information of the product.

[0129] The S3 steps include:

[0130] S31: Using bandpass filters to extract texture features from the LH subband, HL subband, and HH subband obtained in step S12, respectively. The texture feature filter value calculation formula is as follows:

[0131]

[0132] I(i′,j′)=I(i,j)*g(i,j;λ,Φ,ψ,σ,γ);

[0133] Wherein, I(i′,j′) is the smoothed image of image I(i,j) in the two-dimensional pixel coordinate system after being filtered by the Gabor filter; * represents the convolution calculation; φ is the filter direction, λ is the filter wavelength (used to control the filtering frequency), σ is the standard deviation of the filter Gaussian function (used to control the bandwidth), γ is the spatial aspect ratio, and ψ is the phase shift; the width of the image I(x,y) is W and the height is H; i′=i cosφ+j sinφ; j′=-i sinφ+j cosφ; the filter directions are 90°, 180°, 60° and 120°, λ=1064nm; σ is the standard deviation of multiple samples after filtering and intensive training; in practical applications, the phase response of the bandpass filter can be cumulative, and the phase shift ψ change may occur over a relatively large frequency range. For example, the phase response of a 1kHz, 6-pole, 0.5dB Chebyshev bandpass filter will show different amounts of phase change, such as 180°, 360°, or 540°, depending on the combination of its parts. The bandpass filter convolves the image with a filter of a specific direction and frequency to extract texture information at a specific direction and scale.

[0134] S32: Figure 6 As shown, Figure 6 The original image after bandpass filtering is further calculated using the Sobel operator for the horizontal gradient G of the high-frequency subband H,x (i′, j′) and the vertical gradient G H,y (i′,j′):

[0135]

[0136] Among them, H includes LH, HL and HH;

[0137] S33: Calculate the gradient direction β(i′, j′) and gradient value G of the high frequency subband H(i′,j′):

[0138]

[0139] S34: Based on the gradient direction β(i′, j′) of the high-frequency subband in step S33, Figure 6 The high-frequency subband of the final convolution calculation result is subjected to non-maximum suppression to accurately locate the edge position. By comparing the neighborhood value of each pixel (i′, j′) in its gradient direction, the local gradient maximum is retained and the non-local maximum is suppressed.

[0140] For each pixel (i′, j′), compare its gradient direction β(i′, j′) with 180°, 90°, 45°, and 135°;

[0141] If its gradient direction β(i′, j′) is closer to 180° (i.e., closer to the horizontal direction), the gradient values ​​of the current pixel (i′, j′) are further compared with those of its left pixel and right pixel;

[0142] If its gradient direction β(i′, j′) is closer to 90° (i.e., closer to the vertical direction), the gradient values ​​of the current pixel (i′, j′) are further compared with those of the pixel above and the pixel below;

[0143] If its gradient direction β(i′, j′) is closer to 45° or closer to 135° (i.e., closer to the diagonal direction), the gradient values ​​of the current pixel (i′, j′) and its adjacent diagonal pixels are further compared;

[0144] In the above-mentioned process of comparing pixel values ​​one by one along the gradient direction, if the pixel (i′, j′) is a local maximum in the corresponding gradient direction, the point is retained; otherwise, its gradient value is set to 0;

[0145] S35: Based on the result of step S34, a double threshold detection is further performed on the gradient value of the pixel (i′, j′) to distinguish strong edge, weak edge and non-edge pixels of the image;

[0146] S36: performing edge tracking processing on the high frequency sub-band image processed in step S35, connecting weak edge pixels of the high frequency sub-band image to strong edges through a hysteresis effect;

[0147] S37: Calculate the high-frequency sub-band feature value based on the high-frequency sub-band information obtained after the dual threshold detection and edge tracking processing.

[0148] The dual threshold detection in step S35 includes:

[0149] S351: Setting high threshold G H,max and low threshold G H,min :

[0150]

[0151] Where M is the total number of pixel horizontal coordinates i′, N is the total number of pixel vertical coordinates j′; Max(G H,max ) is the maximum value of the high-frequency sub-band gradient values ​​of multiple pixels, Min(G H,max ) is the minimum value among the high-frequency sub-band gradient values ​​of multiple pixels;

[0152] S352: If the gradient value G H (i′,j′)>G H,max , then the pixel (i′, j′) is identified as a strong edge pixel;

[0153] If the gradient value G H (i′,j′) <G H,min , then the pixel (i′, j′) is considered as a non-edge pixel;

[0154] If the gradient value G H,min ≤G H (i′,j′)≤G H,max , then the pixel (i′, j′) is identified as a weak edge pixel.

[0155] The logic of the edge tracking process in step S36 is as follows: traverse all weak edge pixels to check whether they are adjacent to strong edge pixels. If so, mark them as edge pixels; if not, delete them.

[0156] The calculation formula for calculating the high frequency sub-band eigenvalue in step S37 is as follows:

[0157]

[0158] Wherein, α is the coupling coefficient, 0<α<1, preferably, α=0.5; g H (i, j; λ, Φ, ψ, σ, γ) is the sum of the texture feature filter values ​​calculated by the S31 step calculation formula for the high frequency sub-band, ∑ LH,HL,HH G H (i′, j′) is the sum of the high-frequency subband gradient values;

[0159] g H (i, j; λ, Φ, ψ, σ, γ) = g LH (i,j;λ,Φ,ψ,σ,γ)+g HL (i,j;λ,Φ,ψ,σ,γ)+g HH (i, j; λ, Φ, ψ, σ, γ);

[0160] ∑ LH,HL,HH G H (i′,j′)=GLH (i′,j′)+G HL (i′,j′)+G HH (i′, j′);

[0161] The above dual threshold detection method further filters the edge information of the high-frequency sub-band information. By setting two thresholds, the features of interest can be more accurately identified when there are defects of different gray levels in the image. This method can improve the accuracy and reliability of product defect detection. The dual threshold detection can more accurately distinguish the subtle defects caused by the cutting process. By further performing dual threshold detection on the high-frequency sub-band information after edge information extraction, product defects can be effectively identified and classified, thereby ensuring product quality and production efficiency.

[0162] The present invention also provides a laser cutting product visual inspection system using the above method, such as Figure 7 As shown, the system includes a camera arranged on the laser cutting machine, which is used to detect the product in real time and collect the product image obtained by cutting; the system also includes a sub-band information extraction module, a low-frequency sub-band eigenvalue calculation module, a high-frequency sub-band eigenvalue calculation module and a screening control module;

[0163] A sub-band information extraction module is used to filter the collected image and extract high-frequency sub-band information and low-frequency sub-band information;

[0164] A low-frequency sub-band characteristic value calculation module is used to extract the global brightness change characteristics of the surface of the inspected product from the acquired low-frequency sub-band information, and calculate the low-frequency sub-band global brightness change characteristic value as the low-frequency sub-band characteristic value;

[0165] The high-frequency sub-band eigenvalue calculation module is used to extract the texture features and edge features of the surface of the inspected product from the acquired high-frequency sub-band information, calculate the high-frequency sub-band texture eigenvalue and edge eigenvalue; perform multi-scale fusion of the texture eigenvalue and edge eigenvalue of the high-frequency sub-band to obtain the high-frequency sub-band eigenvalue;

[0166] A screening control module is used to determine whether the low-frequency sub-band characteristic value is greater than the low-frequency sub-band threshold, and at the same time determine whether the high-frequency sub-band characteristic value is greater than the high-frequency sub-band threshold;

[0167] If the low-frequency sub-band characteristic value is greater than the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is greater than the high-frequency sub-band threshold, it is determined that the inspected product has both hole and concave defects and crack and edge defects;

[0168] If the low-frequency sub-band characteristic value is less than or equal to the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is greater than the high-frequency sub-band threshold, it is determined that the inspected product has only cracks and edge defects;

[0169] If the low-frequency sub-band characteristic value is greater than the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is less than or equal to the high-frequency sub-band threshold, it is determined that the inspected product has only hole and concave defects;

[0170] If the low-frequency sub-band characteristic value is less than or equal to the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is less than or equal to the high-frequency sub-band threshold, it is determined that the inspected product has neither hole or depression defects nor crack or edge defects.

[0171] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0172] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0173] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to only specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A method for visual inspection of laser-cut products, wherein the method detects the product in real time based on a camera installed on a laser cutting machine and collects images of the product obtained by cutting, and is characterized in that: The following steps are involved: S1, filtering the collected image and extracting high-frequency sub-band information and low-frequency sub-band information; S2, extracting the global brightness change characteristics of the surface of the inspected product from the acquired low-frequency sub-band information, and calculating the low-frequency sub-band global brightness change characteristic value as the low-frequency sub-band characteristic value; S3, extracting the texture features and edge features of the surface of the inspected product from the acquired high-frequency sub-band information, calculating the texture feature value and edge feature value of the high-frequency sub-band; performing multi-scale fusion on the texture feature value and edge feature value of the high-frequency sub-band to obtain the high-frequency sub-band feature value; S4, determining whether the low-frequency sub-band characteristic value is greater than the low-frequency sub-band threshold, and at the same time determining whether the high-frequency sub-band characteristic value is greater than the high-frequency sub-band threshold; If the low-frequency sub-band characteristic value is greater than the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is greater than the high-frequency sub-band threshold, it is determined that the inspected product has both hole and concave defects and crack and edge defects; If the low-frequency sub-band characteristic value is less than or equal to the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is greater than the high-frequency sub-band threshold, it is determined that the inspected product has only cracks and edge defects; If the low-frequency sub-band characteristic value is greater than the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is less than or equal to the high-frequency sub-band threshold, it is determined that the inspected product has only hole and concave defects; If the low-frequency sub-band characteristic value is less than or equal to the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is less than or equal to the high-frequency sub-band threshold, it is determined that the inspected product has neither hole or depression defects nor crack or edge defects.

2. The method for visual inspection of laser cut products according to claim 1, characterized in that: The step S1 of extracting high-frequency sub-band information and low-frequency sub-band information comprises the following steps: S11: Apply Daubechies wavelet to perform one-dimensional wavelet decomposition on each row of the input image I(x, y), and calculate the low-frequency part L and the high-frequency part H of each row of the input image; S12: Based on the step S11, the Daubechies wavelet is further applied to each column of the input image for two-dimensional decomposition to obtain LL subband, LH subband, HL subband and HH subband: Wherein, h is the function coefficient of the low-pass filter, g is the function coefficient of the high-pass filter; LL(i,j) is the LL subband, LH(i,j) is the LH subband, HL(i,j) is the HL subband, HH(i,j) is the HH subband, i,j) is the image point corresponding to the decomposition of the input image I(x,y); I(i,j) is the sub-image after the decomposition of the input image I(x,y); S13: define the LL sub-band as low-frequency sub-band information, and define the HL sub-band, HL sub-band and HH sub-band as high-frequency sub-band information.

3. The method for visual inspection of laser cut products according to claim 2, characterized in that: The step S2 comprises: S21: Calculate the gradient strength G of the low-frequency subband LL(i,j) LL (i,j): i,j) is the low-frequency subband gradient in the x-axis direction and the low-frequency subband gradient in the y-axis direction, S22: Constructing a third-order spherical harmonic illumination model Where l is the spherical harmonic order, 0≤l≤2; represents the frequency component of the spherical order function; m is an integer that satisfies -l≤m≤l, called the magnetic quantum number; θ and They are the polar angle (or latitude angle) and azimuth angle (or precision angle) in spherical coordinates, 0≤θ≤π, is the associated Legendre polynomial; δ is an imaginary number, Among them, X, Y and Z are the horizontal coordinate, vertical coordinate and vertical coordinate of the point (x, y) in the two-dimensional image coordinate system corresponding to the input image I(x, y) in the three-dimensional coordinate system respectively; Among them, (-1) m is the Shortley-Condon phase, η∈[-1,1]; when m=0, To seek P l (η) m-th order derivative with respect to the independent variable η; S23: Calculate the spherical harmonic coefficients c lm : S24: Calculate the global brightness change characteristic value of the low-frequency sub-band:

4. The method for visual inspection of laser cut products according to claim 2, characterized in that: The S3 step includes: S31: Using bandpass filters to extract texture features from the LH subband, HL subband and HH subband obtained in step S12, respectively. The texture feature filter value calculation formula is as follows: I(i,j)=I(i,j)*g(i,j;λ,Φ,ψ,σ,γ); Where I(i′,j′) is the smoothed image of image I(i,j) in the two-dimensional pixel coordinate system after being filtered by the Gabor filter; * represents the convolution calculation; Φ is the filter direction, λ is the filter wavelength, σ is the standard deviation of the filter Gaussian function, γ is the spatial aspect ratio, and ψ is the phase shift; the width of image I(x,y is W and the height is H; i′=icosφ+jsinφ; j′=-isinφ+jcosφ; S32: Use the Sobel operator to calculate the horizontal gradient G of the high-frequency subband H,x (i′, j′) and the vertical gradient G H,y (i′,j′): Among them, H includes LH, HL and HH; S33: Calculate the gradient direction β(i′, j′) and gradient value G of the high frequency subband H (i′,j′): S34: Based on the gradient direction β(i′, j′) of the high frequency sub-band in step S33, non-maximum suppression is performed on the high frequency sub-band; For each pixel (i′, j′), compare its gradient direction β(i′, j′) with 180°, 90°, 45°, and 135°; If its gradient direction β(i′, j′) is closer to 180°, then further compare the gradient values ​​of the current pixel (i′, j′) with its left pixel and right pixel; If its gradient direction β(i′, j′) is closer to 90°, the gradient values ​​of the current pixel (i′, j′) are further compared with those of the upper pixel and the lower pixel; If its gradient direction β(i′,j′) is closer to 45° or closer to 135° (, then further compare the gradient values ​​of the current pixel (i′,j′) with its adjacent diagonal pixels; In the above-mentioned process of comparing pixel values ​​one by one along the gradient direction, if the pixel (i′, j′) is a local maximum in the corresponding gradient direction, the point is retained; otherwise, its gradient value is set to 0; S35: Based on the result of step S34, further performing double threshold detection on the gradient value of pixel (i′, j′) to distinguish strong edge, weak edge and non-edge pixels of the image; S36: performing edge tracking processing on the high frequency sub-band image processed in step S35, connecting weak edge pixels of the high frequency sub-band image to strong edges through a hysteresis effect; S37: Calculate the high-frequency sub-band feature value based on the high-frequency sub-band information obtained after the dual threshold detection and edge tracking processing.

5. The method for visual inspection of laser cut products according to claim 4, characterized in that: The dual threshold detection in step S35 includes: S351: Setting high threshold G H,max and low threshold G H,min : Where M is the total number of pixel horizontal coordinates i′, N is the total number of pixel vertical coordinates j′; Max(G H,max is the maximum value of the high-frequency subband gradient values ​​of multiple pixels, Min(G H,max ) is the minimum value among the high-frequency sub-band gradient values ​​of multiple pixels; S352: If the gradient value G H (i′,j′)>G H,max , then the pixel (i′, j′) is identified as a strong edge pixel; If the gradient value G H (i′,j′) <G H,min , then the pixel (i′, j′) is identified as a non-edge pixel; If the gradient value G H,min ≤G H (i′,j′)≤G H,max , then the pixel (i′, j′) is identified as a weak edge pixel.

6. The method for visual inspection of laser cut products according to claim 4, characterized in that: The logic of the edge tracking process in step S36 is as follows: traverse all weak edge pixels to check whether they are adjacent to strong edge pixels. If so, mark them as edge pixels; if not, delete them.

7. The method for visual inspection of laser cut products according to claim 4, characterized in that: The calculation formula for calculating the high frequency sub-band eigenvalue in step S37 is as follows: Where α is the coupling coefficient, 0<α<1; g H (i, j; λ, Φ, ψ, σ, γ) is the sum of the texture feature filter values ​​of the high-frequency sub-band, ∑ LH,HL,HH G H (i′, j′) is the sum of the high-frequency subband gradient values; g H (i,j;λ,Φ,ψ,σ,γ)=g LH (i,j;λ,Φ,ψ,σ,γ)+g HL (i,j;λ,Φ,ψ,σ,γ)+ g HH (i,j;λ,Φ,ψ,σ,γ); ∑ LH,HL,HH G H (i′,j′)=G LH (i′,j′)+G HL (i′,j′)+G HH (i′,j′)。 8. A laser cutting product visual inspection system using the method according to any one of claims 1 to 7, wherein the system comprises a camera arranged on a laser cutting machine for real-time inspection of the product and acquisition of images of the product obtained by cutting; characterized in that: The system also includes a subband information extraction module, a low-frequency subband eigenvalue calculation module, a high-frequency subband eigenvalue calculation module and a screening control module; The sub-band information extraction module is used to filter the collected image and extract high-frequency sub-band information and low-frequency sub-band information; The low-frequency sub-band characteristic value calculation module is used to extract the global brightness change characteristics of the surface of the detected product from the acquired low-frequency sub-band information, and calculate the low-frequency sub-band global brightness change characteristic value as the low-frequency sub-band characteristic value; The high-frequency sub-band eigenvalue calculation module is used to extract the texture features and edge features of the surface of the detected product from the acquired high-frequency sub-band information, calculate the high-frequency sub-band texture eigenvalue and edge eigenvalue; perform multi-scale fusion on the texture eigenvalue and edge eigenvalue of the high-frequency sub-band to obtain the high-frequency sub-band eigenvalue; The screening control module is used to determine whether the low-frequency sub-band characteristic value is greater than the low-frequency sub-band threshold, and at the same time determine whether the high-frequency sub-band characteristic value is greater than the high-frequency sub-band threshold; If the low-frequency sub-band characteristic value is greater than the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is greater than the high-frequency sub-band threshold, it is determined that the inspected product has both hole and concave defects and crack and edge defects; If the low-frequency sub-band characteristic value is less than or equal to the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is greater than the high-frequency sub-band threshold, it is determined that the inspected product has only cracks and edge defects; If the low-frequency sub-band characteristic value is greater than the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is less than or equal to the high-frequency sub-band threshold, it is determined that the inspected product has only hole and concave defects; If the low-frequency sub-band characteristic value is less than or equal to the low-frequency sub-band threshold, and the high-frequency sub-band characteristic value is less than or equal to the high-frequency sub-band threshold, it is determined that the inspected product has neither hole or depression defects nor crack or edge defects.

Citation Information

Patent Citations

  • Machine vision based light-emitting panel detection method

    CN105424726A

  • Multi-focus image fusion method based on quaternion wavelet transform

    CN106803242A

  • Apple image fusion method based on scale-invariant feature transformation

    CN106897999A

  • Image fingerprint extraction method based on non-sampled shear wave transformation

    CN108932492A

  • Image processing method and device, computer readable medium and electronic equipment

    CN109409335A