Laser marking control method and device and storage medium

Through the combination of machine vision and SVM support vector machine model, the laser marking process is monitored and adjusted in real time, the accuracy of pattern position and depth control is solved, efficient automatic marking is achieved, and production efficiency and product quality are improved.

CN118926709AInactive Publication Date: 2024-11-12SHENZHEN GUANGYUAN IND CO LTD

Patent Information

Application Number
CN202411072848.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-11-12
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

During the laser marking process, the existing technology cannot monitor and adjust the marking status in real time, resulting in inaccurate pattern position and failure to meet the marking depth, especially in large-scale production, there are problems of deviations and defective products.

Method used

The machine vision module is used to collect image data and input it into the pre-trained SVM support vector machine model to obtain position and depth information, and adjust the running path and energy density of the laser head according to the difference to achieve real-time adjustment.

Benefits of technology

It improves the accuracy and accuracy of marking, eliminates the uncertainty of human operations, realizes unattended automated marking, and improves production efficiency and product quality stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118926709A_ABST
    Figure CN118926709A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of laser marking, and discloses a laser marking control method and device and a storage medium. The method comprises the following steps: acquiring image data of a to-be-marked product acquired by a machine vision module; inputting the image data into a pre-trained SVM (Support Vector Machine) model to obtain position coordinate information and marking depth information of the to-be-marked product; comparing the position coordinate information with preset standard coordinate information to obtain a first difference value between the position coordinate information and the standard coordinate information; comparing the marking depth information with preset standard depth information to obtain a second difference value between the marking depth information and the standard depth information; when the first difference value is larger than a system allowable difference value, the operation path of a laser head is adjusted; and when the second difference value exceeds the preset depth interval, the energy density of the laser head is adjusted. According to the method, the accuracy and precision in the laser marking process can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of laser marking technology, and in particular to a laser marking control method, device and storage medium. Background Art

[0002] At present, laser marking is an advanced surface treatment technology that uses high-energy laser beams to permanently mark the surfaces of various materials. This technology is widely used in industrial fields, including electronics, automobiles, medical, aerospace, jewelry manufacturing and many other industries. Laser marking machines can accurately engrave information such as text, patterns, barcodes and QR codes on the surface of products, which not only improves the traceability of products, but also enhances anti-counterfeiting capabilities. Compared with traditional mechanical engraving or chemical etching, laser marking has the advantages of non-contact, fast speed, high precision, good flexibility, no consumables, and low maintenance costs. With the development of technology, the types of laser marking machines are becoming increasingly rich, including CO2 laser marking machines, fiber laser marking machines, UV laser marking machines, etc. They have their own characteristics and advantages according to the different laser wavelengths and application scenarios. For example, CO2 laser marking machines are suitable for non-metallic materials, while UV laser marking machines are good at fine marking and internal marking of transparent materials. With the growth of market demand and the expansion of application areas, laser marking technology is constantly improving and developing towards higher speed, higher efficiency, higher precision and greater intelligence, showing broad development prospects and huge market potential.

[0003] Before laser marking, the operator needs to set the laser power, frequency, pulse width, scanning speed and other parameters according to the marking material, pattern complexity and marking requirements. These parameters are usually set by the control software and stored as a program file. After that, use professional marking software (such as EZCAD, LaserSoft, etc.) to design the marking pattern. The operator can import vector graphics or use the built-in tools of the software to create the marking pattern. After the design is completed, the pattern will be converted into control instructions for the laser and scanning system. Then, the set parameters and designed pattern are downloaded to the control system of the laser marker through the control software. These instructions will guide how the laser and scanning galvanometer operate during the marking process. And the workpiece to be marked is fixed on the marking platform or fixture. The fixation of the workpiece needs to ensure that its position and angle are accurate to avoid offset during the marking process. Finally, start the marking program, the laser emits the laser beam according to the preset parameters, and the scanning galvanometer moves the laser beam according to the control instructions to mark the surface of the workpiece.

[0004] It can be seen that in the above control, the actions of the laser and the scanning galvanometer are executed completely according to the pre-set program, and will not be adjusted according to the real-time situation, which will lead to defects such as inaccurate marking pattern position and substandard marking depth. In the marking of large quantities of products, the operator needs to check the marking results to ensure that they meet the expected requirements. If deviations or defective products occur, it is necessary to manually adjust the parameters or workpiece position and re-mark, which is time-consuming and labor-intensive. Summary of the invention

[0005] The present invention provides a laser marking control method, device and storage medium, which can monitor the marking status in real time during the marking process and adjust the motion path and marking depth, thereby improving the accuracy and precision of the laser marking process.

