Vision Inspection Method and System for Laser Cutting Products

By using a camera on a laser cutting machine to extract high-frequency and low-frequency subband information, combined with spherical harmonic illumination model and bandpass filter, high-precision automatic detection of laser cutting products is achieved, solving the problems of slow speed, low accuracy and large manual detection errors in traditional methods, and improving product quality and production efficiency.

CN119399722BActive Publication Date: 2025-08-01SHENZHEN JIZI OPTICAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The traditional laser cutting process has slow speed, low accuracy, low degree of automation, and reliance on manual testing to reduce product qualification rate and waste of materials.

Method used

The camera-based visual detection method is adopted to extract the high-frequency subband and low-frequency subband information of the image, combine the spherical illumination model and bandpass filter to calculate the brightness and texture characteristics of the product surface to achieve automatic identification of cracks, edges, holes and depression defects.

Benefits of technology

It realizes high-precision and automated product inspection, can accurately identify subtle defects, improve production efficiency and product quality, and is suitable for complex lighting conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119399722B_ABST
    Figure CN119399722B_ABST
Patent Text Reader

Abstract

The present invention discloses a vision detection method and system for laser cutting products. The method collects product images obtained by cutting through a camera, and the method includes: filtering the collected images and extracting high-frequency subband information and low-frequency subband information; extracting global brightness change features based on the low-frequency subband information, and calculating the global brightness change feature value of the low-frequency subband as the low-frequency subband feature value; calculating the high-frequency subband texture feature value and edge feature value based on the high-frequency subband information; performing multi-scale fusion on the texture feature value and edge feature value of the high-frequency subband to obtain the high-frequency subband feature value; determining whether the low-frequency subband feature value is greater than the low-frequency subband threshold, and simultaneously determining whether the high-frequency subband feature value is greater than the high-frequency subband threshold. The extraction of high-frequency subband information and low-frequency subband information in the present invention analyzes and extracts multi-scale and multi-directional feature information of the images, and then effectively classifies and identifies defects such as cracks, edges, holes, and depressions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of visual inspection of laser cutting machines, and particularly relates to a method and system for visual inspection of laser-cut products. Background Art

[0002] Laser cutting is a high-precision processing technology, which is widely used in the processing of metal and non-metal materials. The laser emitted from the laser generator is focused into a laser beam with a high power density through the optical path system. As the relative position of the beam and the workpiece moves, the material finally forms a cut seam, so as to achieve the purpose of cutting. Laser cutting processing has the characteristics of high precision, high speed, low processing cost, ability to process any planar graph, large-scale cutting of the whole plate for the format without the need to open a mold, etc., and 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-batch mechanical parts is getting higher and higher. As a widely used industrial cutting and processing technology, laser cutting has the advantages of high flexibility and non-contact pressure, and is widely used in modern factories.

[0003] However, traditional cutting processes have disadvantages such as slow speed, low precision, and low automation. Usually, quality inspection during the cutting process mainly relies on manual inspection. Traditional manual inspection methods are inefficient and are 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, developing an automated and high-precision visual inspection method is crucial for improving 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 art.

[0005] To achieve the above purpose, the present invention provides the following technical solution: A method for visual inspection of laser-cut products, the method is based on a camera set on a laser cutting machine to perform real-time inspection on products and collect product images obtained by cutting, including the following steps:

[0006] S1. Filter the collected image and extract high-frequency subband information and low-frequency subband information;

[0007] S2. Extract the global brightness change feature on the surface of the product to be detected from the obtained low-frequency subband information, and calculate the global brightness change feature value of the low-frequency subband as the low-frequency subband feature value;

[0008] S3. Extract the texture features and edge features on the surface of the product to be detected from the obtained high-frequency sub-band information, and calculate the high-frequency sub-band texture feature value and edge feature value; perform 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. Determine whether the low-frequency sub-band feature value is greater than the low-frequency sub-band threshold, and at the same time determine whether the high-frequency sub-band feature value is greater than the high-frequency sub-band threshold.

[0010] If the low-frequency sub-band feature value > the low-frequency sub-band threshold and the high-frequency sub-band feature value > the high-frequency sub-band threshold, it is determined that the product to be detected has both hole and depression defects and crack and edge defects.

[0011] If the low-frequency sub-band feature value ≤ the low-frequency sub-band threshold and the high-frequency sub-band feature value > the high-frequency sub-band threshold, it is determined that the product to be detected only has crack and edge defects.

