Monitoring method for supporting strips on working table of laser cutting machine
The method automates slag detection on laser cutting machine worktables using RGB to HSV conversion and K-means clustering, improving efficiency and accuracy by reducing manual intervention and lighting interference.
Patent Information
- Application Number
- CN202510323758.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-07-15
AI Technical Summary
There are missed cleaning and excess cleaning of slag monitoring on the support strip of the work surface of the laser cutting machine, resulting in low slag removal efficiency. The existing technology is affected by the external lighting environment, and the image processing cost is high, and the accuracy and efficiency are low.
The visual detection device is used to combine the K-mean clustering algorithm and the B-spline curve, and the differential B-spline curve is generated through image conversion and segmentation, and the metal slag is automatically identified and the cleaning of the slag remover is controlled.
Improve the accuracy and monitoring efficiency of image segmentation, reduce time and labor costs, and ensure processing accuracy and efficiency.
Smart Images

Figure CN120318156A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of laser cutting machines, and particularly to a monitoring method for a support bar of a workbench surface of a laser cutting machine. Background Art
[0002] Laser cutting has absolute advantages in terms of processing effect and speed, and gradually meets the needs of the public. Laser cutting machines have the advantages of high efficiency and automation, and successfully overcome technical difficulties that are difficult to overcome by traditional methods. However, a large amount of metal slag is generated during the working process of laser cutting machines, and the slag will adhere to the support bars of the workbench surface. Once the slag solidifies, the working efficiency of the laser cutting machine will be affected, the error rate will increase accordingly, and the processing accuracy will be reduced. The slag remover can effectively remove slag from the support bars of the workbench surface, but the technology for monitoring the support bars of the workbench surface of laser cutting machines needs to be improved. There must be omissions in cleaning the slag position by the slag remover and redundant cleaning of clean positions, resulting in a reduction in slag removal efficiency.
[0003] At present, cameras can monitor the support bars of the workbench surface in real time, but additional manual viewing of the monitoring images is required, which requires a large amount of labor costs. Even if digital image processing technology is used to extract the slag on the surface of the support bars of the workbench surface through color intensity differences, the external light environment will inevitably affect the image brightness, thereby changing the color intensity and causing false extraction. Moreover, it takes a large amount of time cost to judge each pixel point of the detected image.
[0004] In view of this, we propose a monitoring method for a support bar of a workbench surface of a laser cutting machine to solve the existing problems. Summary of the Invention
[0005] The purpose of the present invention is to provide a monitoring method for a support bar of a workbench surface of a laser cutting machine to solve the problems raised in the above background art.
[0006] To achieve the above purpose, the present invention provides the following technical solution: A monitoring method for a support bar of a workbench surface of a laser cutting machine, including:
[0007] S1: A vision detection device is set up above the workbench surface of the laser cutting machine, and the vision detection device collects images of the working area to obtain a reference image;
[0008] S2: The reference image is converted from the three-primary color space to the hue space, and then the reference image is converted from the hue space to the gray scale space;
[0009] S3: The K-means clustering algorithm is used to segment the support bar and the background in the reference image, and then the background part is set to a uniform gray scale to obtain a reference segmentation image. According to the gray scale distribution of the reference segmentation image, a reference B-spline curve is constructed;
[0010] S4: Place the workpiece in the working area. The laser cutting machine cuts the workpiece. After the cutting is completed, the workpiece leaves the working area, and then the vision detection device collects an image of the working area to obtain a detection image.
[0011] S5: Convert the detection image from the three-primary color space to the hue space, then convert the detection image from the hue space to the grayscale space, and set the background part to the unified grayscale in S3.
[0012] S6: Use the K-means clustering algorithm to segment the detection image to obtain a detection segmentation image. According to the grayscale distribution of the detection segmentation image, construct a detection B-spline curve. Subtract the detection B-spline curve from the reference B-spline curve to generate a difference B-spline curve. If there are points on the difference B-spline curve that exceed the threshold, it is regarded as the existence of metal slag, and the slag remover cleans according to the grayscale comparison result.
[0013] Further, the three primary colors of the three-primary color space are R, G, and B in the RGB color space, the hue of the hue space is H in the HSV color space, and the grayscale space uses the grayscale value as the dimension.
[0014] Further, the H is obtained by the algorithm for converting RGB to HSV, and the value range of the grayscale value is reduced from [0, 360) of H to [0, 180).
[0015] Further, the unified grayscale is 255.
[0016] Further, the background part is the coordinate set of the background after segmenting the support bar and the background in the reference image using the K-means clustering algorithm in S3.
[0017] Further, when using the K-means clustering algorithm to segment the reference image or the detection image, the grayscale value of each grayscale division region of the image is set to the category center grayscale of each grayscale division region.
[0018] Further, among the grayscale values of each grayscale division region of the image, record the minimum category center grayscale and the maximum category center grayscale in the range of [0, 180). If the sum of the minimum category center grayscale and 180 minus the maximum category center grayscale is less than the absolute value of the difference between any other two category center grayscales in the range of [0, 180), then set the grayscale value of the grayscale division region corresponding to the maximum category center grayscale to the minimum category center grayscale.
[0019] Further, the nodes of the reference B-spline curve are all the grayscale normalization values and the proportion of the corresponding pixel numbers in the reference segmentation image.
[0020] Further, the knots of the detected B-spline curve are the proportion of all gray-scale normalization values within the range of [0, 180) of the detected segmented image and the corresponding number of pixels.
[0021] Further, the dependent variable of the differential B-spline curve is the difference between the dependent variables corresponding to the same independent variable of the detected B-spline curve and the reference B-spline curve.
[0022] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0023] 1. The combination of the color space conversion algorithm and the K-means clustering algorithm realizes the hue segmentation of the acquired image of the support bar on the workbench of the laser cutting machine, solves the interference problem of the external light on the image brightness, and thus improves the accuracy of image segmentation.
[0024] 2. The combination of the hue segmentation result and the B-spline surface realizes the data expression of the acquired image. By detecting the difference between the detected B-spline curve and the reference B-spline curve to generate a differential B-spline curve to detect whether there is metal slag, it replaces the method of judging each pixel point of the detected image, reduces the time cost, and realizes the efficient monitoring of the support bar on the workbench of the laser cutting machine. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is the overall step flow chart of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0026] The technical solution of the present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0027] Embodiment 1
[0028] As Figure 1 shown, the overall step flow of a monitoring method for the support bar on the workbench of a laser cutting machine includes:
[0029] S1: A vision detection device is set up above the workbench of the laser cutting machine, and the vision detection device collects images of the working area to obtain a reference image;
[0030] S2: The reference image is converted from the three-primary color space to the hue space, and then the reference image is converted from the hue space to the gray-scale space;
[0031] S3: The K-means clustering algorithm is used to segment the support bar and the background in the reference image, and then the background part is set to a uniform gray scale to obtain a reference segmented image. According to the gray-scale distribution of the reference segmented image, a reference B-spline curve is constructed;
[0032] S4: Place the workpiece in the working area. The laser cutting machine cuts the workpiece. After the cutting is completed, the workpiece leaves the working area, and then the vision detection device collects an image of the working area to obtain a detection image.
[0033] S5: Convert the detection image from the three - primary - color space to the hue space, then convert the detection image from the hue space to the grayscale space, and set the background part to the unified grayscale in S3.
[0034] S6: Use the K - means clustering algorithm to segment the detection image to obtain a detection segmentation image. According to the grayscale distribution of the detection segmentation image, construct a detection B - spline curve. Subtract the detection B - spline curve from the reference B - spline curve to generate a difference B - spline curve. If there are points on the difference B - spline curve that exceed the threshold, it is regarded as the existence of metal slag, and the slag remover cleans according to the grayscale comparison result.
[0035] Further, the three primary colors of the three - primary - color space are R, G, and B in the RGB color space, the hue of the hue space is H in the HSV color space, and the grayscale space uses the grayscale value as the dimension, which solves the problem of interference caused by external light on the image brightness.
[0036] Further, the H is obtained by the algorithm of converting from RGB to HSV, and the value range of the grayscale value is folded from [0, 360) of H to [0, 180) so that each hue value can be fully displayed in the image.
[0037] Further, the unified grayscale is 255. 255 is not within the hue range of [0, 180), which is convenient for the obvious segmentation of the support bar on the workbench surface and the background.
[0038] Further, the background part is the coordinate set of the background after segmenting the support bar and the background in the reference image by using the K - means clustering algorithm in S3. So when subsequently segmenting the background of the detection image, it can save the time consumed by hue segmentation. Using coordinate segmentation can save a lot of time.
[0039] Further, when using the K - means clustering algorithm to segment the reference image or the detection image, the grayscale value of each grayscale division region of the image is set as the category - center grayscale of each grayscale division region, which is convenient for subsequent calculation of the chromaticity distribution.
[0040] Further, among the gray values of the gray division regions of the images, the minimum class center gray value and the maximum class center gray value are recorded within the range of [0, 180). If the sum of the minimum class center gray value and 180 minus the maximum class center gray value is less than the absolute value of the difference between any other two class center gray values within the range of [0, 180), then the gray value of the gray division region corresponding to the maximum class center gray value is set to the minimum class center gray value to solve the interference caused by the hue angle value.
[0041] Further, the knots of the reference B-spline curve are all the gray normalization values and the proportion of the corresponding pixel numbers within the reference segmentation image.
[0042] Further, the knots of the detection B-spline curve are all the gray normalization values within the range of [0, 180) of the detection segmentation image and the proportion of the corresponding pixel numbers.
[0043] Further, the dependent variable of the difference B-spline curve is the difference between the dependent variables corresponding to the same independent variable of the detection B-spline curve and the reference B-spline curve.
[0044] The working principle of the monitoring method for the support bar of the laser cutting machine workbench based on Embodiment 1 is:
[0045] For the algorithm formula for RGB to HSV conversion:
[0046] If max{R, G, B} = R, then
[0047] If max{R, G, B} = G, then
[0048] If max{R, G, B} = B, then
[0049] If H < 0, then H = H + 360.
[0050] For the algorithm formula for converting H to gray value:
[0051]
[0052] For the algorithm formula of the B-spline curve with n segments and m sections:
[0053]
[0054] In the formula: P i,n (t) is the value after the i-th segment is transformed by the n-th order B-spline curve, where i = 1, 2, 3,..., m; t is the value before the B-spline curve transformation. For each point of each curve segment, 0 ≤ t ≤ 1 is satisfied. t = 0 represents the starting knot of the i-th segment, and t = 1 represents the ending knot of the i-th segment; pi+k-1 is the control point of the i-th B-spline curve; F k,n (t) is the piecewise blending function of the n-th B-spline curve, where 0 ≤ t ≤ 1, k = 0, 1, 2,..., n.
[0055] Let the set of pixels in the RGB color space of the reference image be refer, the set of pixels in the hue space of the reference image be H(refer), and the set of pixels in the grayscale space of the reference image be The set of pixels of the reference segmented image is The number of categories of the reference segmented image is K r , and the classification number of the reference segmented image is k r , the k r The set of pixels in the grayscale division region is
[0056]
[0057] Let the k r gray value at the category center be GRAY3 and GRAY4 are any two
[0058] If GRAY1 + 180 - GRAY2 < |GRAY3 - GRAY4|
[0059] Then change the gray value of the region corresponding to GRAY2 from GRAY2 to GRAY1.
[0060] The set of pixels in the background part of the reference segmented image is After uniformly setting the gray value of to 255, the set of pixels of the reference segmented image is The number of categories of the reference segmented image is K′ r , and the classification number of the reference segmented image is k′ r , the k′ r The set of pixels in the grayscale division region is
[0061]
[0062] Let the K r ′ category center gray values be arranged in ascending order as The corresponding number of pixels is The number of pixels in the background part of the reference segmented image is count b , the number of pixels of the reference segmented image is W × H, and the knots of the reference B-spline curve are The control point set p of the reference B-spline curve is obtained by referring to the knot set of the B-spline curve r . The formula of the reference B-spline curve is abbreviated as: P r (t) = F(t)p r .
[0063] Let the set of pixels in the RGB color space of the detected image be test, the set of pixels in the hue space of the detected image be H(test), and the set of pixels in the grayscale space of the detected image be According to the set of pixel coordinates, the set of pixels in the background part of the detected image is divided For , the grayscale value is uniformly set to 255, and the set of pixels in the detected segmented image is Except , the number of categories in the detected segmented image is K t , the classification number of the detected segmented image is k t , the k t set of pixels in the grayscale divided region is
[0064] Let the center grayscale of the k t category be GRAY7 and GRAY8 are any two
[0065] If GRAY5 + 180 - GRAY6 < |GRAY7 - GRAY8|
[0066] Then change the grayscale value of the region corresponding to GRAY6 from GRAY6 to GRAY5.
[0067] At this time, the set of pixels in the detected segmented image is The number of categories in the detected segmented image is K′ t , the classification number of the detected segmented image is k′ t , the k′ t set of pixels in the grayscale divided region is
[0068]
[0069] Let the center grayscales of the K′ t categories be arranged in ascending order as The corresponding number of pixels is The number of pixels in the background part of the detected segmented image is also count b, the number of pixels of the detected segmented image is also W×H, and the knots of the detected B-spline curve are The control point set p of the detected B-spline curve is obtained by detecting the knot set of the B-spline curve t . The formula for the detected B-spline curve is abbreviated as: P t (t) = F(t)p t .
[0070] The formula for the differential B-spline curve is P d (t) = P t (t) - P r (t). The threshold is threshold. If there is Then it is regarded as the one closest to gray There is metal slag at the location. According to the working area position corresponding to the pixel coordinate set in the detected segmented image , the slag remover is cleaned.
[0071] The above specific embodiments are only several preferred embodiments of the present invention. Based on the technical solution of the present invention and the relevant inspirations of the above embodiments, those skilled in the art can make various alternative improvements and combinations to the above specific embodiments.
Claims
1. A monitoring method for a support bar of a laser cutting machine workbench surface, characterized in that, Including: S1: A vision detection device is set up above the workbench surface of the laser cutting machine. The vision detection device collects images of the working area to obtain a reference image; S2: The reference image is converted from the three - primary - color space to the hue space, and then from the hue space to the grayscale space; S3: The K - means clustering algorithm is used to segment the support bars and the background in the reference image, and then the background part is set to a unified grayscale to obtain a reference segmented image. According to the grayscale distribution of the reference segmented image, a reference B - spline curve is constructed; S4: A workpiece is placed in the working area. The laser cutting machine cuts the workpiece. After cutting is completed, the workpiece leaves the working area, and the vision detection device collects images of the working area again to obtain a detection image; S5: The detection image is converted from the three - primary - color space to the hue space, and then from the hue space to the grayscale space, and the background part is set to the unified grayscale in S3; S6: The K - means clustering algorithm is used to segment the detection image to obtain a detection segmented image. According to the grayscale distribution of the detection segmented image, a detection B - spline curve is constructed. The detection B - spline curve is subtracted from the reference B - spline curve to generate a difference B - spline curve. If there are points on the difference B - spline curve that exceed the threshold, it is considered that there is metal slag, and the slag remover conducts cleaning according to the grayscale comparison result.
2. A monitoring method for the support bars on the workbench surface of a laser cutting machine according to claim 1, wherein: The three primary colors in the three - primary - color space are R, G, and B in the RGB color space, the hue in the hue space is H in the HSV color space, and the grayscale space uses the grayscale value as the dimension.
3. A monitoring method for the support bars on the workbench surface of a laser cutting machine according to claim 2, wherein: The H is obtained by the algorithm for converting RGB to HSV, and the value range of the grayscale value is folded from [0, 360) of H to [0, 180).
4. A monitoring method for the support bars on the workbench surface of a laser cutting machine according to claim 1, wherein: The unified grayscale is 255.
5. A monitoring method for the support bars on the workbench surface of a laser cutting machine according to claim 1, wherein: The background part is the coordinate set of the background after segmenting the support bars and the background in the reference image using the K - means clustering algorithm in S3.
6. A monitoring method for the support bars on the workbench surface of a laser cutting machine according to claim 1, wherein: When using the K - means clustering algorithm to segment the reference image or the detection image, the grayscale value of each grayscale division area of the image is set to the category - center grayscale of each grayscale division area.
7. A monitoring method for the support bars on the workbench surface of a laser cutting machine according to claim 6, wherein: Among the grayscale values of the grayscale divided regions of the images, record the minimum class center grayscale and the maximum class center grayscale within the range of [0, 180). If the difference between the sum of the minimum class center grayscale and 180 and the maximum class center grayscale is less than the absolute value of the difference between any other two class center grayscales within the range of [0, 180), then set the grayscale value of the grayscale divided region corresponding to the maximum class center grayscale to the minimum class center grayscale.
8. The monitoring method of the support bar of the laser cutting machine workbench surface according to claim 1, characterized in that: The knots of the reference B-spline curve are all the grayscale normalization values and the proportion of the corresponding pixel numbers in the reference segmentation image.
9. The monitoring method of the support bar of the laser cutting machine workbench surface according to claim 1, characterized in that: The knots of the detection B-spline curve are all the grayscale normalization values and the proportion of the corresponding pixel numbers in the detection segmentation image within the range of [0, 180).
10. The monitoring method of the support bar of the laser cutting machine workbench surface according to claim 1, characterized in that: The dependent variable of the difference B-spline curve is the difference between the dependent variables of the detection B-spline curve and the reference B-spline curve corresponding to the same independent variable.