[0006] In a first aspect, in order to solve the above technical problems, the present invention provides a laser marking control method, comprising: Obtain image data of the product to be marked collected by the machine vision module; Input the image data into a pre-trained SVM support vector machine model to obtain the position coordinate information and marking depth information of the product to be marked; Comparing the position coordinate information with preset standard coordinate information to obtain a first difference between the position coordinate information and the standard coordinate information; Comparing the marking depth information with preset standard depth information to obtain a second difference between the marking depth information and the standard depth information; When the first difference is greater than the system allowable difference, the running path of the laser head is adjusted; when the second difference exceeds the preset depth range, the energy density of the laser head is adjusted.

[0007] Preferably, the image data is input into a pre-trained SVM support vector machine model to obtain the position coordinate information and marking depth information of the product to be marked, including: Perform contour feature recognition on the image captured by the camera, and mark the position of the image where the recognized contour feature is located as position coordinate information; The image captured by the camera is gray-processed to obtain image gray-scale information; the image gray-scale information is numerically normalized to obtain marking depth information.

[0008] Preferably, the training process of the SVM support vector model includes: Extracting first feature information from a qualified marking image, and performing feature learning on the first feature information to obtain second feature information; The second feature information is converted into standard format information, the standard format information is input into an SVM support vector machine model, and the SVM support vector machine model is trained using a kernel function and a penalty factor to obtain a trained SVM support vector machine model.

[0009] Preferably, comparing the position coordinate information with preset standard coordinate information to obtain a first difference between the position coordinate information and the standard coordinate information includes: Split into horizontal values ​​according to the position coordinate information and vertical value , according to the level value and vertical value Respectively with the preset standard level value and standard vertical value Subtracting the position coordinate information from the standard coordinate information to obtain a first difference; wherein the standard coordinate information includes a standard horizontal value and standard vertical value .

[0010] Preferably, when the second difference exceeds a preset depth range, adjusting the energy density of the laser head comprises: Adjust the energy density of the laser head by adjusting the distance between the laser head and the marking object; or Adjust the energy density of the laser head by adjusting the power of the laser head when it is applied; or, Adjust the speed of the laser head during the marking process to adjust the energy density of the laser head during the marking process.

[0011] Preferably, when the first difference is greater than a preset system allowable difference, adjusting the running path of the laser head includes: When the laser head coordinates are downward relative to the preset coordinates, the laser head moves upward; when the laser head coordinates are left relative to the preset coordinates, the laser head moves right; Wherein, the moving path of the laser head is adjusted to move on a plane parallel to the marking plane.

[0012] Preferably, when the first difference is greater than a preset system allowable difference, adjusting the running path of the laser head includes: The moving path of the laser head is adjusted to move on a plane parallel to the marking plane, and the straight-line distance and angle of the two coordinates are determined, and the laser head moves along the straight-line distance and angle.

[0013] Preferably, the method further comprises, when the first difference is greater than or equal to a maximum system preset value, moving the laser head to the target area at a predetermined first speed while reducing the energy density; and, When the first difference is less than a maximum system preset value, the laser head moves to the target area at a predetermined second speed without changing the energy density; wherein the first speed is greater than the second speed.

[0014] A second aspect of an embodiment of the present invention provides a laser marking control device, comprising: A machine vision module, used to obtain image data of the product to be marked collected by the machine vision module; An information processing module, used to input the image data into a pre-trained SVM support vector machine model to obtain the position coordinate information and marking depth information of the product to be marked; A first numerical calculation module, used for comparing the position coordinate information with preset standard coordinate information to obtain a first difference between the position coordinate information and the standard coordinate information; A second numerical calculation module is used to compare the marking depth information with the preset standard depth information to obtain a second difference between the marking depth information and the standard depth information; The motion control module is used to adjust the running path of the laser head when the first difference is greater than the preset system allowable difference; and to adjust the energy density of the laser head when the second difference exceeds the preset depth range.

[0015] A third aspect of an embodiment of the present invention provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the laser marking control method described in the first aspect above.

[0016] Compared with the prior art, the present invention has the following beneficial effects: The present invention provides a laser marking control method, device and storage medium. The method is executed by a controller, including obtaining image data of a product to be marked collected by a machine vision module; inputting the image data into a pre-trained SVM support vector machine model to obtain position coordinate information and marking depth information of the product to be marked; comparing the position coordinate information with preset standard coordinate information to obtain a first difference between the position coordinate information and the standard coordinate information; comparing the marking depth information with preset standard depth information to obtain a second difference between the marking depth information and the standard depth information; when the first difference is greater than the system allowable difference, adjusting the running path of the laser head; when the second difference exceeds the preset depth range, adjusting the energy density of the laser head.