[0012] If the low-frequency sub-band feature value > the low-frequency sub-band threshold and the high-frequency sub-band feature value ≤ the high-frequency sub-band threshold, it is determined that the product to be detected only has hole and depression defects.

[0013] If the low-frequency sub-band feature value ≤ the low-frequency sub-band threshold and the high-frequency sub-band feature value ≤ the high-frequency sub-band threshold, it is determined that the product to be detected has neither hole and depression defects nor crack and edge defects.

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

[0015] S11: Apply the 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: On the basis of the S11 step, continue to apply the Daubechies wavelet to perform two-dimensional decomposition on each column of the input image to obtain the LL sub-band, LH sub-band, HL sub-band, and HH sub-band:

[0017]

[0018] Among them, 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 sub-band, LH(i, j) is the LH sub-band, HL(i, j) is the HL sub-band, HH(i, j) is the HH sub-band, (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, LH sub-band, and HH sub-bands as high-frequency sub-band information.

[0020] As a preference of the present invention, the step S2 includes:

[0021] S21: Calculate the gradient intensity GLL(i,j) of the low-frequency sub-band LL(i,j):

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

[0023] S22: Construct 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, satisfying -l ≤ m ≤ l, called the magnetic quantum number; θ and are the polar angle and azimuth angle in the spherical coordinates respectively, 0 ≤ θ ≤ π, is the associated Legendre polynomial; δ is an imaginary number,

[0026] where X, Y, and Z are the abscissa, ordinate, and vertical coordinate in the three-dimensional coordinate system of the point (x,y) corresponding to the input image I(x,y) in the two-dimensional image coordinate system respectively;

[0027]

[0028] where (-1) m is the Shortley-Condon phase, η ∈ [-1,1]; when m = 0, is to find the mth derivative of P l (η) with respect to the independent variable η;

[0029] S23: Calculate the spherical harmonic function coefficient c lm :

[0030]

[0031] S24: Calculate the global brightness change eigenvalue of the low-frequency sub-band:

[0032]

[0033] As a preference of the present invention, step S3 includes:

[0034] S31: Respectively perform texture feature extraction on the LH sub-band, HL sub-band, and HH sub-band obtained in step S12 by using a band-pass filter. The calculation formula for the texture feature filtering value is as follows:

[0035]

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

[0037] Wherein, I(i′,j′) is the smoothed image of the image I(i,j) in the two-dimensional pixel coordinate system after being filtered by the Gabor filter; * represents convolution calculation; Φ is the filter direction, λ is the filter wavelength, σ is the standard deviation of the Gaussian function of the filter, γ 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Φ;

[0038] S32: Calculate the horizontal gradient G H,x (i′,j′) and the vertical gradient G H,y (i′,j′) of the high-frequency sub-band by using the Sobel operator:

[0039]

[0040] Wherein, H includes LH, HL, and HH;

[0041] S33: Calculate the gradient direction β(i′,j′) and the gradient value G H (i′,j′) of the high-frequency sub-band:

[0042]

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

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

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

[0046] If its gradient direction β(i′,j′) is closer to 90°, then further compare the gradient value of the current pixel (i′,j′) with that of its upper pixel and lower pixel;

[0047] 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′) and its adjacent diagonal pixels;

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

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

[0050] S36: Perform edge tracking processing on the high-frequency subband image processed in the S35 step, and connect the weak-edge pixels of the high-frequency subband image to the strong edges through the hysteresis effect;

[0051] S37: Calculate the high-frequency subband eigenvalue based on the high-frequency subband information obtained after double-threshold detection and edge tracking processing.

[0052] As a preference of the present invention, the double-threshold detection in the S35 step includes:

[0053] S351: Set a high threshold G H,max and a low threshold G H,min :

[0054]

[0055] where M is the total number of the abscissas i′ of the pixels, and N is the total number of the ordinates j′ of the pixels; Max(G H,max ) is the maximum value among the high-frequency subband gradient values of multiple pixel points, and Min(G H,max ) is the minimum value among the high-frequency subband gradient values of multiple pixel points;

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

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

[0058] 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.

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

[0060] Preferably in the present invention, the calculation formula for calculating the high-frequency subband eigenvalue in step S37 is as follows:

[0061]

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

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

[0064] ∑ LL,HL,HH G H (i',j') = G LH (i',j') + G HL (i',j') + G HH (i',j').