[0017] After the controller receives the image data, it analyzes the image data and automatically adjusts the laser's running path and energy density based on the analysis results to ensure the accuracy and consistency of the marking process. This automated adjustment mechanism improves the position accuracy and depth control of the marking pattern, while eliminating the uncertainty of manual operation and realizing unattended automated marking in mass production. The entire process not only improves production efficiency and reduces labor intensity, but also ensures the stability and reliability of product quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a flow chart of a laser marking control method provided by an embodiment of the present invention; Figure 2 It is a schematic diagram of the training process of the SVM support vector machine model provided by an embodiment of the present invention; Figure 3 It is a structural schematic diagram of a laser marking control method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0020] Reference Figure 1 The first embodiment of the present invention provides a laser marking control method, comprising the following steps: S11, obtaining image data of the product to be marked collected by the machine vision module.

[0021] S12, inputting the image data into a pre-trained SVM support vector machine model to obtain the position coordinate information and marking depth information of the product to be marked.

[0022] S13: Compare the position coordinate information with preset standard coordinate information to obtain a first difference between the position coordinate information and the standard coordinate information.

[0023] S14, comparing the marking depth information with preset standard depth information to obtain a second difference between the marking depth information and the standard depth information.

[0024] S15, when the first difference is greater than the system allowable difference, adjusting the running path of the laser head; when the second difference exceeds the preset depth range, adjusting the energy density of the laser head.

[0025] Among them, it should be noted that the laser marking machine is a high-precision industrial equipment that uses a laser beam of a specific wavelength to make permanent marks on the surface of various materials. This equipment is widely used in the surface treatment of various materials such as metals, plastics, ceramics, glass, etc., and can print out text, patterns, barcodes and other information. The working principle of the laser marking machine is mainly to use the thermal effect or photochemical effect of the laser beam to cause physical or chemical changes on the surface of the material, thereby forming a lasting mark. Compared with traditional marking methods, the laser marking machine has the advantages of fast marking speed, high precision, no consumables, simple maintenance, and easy operation. It is an indispensable marking tool in modern manufacturing. Therefore, this kind of high-precision product has high requirements for the precision of the product after marking, so its high-precision control method is particularly important.

[0026] In the embodiment of the invention, after the controller receives the image data, it analyzes the image data and automatically adjusts the operation path and energy density of the laser according to the analysis results to ensure the accuracy and consistency of the marking process. This automated adjustment mechanism improves the position accuracy and depth control of the marking pattern, while eliminating the uncertainty of manual operation, and realizes truly unattended automated marking. The entire process not only improves production efficiency and reduces labor intensity, but also ensures the stability and reliability of product quality.

[0027] In step S11, it should be noted that the machine vision module is a key component in modern industrial automation and intelligent manufacturing. It captures and analyzes images through high-precision visual sensors to provide the necessary visual information for the automation system. This module usually includes different types of cameras, such as CCD (charge-coupled device) cameras, CMOS (complementary metal oxide semiconductor) cameras, and line array cameras, each of which has unique advantages and application scenarios. CCD cameras are known for their high resolution, high sensitivity, and excellent image quality, and are particularly suitable for applications that require high-quality image capture. CMOS cameras are favored for their fast imaging capabilities, low power consumption, and cost-effectiveness, and are widely used in situations that require fast response. Line array cameras are used for continuous object detection and measurement tasks with their expertise in high-speed scanning and precise measurement.

[0028] Exemplarily, in this embodiment, the machine vision module uses a CMOS camera. The image data of the product to be marked collected by the CMOS camera, and the generated digital image data contains detailed visual information of the product to be marked, which can be used for further image processing, analysis and decision making.

[0029] In step S12, the image data is input into a pre-trained SVM support vector machine model to obtain the position coordinate information and marking depth information of the product to be marked.

[0030] It should be noted that the training steps of the SVM support vector machine model are: extracting the first feature information from the qualified marked image, performing feature learning on the first feature information to obtain the second feature information; converting the second feature information into standard format information, inputting the standard format information into the SVM support vector machine model, and using the kernel function and penalty factor to train the SVM support vector model to obtain the trained SVM support vector model. The first feature is the feature vector of the image pixel, and the second feature information is a numerical value between 0-255. The specific training process of the model is as follows: Figure 2 As shown, the process is: S121, first prepare the data set, and use the machine vision module to collect a large number of qualified marking sample images. These qualified images include samples of different marking positions and depths.

[0031] S122, then extract the features, use the image pixel values ​​as feature vectors, and convert each digital image into an n×n dimensional vector, where each value of the feature vector ranges from 0 to 255. Then preprocess the image data, normalize the image data, and scale the pixel values ​​to between 0 and 1. After obtaining the original samples of the image pixels, map the samples from the original space to a higher-dimensional feature space so that the samples are linearly separable in this feature space. If the original space is finite-dimensional, that is, the number of attributes is finite, then there must be a high-dimensional feature space that makes the samples separable. Specifically, the following steps: make Indicates that After mapping, the model corresponding to the hyperplane divided in the feature space can be expressed as:

[0032] According to the above formula, the image recognition classification is converted into: (1) In the formula, Function represents the decision function for classifying image data. represents the hyperplane coefficient matrix formed according to the image data, represents the transposed matrix of the hyperplane coefficient matrix, represents the constant coefficient of the hyperplane, It represents the horizontal coordinate value of the sample point. It represents the first dimension of the sample point. The ordinate value of the coordinate, It represents the first dimension of the sample point. The horizontal coordinate value of the coordinate, Indicates taking the minimum value, Indicates that The mapped feature vector.

[0033] The dual of formula (1) is expressed as:

[0034] In the formula, represents the first-dimensional Lagrange multiplier numerical values, represents the second-dimensional Lagrange multiplier numerical values, It represents the first dimension of the sample point. The ordinate value of the coordinate, It represents the second dimension of the sample point. The ordinate value of the coordinate, Indicates that The mapped feature vector is Indicates that The transpose of the mapped eigenvector.

[0035] When processing the digital information of an image, it will make image recognition and classification very difficult. At this time, the kernel function needs to be used to avoid this problem. The kernel function is expressed as:

[0036] In the formula, It means that The transpose of the mapped eigenvector matrix, represents the kernel function, It means that The mapped feature vector.

[0037] After solving, the expression is:

[0038] In the formula, is the kernel function, represents the first-dimensional Lagrange multiplier values, It represents the second dimension of the sample point. The ordinate value of the coordinate, It means that The mapped feature vector is It means that The transpose of the mapped eigenvector, It represents the horizontal coordinate value of the sample point. represents the constant coefficient of the hyperplane.

[0039] S123, then select the kernel function. In this embodiment, the radial basis function kernel (radial BasisFunction Kernel) is used. Compared with other kernel functions, the radial basis function kernel has a strong nonlinear mapping ability, few parameters and is easy to adjust, generates a smooth decision boundary, has good generalization performance, and is robust to outliers and noise. This function can process nonlinearly separable data, and its form is as follows:

[0040] In the formula, , The value of represents the coordinate value of the image data n×n vector. It represents the parameter value used by the radial basis function kernel, which needs to be continuously optimized during the training process. Since the complexity of the model increases and the classification error becomes higher when using the support vector machine (SVM) for image processing, it is necessary to introduce a penalty factor to balance the complexity of the model and the tolerance of classification errors. In the present invention, setting a suitable penalty factor can help the model find a good segmentation boundary between different categories.

[0041] S124, when the SVM support vector machine model recognizes and processes the image, the value of the penalty factor is continuously adjusted according to the result of the classification judgment, and finally the value of the penalty factor most suitable for this experiment is obtained, so as to obtain the highest accuracy.

[0042] Furthermore, the image data is input into a pre-trained SVM support vector machine model to obtain the position coordinate information and marking depth information of the product to be marked, including: Perform contour feature recognition on the image captured by the camera, and mark the position of the image where the recognized contour feature is located as position coordinate information; The image captured by the camera is gray-processed to obtain image gray-scale information; the image gray-scale information is numerically normalized to obtain marking depth information.

[0043] Specifically, after the model training is completed, the SVM support vector machine model performs contour feature recognition on the image captured by the camera, and marks the position of the image where the recognized contour feature is located as position coordinate information.

[0044] The image captured by the camera is gray-processed to obtain image gray-scale information; the image gray-scale information is numerically normalized to obtain marking depth information, wherein the specific steps of gray-scale processing are: First, read the original image. You need to read the original color or multi-channel image data from the file or image capture device. After that, check whether the image is in RGB (red, green, and blue) mode or other multi-channel mode. Grayscale processing is mainly for images in these modes. If the image is in RGB mode, the image needs to be separated into three color channels: red, green, and blue. For each pixel, the values ​​of the three RGB color channels are converted to grayscale values ​​according to a certain weighted formula. The commonly used conversion formula is:

[0045] In the above formula, Represents the grayscale value of the image, The red percentage, Indicates the percentage of gray. Indicates the percentage of blue. Next, create a new single-channel image using the converted grayscale values, with the corresponding grayscale value used for each pixel. If the original image has other channels besides RGB (such as an alpha channel), these channels need to be merged into the grayscale image. In some cases, the generated grayscale image may need to be adjusted for contrast and brightness to improve image quality. Finally, save the processed grayscale image to a file.