[0065] The present invention also provides a visual inspection system for laser cutting products using the above method. The system includes a camera set on a laser cutting machine for real-time inspection of products and collecting product images obtained by cutting; 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;

[0066] The subband information extraction module is used for filtering the collected image and extracting high-frequency subband information and low-frequency subband information;

[0067] The low-frequency subband eigenvalue calculation module is used for extracting the global brightness change feature on the surface of the product to be detected from the obtained low-frequency subband information and calculating the low-frequency subband global brightness change eigenvalue as the low-frequency subband eigenvalue;

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

[0069] The screening control module is used to determine whether the low-frequency sub-band eigenvalue is greater than the low-frequency sub-band threshold, and at the same time determine whether the high-frequency sub-band eigenvalue is greater than the high-frequency sub-band threshold.

[0070] If the low-frequency sub-band eigenvalue > the low-frequency sub-band threshold and the high-frequency sub-band eigenvalue > the high-frequency sub-band threshold, it is determined that the product to be detected has both hole depression defects and crack and edge defects.

[0071] If the low-frequency sub-band eigenvalue ≤ the low-frequency sub-band threshold and the high-frequency sub-band eigenvalue > the high-frequency sub-band threshold, it is determined that the product to be detected only has crack and edge defects.

[0072] If the low-frequency sub-band eigenvalue > the low-frequency sub-band threshold and the high-frequency sub-band eigenvalue ≤ the high-frequency sub-band threshold, it is determined that the product to be detected only has hole depression defects.

[0073] If the low-frequency sub-band eigenvalue ≤ the low-frequency sub-band threshold and the high-frequency sub-band eigenvalue ≤ the high-frequency sub-band threshold, it is determined that the product to be detected has neither hole depression defects nor crack and edge defects.

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

[0075] 1. The present invention collects images of the cut product under the simultaneous illumination of different light source angles through a camera, 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, and then defects such as cracks, edges, holes, and depressions can be effectively classified and identified.

[0076] 2. By using spherical harmonic functions to continue to fit the illumination model for the extracted low-frequency self- information, and then performing reversible linear mapping, the directivity and distribution of image illumination can be more accurately described, which is suitable for scenarios that need to process complex illumination conditions, such as backlight and strong light. Furthermore, the global brightness change eigenvalue obtained by solving effectively reflects the illumination information of the image, and then it can accurately analyze whether there are defects such as depressions and holes in the original collected image.

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

[0078] Other features and advantages of the present invention will be described in the following specification, and, in part, will be obvious from the specification, or will be understood by implementing the present invention. The objectives and other advantages of the present invention can be achieved and obtained by the structures specifically pointed out in the written specification, claims, and drawings.

[0079] The technical solutions of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Brief Description of the Drawings

[0080] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments recorded in the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings.

[0081] Figure 1 Schematic flow diagram of the visual inspection method for laser cutting products provided by the present invention;

[0082] Figure 2 Schematic diagram of the camera, light source, and image acquisition results of the laser cutting machine for inspecting products in the embodiments of the present invention;

[0083] Figure 3 Schematic diagram of various product defects detected in the embodiments of the present invention;

[0084] Figure 4 Schematic diagram of the extraction and decomposition of high-frequency subband information and low-frequency subband information in the embodiments of the present invention;

[0085] Figure 5 Schematic diagram of calculating the global brightness eigenvalue of the low-frequency subband information by spherical harmonic functions in the embodiments of the present invention;

[0086] Figure 6 Schematic diagram of the result of further extracting the edge information by using the Sobel operator after extracting the texture information in the high-frequency subband information by using a band-pass filter;

[0087] Figure 7 Schematic diagram of the structure of the visual inspection system for laser cutting products provided by the present invention. Detailed implementation manners

[0088] The technical solutions in the specific embodiments of the present invention will be described in detail and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only partial specific implementation manners of the overall technical solution of the present invention, rather than all implementation manners. Based on the overall concept of the present invention, all other embodiments obtained by those of ordinary skill in the art fall within the protection scope of the present invention.

[0089] As Figure 1 shown, a visual inspection method for laser cutting products provided by the present invention is as Figure 2 shown. The method of the present invention is based on a camera provided on a laser cutting machine to perform real-time detection on products. A light source that emits light in the opposite direction to the walking direction of the cutting product production line is provided at another angle of the camera. Under the illumination of the light source, the camera collects product images obtained by cutting. The method of the present invention includes the following steps:

[0090] S1. Filter the collected image and extract high-frequency sub-band information and low-frequency sub-band information;

[0091] S2. Extract the global brightness change characteristics of the surface of the product to be detected from the obtained low-frequency sub-band information, detect uneven brightness or abnormal morphological defects, and then determine whether it is a hole depression defect type, and calculate the global brightness change characteristic value of the low-frequency sub-band as the low-frequency sub-band characteristic value;

[0092] S3. Extract the texture characteristics and edge characteristics of the surface of the product to be detected from the obtained high-frequency sub-band information, and then determine whether it is a crack or edge irregularity defect type, and calculate the high-frequency sub-band texture characteristic value and edge characteristic value; perform multi-scale fusion on the texture characteristic value and edge characteristic value of the high-frequency sub-band to obtain the high-frequency sub-band characteristic value;

[0093] S4. Judge whether the low-frequency sub-band characteristic value is greater than the low-frequency sub-band threshold, and at the same time judge whether the high-frequency sub-band characteristic value is greater than the high-frequency sub-band threshold;

[0094] As Figure 3 shown, Figure 3 (a) indicates that a crack defect is detected in the product, Figure 3 (b) indicates that the product has an edge defect, Figure 3 (c) indicates that the product has a hole defect, Figure 3 (d) indicates that the product has a depression defect; if the low-frequency sub-band characteristic value > the low-frequency sub-band threshold and the high-frequency sub-band characteristic value > the high-frequency sub-band threshold, it is determined that the product to be detected has both hole depression defects as shown in Figure 3 (c) and Figure 3 and also has as shown in Figure 3 (a) and Figure 3The crack and edge defect shown in (b);

[0095] If the eigenvalue of the low-frequency sub-band ≤ the threshold of the low-frequency sub-band, and the eigenvalue of the high-frequency sub-band > the threshold of the high-frequency sub-band, it is determined that the product to be detected only has the crack shown in Figure 3 (a) and the edge defect shown in Figure 3 (b);

[0096] If the eigenvalue of the low-frequency sub-band > the threshold of the low-frequency sub-band, and the eigenvalue of the high-frequency sub-band ≤ the threshold of the high-frequency sub-band, it is determined that the product to be detected only has the hole shown in Figure 3 (c) and the depression defect shown in Figure 3 (d);

[0097] If the eigenvalue of the low-frequency sub-band ≤ the threshold of the low-frequency sub-band, and the eigenvalue of the high-frequency sub-band ≤ the threshold of the high-frequency sub-band, it is determined that the product to be detected neither has the hole and depression defects shown in Figure 3 (c) and Figure 3 (d) nor has the crack and edge defect shown in Figure 3 (a) and Figure 3 (b).

[0098] As shown in Figure 2 , the result of real-time detection of the cutting product by the visual detection method provided by the present invention on the laser cutting production line.

[0099] In the detection of laser-cut products, extracting the 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 depressions. The low-frequency sub-band usually contains the main structural information of the image, such as shape and size, while the high-frequency sub-band contains the 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 depressions is crucial because these defects will affect the structural integrity and functionality of the products.

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

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

[0102] S11: Apply the 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 high-frequency part H of each row of the input image;

[0103] S12: On the basis of step S11, continue to apply the Daubechies wavelet to perform two-dimensional decomposition on each column of the input image to obtain the LL sub-band, LH sub-band, HL sub-band, and HH sub-band:

[0104]

[0105] Where 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 sub-band, LH(i, j) is the LH sub-band, HL(i, j) is the HL sub-band, HH(i, j) is the HH sub-band, and (i, j) is the corresponding image point after the input image I(x, y) is decomposed; I(i, j) is the sub-image obtained by decomposing the input image I(x, y);

[0106] As Figure 4 shown, after decomposing the sub-image I(i + 1, j + 1), the sub-image I(i, j) is obtained. This sub-image has a low-frequency sub-band LL1 and high-frequency sub-bands HL1, LH1, and HH1; continue to perform two-dimensional decomposition on the low-frequency sub-band LL1 based on the Daubechies wavelet to obtain the sub-image I(i - 1, j - 1), and the sub-image I(i - 1, j - 1) has a low-frequency sub-band LL2 and high-frequency sub-bands HL2, LH2, and HH2;

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

[0108] The image is decomposed two-dimensionally one by one through Daubechies wavelets to obtain the corresponding high-frequency subband information and low-frequency subband information, effectively decomposing the feature information of the image at different scales and directions collected by the camera. The obtained low-frequency subband (LL) is used to represent the global features of the image, and the high-frequency subbands (LH, HL, HH) are 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, containing horizontal edge details; HL (high-frequency - low-frequency) represents the high-frequency information in the vertical direction of the image, containing 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, multi-scale and multi-directional feature information of the image can be extracted, and then defects such as cracks, edges, holes, and depressions can be classified and identified.

[0109] Step S2 includes:

[0110] S21: Calculate the gradient intensity G LL (i, j):

[0111] 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 y-axis direction respectively.

[0112] The spherical harmonic lighting model is used to approximate the distribution of the light source, especially in the global lighting and reflection calculations in complex scenes, which is beneficial to the multi-angle fusion of the light source on the product surface, facilitating the detection accuracy of the product image and avoiding the situation of misclassifying product detection defects due to the lighting angle. Therefore, step S22 is further carried out;

[0113] S22: Construct a third-order spherical harmonic lighting model

[0114]

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

[0116]

[0117]

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

[0119]

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

[0121] S23: Calculate the spherical harmonic coefficient c lm :

[0122]

[0123] S24: Calculate the global brightness change eigenvalue of the low-frequency subband:

[0124]

[0125] The polar angle θ and the azimuth angle are two angles in the spherical coordinate system that describe the position of a point on the sphere, and calculating them 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 azimuthal direction. By fitting the illumination model, the directivity and distribution of illumination can be more accurately described, which is applicable to scenarios that need to handle complex illumination conditions, such as backlighting, strong light, etc.

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

[0127] Such as Figure 5 shown, Figure 5 (a) shows the reconstruction limitation of the spherical harmonic spectrum when the spherical harmonic order l = B - 1 under the transverse limitation of the magnetic quantum number m, Figure 5 (b) shows the image information under different spectra obtained by performing a reversible linear mapping on the image after extracting the low-frequency subband information under the reconstruction limitation condition of Figure 5 (a), Figure 5 (c) shows that under the image information obtained in Figure 5 (b), further perform the spherical harmonic coefficient c of step S23 lm, calculate the global brightness change eigenvalue Vb(i,j) for the image expansion calculation of different sub-band information, and then obtain the accurate global brightness eigenvalue of the image extracted from the low-frequency sub-band information of the product.

[0128] Step S3 includes:

[0129] S31: Apply a band-pass filter to the LH sub-band, HL sub-band, and HH sub-band obtained in step S12 respectively for texture feature extraction. The calculation formula for the texture feature filtering value is as follows:

[0130]

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

[0132] Where, I(i′,j′) is the smoothed image of the image I(i,j) in the two-dimensional pixel coordinate system after being filtered by the Gabor filter; * represents convolution calculation; Φ is the filter direction, λ is the filter wavelength (used to control the filtering frequency), σ is the standard deviation of the Gaussian function of the filter (used to control the bandwidth), γ is the spatial aspect ratio, ψ is the phase offset; 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 obtained through enhanced training after multiple samples are filtered; in practical applications, the phase response of the band-pass filter can be cumulative, and the phase offset ψ change may occur in a relatively large frequency range. For example, the phase response of a 1kHz, 6-pole, 0.5dB Chebyshev band-pass filter will show different amounts of phase change, such as 180°, 360°, or 540° phase change, under different combinations of parts; the band-pass filter convolves the image through a filter with a specific direction and frequency to extract texture information in a specific direction and scale;

[0133] S32: As Figure 6 shown, further calculate the horizontal gradient G Figure 6 (i',j') and vertical gradient G H,x (i',j') of the high-frequency sub-band for the original image after band-pass filtering: H,y (i',j'):

[0134]

[0135] Where, H includes LH, HL, and HH;

[0136] S33: Calculate the gradient direction β(i',j') and gradient value G H(i',j'):

[0137]

[0138] S34: Based on the gradient direction β(i',j') of the high-frequency sub-band in step S33, for Figure 6 the high-frequency sub-band of the finally obtained convolution calculation result, perform non-maximum suppression to accurately locate the edge positions. By comparing the neighborhood values of each pixel (i',j') in its gradient direction, retain the local gradient maximum and suppress the non-local maximums;

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

[0140] If its gradient direction β(i',j') is closer to 180° (i.e., closer to the horizontal direction), then further compare the gradient values of the current pixel (i',j') with its left and right pixels;