[0046] That is to say, the SVM support vector machine model performs feature judgment by identifying the image captured by the camera. When it judges that the area is a marked image, it marks the position of its image value according to the coordinates of the pixel points to obtain the position coordinate information of the image; similarly, when the SVM support vector machine model judges that the image is a marked image, it combines the image grayscale processing algorithm to perform grayscale processing on the image to obtain grayscale numerical information to determine the depth information of the marking.

[0047] In step S13, the position coordinate information is compared with preset standard coordinate information to obtain a first difference between the position coordinate information and the standard coordinate information, including: Split into horizontal values ​​according to the position coordinate information and vertical value , according to the level value and vertical value Respectively with the preset standard level value and standard vertical value Subtracting the position coordinate information from the standard coordinate information to obtain a first difference; wherein the standard coordinate information includes a standard horizontal value and standard vertical value .

[0048] Exemplarily, the workbench of the laser marking machine is rectangular, the horizontal direction refers to the long side direction of the workbench of the laser marking machine, and the vertical direction is perpendicular to the horizontal direction and refers to the short side direction of the workbench of the laser marking machine.

[0049] In step S14, the marking depth information is compared with preset standard depth information to obtain a second difference between the marking depth information and the standard depth information.

[0050] Specifically, after the image on the product to be marked is determined as a marking image by acquiring features through the SVM support vector machine model, the image is grayed to obtain a numerical value representing the marking depth information. Since the deeper the marking depth is during the marking process, the higher the gray value is, the depth is measured according to its gray value. Then, the second difference is obtained by subtracting the numerical value of the marking depth information from the numerical value of the standard depth information.

[0051] In step S15, when the first difference is greater than the system allowable difference, the running path of the laser head is adjusted; when the second difference exceeds the preset depth range, the energy density of the laser head is adjusted, including: When the laser head coordinates are downward relative to the preset coordinates, the laser head moves upward; when the laser head coordinates are left relative to the preset coordinates, the laser head moves right; wherein, the adjustment of the laser head's running path is to move on a plane parallel to the laser head and the marking plane; or, determine the straight-line distance and angle of the coordinate information of the marking image, and the laser head moves along the straight-line distance and angle. The energy density of the laser head can be adjusted by adjusting the distance between the laser head and the marking object; or, by adjusting the power of the laser head when it is in action, the energy density of the laser head can be adjusted; or, by adjusting the speed of the laser head during the marking process, the energy density of the laser head during the marking process can be adjusted. Exemplarily, the workbench of the laser marking machine is rectangular, the upward movement direction of the horizontal plane refers to the long side direction of the workbench of the laser marking machine toward the controller, the downward movement direction of the horizontal plane refers to the long side direction of the workbench of the laser marking machine away from the controller, the forward movement direction of the horizontal plane refers to the short direction of the workbench of the laser marking machine toward the controller, and the backward movement direction of the horizontal plane refers to the long side direction of the workbench of the laser marking machine away from the controller.

[0052] In one embodiment, when the second difference exceeds a preset depth range, adjusting the energy density of the laser head includes: Adjust the energy density of the laser head by adjusting the distance between the laser head and the marking object; or Adjust the energy density of the laser head by adjusting the power of the laser head when it is applied; or, Adjust the speed of the laser head during the marking process to adjust the energy density of the laser head during the marking process.

[0053] For example, the depth is preset by the user and may be 5±0.5 mm, and the present invention does not impose any specific limitation on this. Specifically, when the laser marking exceeds the depth interval, the marking rate is slowed down so that the marking point can act on the marking object for a longer time and the object can be marked more deeply; when the laser marking is lower than the depth interval, the marking rate is accelerated so that the marking point can act on the marking object for a shorter time and the marking depth can be reduced.

[0054] More preferably, the laser marking control method also includes when the first difference is greater than or equal to the maximum system preset value, the laser head moves to the target area at a predetermined first speed while reducing the energy density; and, when the first difference is less than the maximum system preset value, the laser head moves to the target area at a predetermined second speed while not changing the energy density; wherein the first speed is greater than the second speed.

[0055] Specifically, the first speed and the second speed are preset by the user. The first speed may be 1 cm / s, and the second speed may be 0.5 cm / s. The present invention does not make any specific limitation on this.

[0056] Furthermore, when the first difference is greater than a preset system allowable difference, the moving path of the laser head is adjusted, including: adjusting the moving path of the laser head to move on a plane parallel to the marking plane, determining the straight-line distance and angle of the two coordinates, and the laser head moves along the straight-line distance and angle.

[0057] In one embodiment, the coordinate position information of the current marking is identified ( , ), compared with the system preset marking position (x, ), by Subtract the coordinate value of x from that of x. If there is a difference, first move the laser head image horizontally to the right to adjust it to the target horizontal position, and then move y i Subtract the coordinate value of y from that of a. If there is a difference, adjust the laser head image horizontally forward to the target position to adjust the laser position.

[0058] In another implementation, the coordinate position information of the current marking is determined ( , ), compared with the system preset marking position ( , ), calculate the distance L between the two, where L can be expressed by the following expression:

[0059] After that, the angle information between the two coordinates is calculated, and the angle information is expressed as the angle with the left and right horizontal directions , the angle is It is expressed as:

[0060] After obtaining the distance and angle information of the two coordinates, the laser head is Move the laser head to the preset position at an angle of and a distance of L.

[0061] Among them, the left-right direction refers to the long side direction of the laser marking machine workbench, and the front-back direction refers to the short side direction of the laser marking machine workbench.

[0062] In order to facilitate the understanding of the present invention, some preferred embodiments of the present invention are further described below.

[0063] In this embodiment, an integrated laser marking control system is proposed, which consists of the following key parts: machine vision module detection end, motion control end, power control end, manual operation end and central processing unit. These components work together to ensure the accuracy and consistency of the laser marking process.

[0064] Detailed description of the working process: Step 1: System initialization and product fixation Before starting marking, you first need to fix the product to be marked on the workbench to ensure its stable position to avoid displacement during the marking process. The operator starts the laser marker through the manual operation end, and the laser is ready to start marking.

[0065] Step 2: Real-time image capture and transmission The detection end of the machine vision module is equipped with a high-resolution CCD or CMOS camera to monitor the laser marking process in real time. The image data captured by the camera is transmitted to the central processor through a high-speed data transmission interface such as Ethernet or USB.

[0066] Step 3: Image processing and numerical analysis After receiving the image data, the central processor performs rapid numerical processing. This step may include pre-processing operations such as image denoising, enhancement, and binarization to improve the accuracy of subsequent image recognition.

[0067] Step 4: Intelligent image recognition Using the advanced SVM (support vector machine) model algorithm, the central processor performs intelligent image recognition on the marking area. This algorithm can identify the location information and marking depth information of the marking area, providing accurate data support for subsequent adjustments.

[0068] Step 5: Comparison of coordinates and depth information The system compares the identified coordinate information with the preset standard coordinate position to evaluate the accuracy of the position. At the same time, the marking depth information is compared with the preset depth standard to ensure that the marking depth meets the product quality requirements.

[0069] Step 6: Dynamic Adjustment and Optimization If a deviation in position or depth information is detected, the system will automatically adjust. The motion control end controls the laser head to move to the exact position according to the predetermined trajectory, while the power control end adjusts the energy density of the laser to change the depth of the marking.

[0070] Step 7: Implementation of precise marking After completing the position and depth adjustments, the laser continues marking to ensure that each mark meets the expected quality standards.

[0071] Through the above steps and system design, the laser marking control system of the present invention can realize a highly automated and intelligent marking process, improve production efficiency and product quality, and reduce the need for manual intervention, providing new possibilities for the development and application of laser marking technology.

[0072] In summary, the embodiment of the present invention provides a laser marking control method, device and storage medium. The method is executed by a controller, including obtaining image data of a product to be marked collected by a machine vision module; inputting the image data into a pre-trained SVM support vector machine model to obtain the position coordinate information and marking depth information of the product to be marked; comparing the position coordinate information with the preset standard coordinate information to obtain a first difference between the position coordinate information and the standard coordinate information; comparing the marking depth information with the preset standard depth information to obtain a second difference between the marking depth information and the standard depth information; when the first difference is greater than the system allowable difference, adjusting the running path of the laser head; when the second difference exceeds the preset depth interval, adjusting the energy density of the laser head. After the controller receives the image data, it analyzes the image data and automatically adjusts the running path and energy density of the laser according to the analysis results to ensure the accuracy and consistency of the marking process. This automated adjustment mechanism improves the position accuracy and depth control of the marking pattern, while eliminating the uncertainty of manual operation, and realizes truly unattended automated marking. The whole process not only improves production efficiency and reduces labor intensity, but also ensures the stability and reliability of product quality.