[0141] If its gradient direction β(i′,j′) is closer to 90° (i.e., closer to the vertical direction), then further compare the gradient values of the current pixel (i′,j′) with its upper and lower pixels;

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

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

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

[0145] S36: Perform edge tracking processing on the high-frequency sub-band image processed in step S35, and connect the weak edge pixels of the high-frequency sub-band image to the strong edges through the hysteresis effect;

[0146] S37: Based on the high-frequency sub-band information obtained after double-threshold detection and edge tracking processing, calculate the high-frequency sub-band eigenvalue.

[0147] The double-threshold detection in step S35 includes:

[0148] S351: Set a high threshold G H,max and a low threshold G H,min :

[0149]

[0150] Among them, M is the total number of the horizontal coordinates i' of pixels, and N is the total number of the vertical coordinates j' of pixels; Max(G H,max ) is the maximum value among the high-frequency sub-band gradient values of multiple pixel points, and Min(G H,max ) is the minimum value among the high-frequency sub-band gradient values of multiple pixel points;

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

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

[0153] 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.

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

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

[0156]

[0157] Among them, α is the coupling coefficient, 0 < α < 1, preferably, α = 0.5; g H (i, j; λ, Φ, ψ, σ, γ) is the sum of the texture feature filtering values obtained by using the calculation formula in step S31 for the high-frequency sub-band, ∑ LH,HL,HH G H (i′, j′) is the sum of the high-frequency sub-band gradient values;

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

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

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

[0161] The present invention also provides a visual inspection system for laser - cut products using the method as described above, as Figure 7 shown. The system includes a camera set on the laser cutting machine for real - time detection of the product and acquisition of 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;

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

[0163] The low - frequency sub - band eigenvalue calculation module is used to extract the global brightness change feature of the surface of the product to be detected from the obtained low - frequency sub - band information and calculate the global brightness change eigenvalue of the low - frequency sub - band as the low - frequency sub - band eigenvalue;

[0164] The high - frequency sub - band eigenvalue calculation module is used to extract the texture feature and edge feature of the surface of the product to be detected from the obtained high - frequency sub - band information, calculate the texture eigenvalue and edge eigenvalue of the high - frequency sub - band; 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;

[0165] The screening control module is used to judge whether the low - frequency sub - band eigenvalue is greater than the low - frequency sub - band threshold and at the same time judge whether the high - frequency sub - band eigenvalue is greater than the high - frequency sub - band threshold;

[0166] If the low - frequency sub - band eigenvalue > the low - frequency sub - band threshold and the high - frequency sub - band eigenvalue > the high - frequency sub - band threshold, it is determined that the product to be detected has both hole - depression defects and crack and edge defects;

[0167] If the low - frequency sub - band eigenvalue ≤ the low - frequency sub - band threshold and the high - frequency sub - band eigenvalue > the high - frequency sub - band threshold, it is determined that the product to be detected has only crack and edge defects;

[0168] If the eigenvalue of the low-frequency sub-band > the threshold of the low-frequency sub-band, and the eigenvalue of the high-frequency sub-band ≤ the threshold of the high-frequency sub-band, it is determined that the product to be detected only has hole and depression defects;

[0169] If the eigenvalue of the low-frequency sub-band ≤ the threshold of the low-frequency sub-band, and the eigenvalue of the high-frequency sub-band ≤ the threshold of the high-frequency sub-band, it is determined that the product to be detected has neither hole and depression defects nor crack and edge defects.

[0170] The above formulas are all dimensionless and take their numerical values for calculation. The formula is a formula obtained by collecting a large amount of data for software simulation to get the closest to the real situation. The preset parameters in the formula are set by those skilled in the art according to the actual situation.

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

[0172] 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 present invention to the specific implementation manners. Obviously, many modifications and variations can be made according to the content of this specification. These embodiments are selected and specifically described in this specification to better explain the principle and practical application of the present invention, so that those skilled in the art in the technical field can well understand and utilize the present invention. The present invention is only limited by the claims and their full scope and equivalents.

Claims

1. Visual inspection method for laser cutting products. The method performs real-time inspection on products based on a camera installed on a laser cutting machine and collects product images obtained by cutting. It is characterized in that, It includes the following steps: S1. Filter the acquired image and extract high-frequency subband information and low-frequency subband information; S2. Extract the global brightness change feature of the surface of the product to be detected from the obtained low-frequency subband information, and calculate the global brightness change feature value of the low-frequency subband as the low-frequency subband feature value; S3. Extract the texture feature and edge feature of the surface of the product to be detected from the obtained high-frequency subband information, and calculate the texture feature value and edge feature value of the high-frequency subband; Multiscale fusion is performed on the texture feature value and edge feature value of the high-frequency subband to obtain the high-frequency subband feature value; S4. Judge whether the low-frequency subband feature value is greater than the low-frequency subband threshold, and at the same time judge whether the high-frequency subband feature value is greater than the high-frequency subband threshold; If the low-frequency subband feature value > the low-frequency subband threshold and the high-frequency subband feature value > the high-frequency subband threshold, it is determined that the product to be detected has both hole depression defects and crack and edge defects; If the low-frequency subband feature value ≤ the low-frequency subband threshold and the high-frequency subband feature value > the high-frequency subband threshold, it is determined that the product to be detected only has crack and edge defects; If the low-frequency subband feature value > the low-frequency subband threshold and the high-frequency subband feature value ≤ the high-frequency subband threshold, it is determined that the product to be detected only has hole depression defects; If the low-frequency subband feature value ≤ the low-frequency subband threshold and the high-frequency subband feature value ≤ the high-frequency subband threshold, it is determined that the product to be detected has neither hole depression defects nor crack and edge defects.

2. The visual inspection method for laser cutting products according to claim 1, characterized in that, The step S1 of extracting high-frequency subband information and low-frequency subband information includes the following steps: S11: Apply the 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 high-frequency part H of each row of the input image; S12: On the basis of the step S11, continue to apply the Daubechies wavelet to perform two-dimensional decomposition on each column of the input image to obtain the LL subband, LH subband, HL subband, and HH subband: where h is the function coefficient of the low-pass filter, and 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, and (i, j) is the corresponding image point after the input image I(x, y) is decomposed; I(i, j) is the sub-image obtained by decomposing the input image I(x, y); S13: Define the LL subband as the low-frequency subband information, and define the HL subband, HL subband, and HH subband as the high-frequency subband information.

3. The visual inspection method for laser cutting products according to claim 2, wherein The step S2 includes: S21: Calculate the gradient intensity G of the low-frequency sub-band LL(i, j) LL (i, j): G LL,x (i,j) and G LL,y (i, j) are the low-frequency subband gradients of the image point (i, j) in the x-axis direction and the y-axis direction respectively, S22: Construct a third-order spherical harmonic lighting model where \(l\) is the spherical harmonic degree, \(0\leq l\leq2\); represents the frequency component of the spherical harmonic function; \(m\) is an integer satisfying \(-l\leq m\leq l\), called the magnetic quantum number; \(\theta\) and \(\varphi\) are the polar angle and azimuth angle in spherical coordinates respectively, \(0\leq\theta\leq\pi\), is the associated Legendre polynomial; \(\delta\) is an imaginary number, where X, Y, and Z are the abscissa, ordinate, and vertical coordinate in the three-dimensional coordinate system of the point (x, y) corresponding to the input image I(x, y) in the two-dimensional image coordinate system, respectively; Among them, (-1) m is the Shortley-Condon phase, η ∈ [-1, 1]; when m = 0, is to find the l m-th derivative of P (η) with respect to the independent variable η; S23: Calculate the spherical harmonic function coefficient c lm : S24: Calculate the global brightness change feature value of the low-frequency subband:

4. The visual inspection method for laser cutting products according to claim 2, characterized in that, The step S3 includes: S31: Respectively use a band-pass filter to extract texture features from the LH subband, HL subband, and HH subband obtained in the step S12. The texture feature filtering value calculation formula is as follows: I(i′, j′) = I(i, j) * g(i, j; λ, Φ, ψ, σ, γ) Wherein, I(i′, j′) is the smoothed image of the 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 Gaussian function of the filter, γ is the spatial aspect ratio, and ψ is the phase offset; the width of the image I(x, y) is W and the height is H; i′ = icosΦ + jsinΦ; j′ = -isinΦ + jcosΦ; S32: Calculate the horizontal gradient G H,x (i′, j′) and the vertical gradient G H,y (i′, j′) of the high-frequency subband using the Sobel operator: H,x (i′,j′) and vertical gradient G H,y (i′,j′): Wherein, 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 subband in the S33 step, perform non-maximum suppression on the high-frequency subband; 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°, then further compare the gradient values of the current pixel (i′, j′) with its upper pixel and 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 process of comparing pixel values one by one along its gradient direction, if the pixel (i′, j′) is a local maximum in the corresponding gradient direction, then keep this point; otherwise, set its gradient value to 0; S35: Based on the result of the S34 step, further perform double-threshold detection on the gradient value of the pixel (i′, j′) to distinguish and obtain the strong edges, weak edges, and non-edge pixels of the image; S36: Perform edge tracking processing on the high-frequency subband image processed in the S35 step, and connect the weak edge pixels of the high-frequency subband image to the strong edges through the hysteresis effect; S37: Calculate the high-frequency subband eigenvalue based on the high-frequency subband information obtained after double-threshold detection and edge tracking processing.