[0073] Reference Figure 3 The second embodiment of the present invention provides a laser marking control device, comprising: A machine vision module, used to obtain image data of the product to be marked collected by the machine vision module; An information processing module is used to input the image data into a pre-trained SVM support vector machine model to obtain the position coordinate information and marking depth information of the product to be marked; A first difference calculation module, used for comparing the position coordinate information with preset standard coordinate information to obtain a first difference between the position coordinate information and the standard coordinate information; A second difference calculation module, used for comparing the marking depth information with preset standard depth information to obtain a second difference between the marking depth information and the standard depth information; The motion control module is used to adjust the running path of the laser head when the first difference is greater than the system allowable difference; and to adjust the energy density of the laser head when the second difference exceeds a preset depth range.

[0074] In one embodiment, the information processing module includes: A feature recognition module is used to perform contour feature recognition on the image captured by the camera, and mark the position of the image where the recognized contour feature is located as position coordinate information; The grayscale processing module is used to perform grayscale processing on the image captured by the camera to obtain image grayscale information; and perform numerical standardization on the image grayscale information to obtain marking depth information.

[0075] In one embodiment, the information processing module is further used to: Extracting first feature information from a qualified marking image, and performing feature learning on the first feature information to obtain second feature information; The second feature information is converted into standard format information, the standard format information is input into an SVM support vector machine model, and the SVM support vector machine model is trained using a kernel function and a penalty factor to obtain a trained SVM support vector machine model.

[0076] In one implementation, the first numerical calculation module is used to: Split into horizontal values ​​according to the position coordinate information and vertical value , according to the level value and vertical value Respectively with the preset standard level value and standard vertical value Subtracting the position coordinate information from the standard coordinate information to obtain a first difference; wherein the standard coordinate information includes a standard horizontal value and standard vertical value .

[0077] In one embodiment, the motion control module includes: The density adjustment module is used to adjust the energy density of the laser head by adjusting the distance between the laser head and the marking object; or, to adjust the energy density of the laser head by adjusting the power of the laser head when it is in action; or, to adjust the energy density of the laser head during the marking process by adjusting the speed of the laser head during the marking process.

[0078] In one embodiment, the motion control module is further used to: The moving path of the laser head is adjusted to move on a plane parallel to the marking plane, and the straight-line distance and angle of the two coordinates are determined, and the laser head moves along the straight-line distance and angle.

[0079] In one embodiment, the motion control module is further used to: When the laser head coordinates are downward relative to the preset coordinates, the laser head moves upward; when the laser head coordinates are leftward relative to the preset coordinates, the laser head moves rightward; wherein, the movement path of the laser head is adjusted to move on a plane parallel to the marking plane.

[0080] It should be noted that, when the first difference is greater than or equal to the maximum system preset value, the laser head moves to the target area at a predetermined first speed while reducing the energy density; and, when the first difference is less than the maximum system preset value, the laser head moves to the target area at a predetermined second speed while not changing the energy density; wherein the first speed is greater than the second speed.

[0081] It should be further explained that a laser marking control system provided in an embodiment of the present invention is used to execute all process steps of a laser marking control method in the above embodiment, and the working principles and beneficial effects of the two correspond one to one, so they will not be repeated here.

[0082] In summary, the present invention provides a laser marking control method, device and storage medium. The method is executed by a controller, including obtaining image data of a product to be marked collected by a machine vision module; inputting the image data into a pre-trained SVM support vector machine model to obtain the position coordinate information and marking depth information of the product to be marked; comparing the position coordinate information with the preset standard coordinate information to obtain a first difference between the position coordinate information and the standard coordinate information; comparing the marking depth information with the preset standard depth information to obtain a second difference between the marking depth information and the standard depth information; when the first difference is greater than the system allowable difference, adjusting the running path of the laser head; when the second difference exceeds the preset depth interval, adjusting the energy density of the laser head. After the controller receives the image data, it analyzes the image data and automatically adjusts the running path and energy density of the laser according to the analysis results to ensure the accuracy and consistency of the marking process. This automated adjustment mechanism improves the position accuracy and depth control of the marking pattern, while eliminating the uncertainty of manual operation, and realizes truly unattended automated marking. The whole process not only improves production efficiency and reduces labor intensity, but also ensures the stability and reliability of product quality.

[0083] The embodiment of the present invention further provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as an SVM support vector machine model program. When the processor executes the computer program, the steps in the above-mentioned laser marking control method embodiments are implemented, such as Figure 1 Alternatively, when the processor executes the computer program, the functions of each module / unit in the above-mentioned device embodiments are realized, such as the information processing module.

[0084] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.

[0085] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. The electronic device may include more or fewer components than the above components, or may combine certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0086] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.