5. The visual inspection method for laser cutting products according to claim 4, wherein The double-threshold detection in the S35 step includes: S351: Set high threshold G H,max and low threshold G H,min : Where M is the total number of pixel abscissas i', and N is the total number of pixel ordinates j'; Max(G H,max ) is the maximum value among the high-frequency subband gradient values of multiple pixel points, and Min(G H,max ) is the minimum value among the high-frequency subband gradient values of multiple pixel points; 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 determined to be 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 visual inspection method for laser cutting products according to claim 4, wherein The logic of the edge tracking processing in the S36 step is as follows: Traverse all weak edge pixels, check whether they are adjacent to strong edge pixels, and if adjacent, mark them as edge pixels; if not adjacent to strong edge pixels, delete them.

7. The visual inspection method for laser cutting products according to claim 4, characterized in that, The calculation formula for calculating the high-frequency subband eigenvalue in the S37 step is as follows: where α is the coupling coefficient, 0 < α < 1; g H (i, j; λ, Φ, ψ, σ, γ) is the sum of texture feature filtering values of the high-frequency subband, ∑ LH,HL,HH G H (i′, j′) is the sum of gradient values of the high-frequency subband; g H g(i,j; λ, Φ, ψ, σ, γ) = LH g(i,j; λ, Φ, ψ, σ, γ) + HL g(i,j; λ, Φ, ψ, σ, γ) + HH g(i,j; λ, Φ, ψ, σ, γ); ∑ LH,HL,HH G H G(i′, j′) = LH G(i′, j′) + HL G(i′, j′) + HH G(i′, j′).

8. A visual inspection system for laser cutting products using the method according to any one of claims 1-7, the system comprising a camera disposed on a laser cutting machine for performing real-time inspection on products and acquiring product images obtained by cutting; characterized in that, The system further 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 subband information extraction module is used to filter the collected image and extract high-frequency subband information and low-frequency subband information; The low-frequency subband eigenvalue calculation module is used to extract the global brightness change feature of the surface of the product to be detected from the obtained low-frequency subband information, and calculate the low-frequency subband global brightness change eigenvalue as the low-frequency subband eigenvalue; The high-frequency sub-band eigenvalue calculation module is used to extract the texture features and edge features of the surface of the product to be detected from the obtained high-frequency sub-band information, calculate the high-frequency sub-band texture feature values and edge feature values; perform multi-scale fusion on the texture feature values and edge feature values of the high-frequency sub-band to obtain the high-frequency sub-band eigenvalue; The screening control module is used to judge whether the low-frequency sub-band eigenvalue is greater than the low-frequency sub-band threshold and simultaneously judge whether the high-frequency sub-band eigenvalue is greater than the high-frequency sub-band threshold; If the low-frequency sub-band eigenvalue > the low-frequency sub-band threshold and the high-frequency sub-band eigenvalue > the high-frequency sub-band threshold, it is determined that the product to be detected has both hole and depression defects and crack and edge defects; If the low-frequency sub-band eigenvalue ≤ the low-frequency sub-band threshold and the high-frequency sub-band eigenvalue > the high-frequency sub-band threshold, it is determined that the product to be detected only has crack and edge defects; If the low-frequency sub-band eigenvalue > the low-frequency sub-band threshold and the high-frequency sub-band eigenvalue ≤ the high-frequency sub-band threshold, it is determined that the product to be detected only has hole and depression defects; If the low-frequency sub-band eigenvalue ≤ the low-frequency sub-band threshold and the high-frequency sub-band eigenvalue ≤ the high-frequency sub-band threshold, it is determined that the product to be detected has neither hole and depression defects nor crack and edge defects.

Citation Information

Patent Citations

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

    CN106803242A

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

    CN106897999A