[0087] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0088] Wherein, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0089] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0090] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A laser marking control method, characterized in that: Executed by a controller, the method includes: Obtain image data of the product to be marked collected by the machine vision module; Input the image data into a pre-trained SVM support vector machine model to obtain the position coordinate information and marking depth information of the product to be marked; Comparing the position coordinate information with preset standard coordinate information to obtain a first difference between the position coordinate information and the standard coordinate information; Comparing the marking depth information with preset standard depth information to obtain a second difference between the marking depth information and the standard depth information; When the first difference is greater than the system allowable difference, the running path of the laser head is adjusted; when the second difference exceeds the preset depth range, the energy density of the laser head is adjusted.

2. The laser marking control method according to claim 1, characterized in that: The image data is input into a pre-trained SVM support vector machine model to obtain the position coordinate information and marking depth information of the product to be marked, including: Perform contour feature recognition on the image captured by the camera, and mark the position of the image where the recognized contour feature is located as position coordinate information; The image captured by the camera is gray-processed to obtain image gray-scale information; the image gray-scale information is numerically normalized to obtain marking depth information.

3. The laser marking control method according to claim 1, characterized in that: The training process of the SVM support vector model includes: Extracting first feature information from a qualified marking image, and performing feature learning on the first feature information to obtain second feature information; The second feature information is converted into standard format information, the standard format information is input into an SVM support vector machine model, and the SVM support vector machine model is trained using a kernel function and a penalty factor to obtain a trained SVM support vector machine model.

4. The laser marking control method according to claim 1, characterized in that: The comparing the position coordinate information with preset standard coordinate information to obtain a first difference between the position coordinate information and the standard coordinate information includes: According to the position coordinate information, it is divided into horizontal values ​​x i and the vertical value y i , according to the horizontal value x i and the vertical value y i Subtracting the preset standard horizontal value x and standard vertical value y respectively, to obtain a first difference between the position coordinate information and the standard coordinate information; wherein the standard coordinate information includes the standard horizontal value x and the standard vertical value y.

5. The laser marking control method according to claim 1, characterized in that: When the second difference exceeds a preset depth range, adjusting the energy density of the laser head comprises: Adjust the energy density of the laser head by adjusting the distance between the laser head and the marking object; or Adjust the energy density of the laser head by adjusting the power of the laser head when it is applied; or, Adjust the speed of the laser head during the marking process to adjust the energy density of the laser head during the marking process.

6. The laser marking control method according to claim 1, characterized in that: When the first difference is greater than a preset system allowable difference, adjusting the running path of the laser head includes: When the laser head coordinates are downward relative to the preset coordinates, the laser head moves upward; when the laser head coordinates are left relative to the preset coordinates, the laser head moves right; Wherein, the moving path of the laser head is adjusted to move on a plane parallel to the marking plane.

7. The laser marking control method according to claim 1, characterized in that: When the first difference is greater than a preset system allowable difference, adjusting the running path of the laser head includes: The moving path of the laser head is adjusted to move on a plane parallel to the marking plane, and the straight-line distance and angle of the two coordinates are determined, and the laser head moves along the straight-line distance and angle.

8. The laser marking control method according to any one of claims 1 to 7, characterized in that: The method further comprises: When the first difference is greater than or equal to a maximum system preset value, the laser head moves to the target area at a predetermined first speed while reducing the energy density; and, When the first difference is less than a maximum system preset value, the laser head moves to the target area at a predetermined second speed while not changing the energy density; wherein the first speed is greater than the second speed.

9. A laser marking control device, characterized in that: include: A machine vision module, used to obtain image data of the product to be marked collected by the machine vision module; An information processing module, used to input the image data into a pre-trained SVM support vector machine model to obtain the position coordinate information and marking depth information of the product to be marked; A first numerical calculation module, used for comparing the position coordinate information with preset standard coordinate information to obtain a first difference between the position coordinate information and the standard coordinate information; A second numerical calculation module is used to compare the marking depth information with the preset standard depth information to obtain a second difference between the marking depth information and the standard depth information; The motion control module is used to adjust the running path of the laser head when the first difference is greater than the system allowable difference; and to adjust the energy density of the laser head when the second difference exceeds a preset depth range.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the laser marking control method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Laser marking device and product marking method

    CN107552966A

  • An SVM-based wheel speed sensor gear ring surface defect detection method

    CN109886932A

  • Method for recognizing vehicle license plate information

    CN112183535A

  • Conveyor belt deviation diagnosis method and system based on machine vision

    CN113191394A

  • Closed-loop feedback type laser precision machining method and equipment

    CN116833576A

Cited By

  • Control method and system for glass laser marking

    CN119609379A

  • Laser marking system

    TWI941452B