A method for calculating heat distribution in laser processing
Through the improved local outlier factor algorithm and heat conduction model, the problem of insufficient thermal distribution detection reliability in laser processing is solved, and high-precision and robust thermal distribution calculation is achieved.
Patent Information
- Application Number
- CN202411874051.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-12-19
AI Technical Summary
The prior art lacks reliability in detecting heat distribution during laser processing, resulting in low accuracy of prediction results.
Anomaly detection is performed using an improved local outlier factor algorithm. By introducing the ratio of gradual degree and complexity as neighborhood parameters, the detection sensitivity is dynamically adjusted, and the heat distribution calculation is performed in combination with the heat conduction model.
The detection accuracy and reliability of edge and temperature distribution in laser processing images are significantly improved, ensuring high accuracy and robustness of thermal distribution calculations.
Smart Images

Figure CN119338807B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image data processing, and more specifically, to a method for calculating heat distribution in laser processing. Background Art
[0002] During laser processing, the thermal effect generated by the interaction between the laser beam and the substrate material has a crucial influence on the control of processing quality and the stability of the processing process. The laser beam transfers a large amount of heat energy to the substrate in a short period of time through local contact and absorption with the material, which in turn causes temperature rise, thermal stress changes, and physical or chemical changes in the material. These thermal effects largely determine the processing accuracy, surface quality, and even the final performance of the material. Therefore, accurately calculating the heat distribution of the laser beam on the substrate can effectively predict the thermal response of the material during laser processing, identify possible problems such as overheating, heat accumulation or uneven cooling, and thus provide a scientific basis for process optimization.
[0003] Through accurate calculation of heat distribution, it is possible to optimize laser processing parameters and improve the uniform distribution of heat energy on the substrate, and also avoid material damage or uneven heating due to heat accumulation, thereby improving the stability and efficiency of processing. For example, in applications such as laser welding, laser cutting or laser surface treatment, precise control of thermal effects directly affects the quality and results of processing. Excessive local heating may cause material deformation, ablation or stress concentration, while too little heat may lead to incomplete processing or low efficiency.
[0004] The patent application document with application publication number CN111046535A discloses a method for calculating heat distribution in laser processing. The patent application document establishes a three-dimensional heat conduction model and uses cylindrical coordinates to transform complex three-dimensional problems into two-dimensional problems, thereby solving the heat distribution of the substrate more efficiently.
[0005] However, the above technical solution only solves the thermal distribution of the substrate based on a predetermined model, but does not fully consider the potential deficiencies of the model in detection efficiency and accuracy, which may lead to low accuracy of the prediction results, thereby causing insufficient reliability in detecting the thermal distribution of laser processing. Summary of the invention
[0006] In order to solve the problem of insufficient reliability in detecting thermal distribution of laser processing raised in the above background technology, the present invention provides the following solution.
[0007] The present invention provides a method for calculating heat distribution in laser processing, comprising: collecting a target image in the laser processing process; performing abnormality detection on the target image using an improved local outlier factor algorithm and then performing heat distribution calculation; wherein the improved local outlier factor algorithm includes a neighborhood parameter, the neighborhood parameter is the product of a preset value and an influence factor, the influence factor is the ratio of a gradient degree to a complexity degree; the complexity degree represents the clutter degree of pixel points, and the gradient degree is:
[0008] ;
[0009] In the formula, is the gradient degree of the pixel at the i-th row and j-th column, is the gray value of the pixel at the i-th row and j-th column, To set the window The Euclidean distance between the pixel point in the i-th row and the j-th column, and the window size is set to , To set the window The gray value of a pixel.
[0010] The above technical solution realizes the accurate identification of heat distribution and abnormal areas during the processing. The improved local outlier factor algorithm introduces neighborhood parameters, and adjusts the detection sensitivity by the gradient and complexity within the neighborhood, so that the algorithm can dynamically adapt to the complexity of different areas in the image, thereby effectively identifying abnormal pixels caused by noise, grayscale changes or processing anomalies. The gradient calculation method weights the grayscale difference and spatial distance, so that anomaly detection can more accurately reflect local grayscale changes, making the anomaly detection process more sensitive to high-frequency noise and edge details, thereby improving the detection accuracy and reliability of edges and temperature distribution in laser processing images.
[0011] Furthermore, the method further includes calculating the distance between each pixel in the target image:
[0012] ;
[0013] In the formula, For the Line Column pixels and Line The distance between columns of pixels, is the total number of rows of the target image, is the total number of columns of the target image, For the Line The gray value of the pixel. For the Line Grayscale value of the pixel.
[0014] The above technical solution combines spatial position and grayscale difference in the same measurement system, so as to accurately characterize the similarity and correlation between pixels. Through the normalization processing in the distance formula, the number of rows, columns and grayscale differences are scaled respectively, so that the spatial position and grayscale features have the same dimension, which can avoid a single feature dominating the distance calculation and achieve a comprehensive measurement of multi-dimensional features. This method can more accurately identify similar or different pixel areas, improve the accuracy of anomaly detection and thermal distribution calculation, effectively enhance the sensitivity to edge details and thermal changes in different complex scenes, and provide reliable support for the analysis of laser processing images.
[0015] Furthermore, the complexity is:
[0016] ;
[0017] In the formula, is the complexity of the pixel in the i-th row and j-th column, is the pixel in the set window centered at the pixel point in the i-th row and j-th column. The gray value of a pixel, is the average value of all pixels in the set window, To set the variance of all pixels in the window, set the window size to , is an empirical constant, .
[0018] The above technical solution quantifies the grayscale complexity of each pixel area in the image by calculating the complexity, and uses the deviation degree of grayscale value and local variance to characterize the discreteness of pixel distribution, effectively identifying the texture complexity of different areas. The introduction of empirical constants avoids the calculation instability caused by zero variance, so that the algorithm can obtain reasonable results in both uniform and complex areas. This method of measuring clutter can enhance the accuracy of anomaly detection, especially in laser processing images, to more accurately distinguish edges, details and uniform areas, thereby improving the stability and reliability of image analysis, and providing accurate image structure information for subsequent applications such as thermal distribution calculation.
[0019] Furthermore, the heat distribution calculation is specifically as follows:
[0020] After removing abnormal pixels in the target image using the improved local outlier factor algorithm, the heat distribution of the remaining pixels in the target image is calculated using the heat conduction model.
[0021] The above technical solution significantly improves the accuracy and stability of heat distribution calculation by first using an improved local outlier factor algorithm to remove abnormal pixels in the target image, and then using the heat conduction model to calculate the heat distribution of the remaining normal pixels. The local outlier factor algorithm can effectively detect and remove abnormal pixels caused by noise or interference, ensuring that only real temperature information enters the heat conduction model calculation, reducing the impact of abnormal data on the heat distribution results. Combined with the heat conduction model, this solution can accurately simulate the diffusion behavior of heat in the image, making the calculation results closer to the actual heat distribution state, which is particularly suitable for scenarios that require high-precision temperature monitoring.
[0022] Furthermore, the method also includes performing image grayscale conversion and median filtering on the target image.
[0023] Furthermore, a CMOS camera or a CCD camera is used to collect target images during the laser processing process.
[0024] Furthermore, it also includes identifying and removing abnormal pixels in the target image, specifically:
[0025] The improved local outlier factor algorithm is used to calculate the local outlier factor value of each pixel point, and the pixel point whose local outlier factor value is greater than a set threshold is regarded as an abnormal pixel point, and the abnormal pixel points in the target image are removed.
[0026] The above technical solution can effectively distinguish normal areas from abnormal areas in the image by using an improved local outlier factor algorithm to identify and remove abnormal pixels and calculate the local outlier factor value of each pixel. Pixels whose outlier factor values exceed the set threshold are removed to avoid the interference of abnormal pixels on subsequent image processing, thereby significantly improving the image quality. The algorithm can dynamically adapt to the pixel distribution characteristics of different regions, making anomaly detection more accurate. By removing noise and interference pixels, the accuracy and reliability of thermal distribution calculation and other image analysis are guaranteed, making it more stable and robust.
[0027] Furthermore, it also includes performing heat map visualization on the results of the heat distribution calculation.
[0028] The beneficial effects of the present invention are:
[0029] The present invention realizes abnormality detection and accurate thermal distribution calculation of the target image during the laser processing process through an improved local outlier factor algorithm. The specific steps include using a camera to collect images, removing abnormal pixels, performing heat conduction calculations, and generating a visual thermal distribution map, thereby significantly improving the accuracy and reliability of image processing. This scheme measures the abnormality of pixels by the gradient and clutter degree of each pixel, combines the distance measurement of spatial position and grayscale value, realizes accurate detection of abnormal points, effectively reduces noise interference, and accurately models the temperature field with the help of a heat conduction model. At the same time, through steps such as image preprocessing and thermal map visualization, the intuitiveness of data interpretation and the effectiveness of analysis are further enhanced, providing a high-precision and highly operational technical means for real-time monitoring and quality control of the laser processing process. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0031] Figure 1 is a flow chart schematically showing a method for calculating heat distribution in laser processing according to an embodiment of the present invention;
[0032] Figure 2 FIG. 4 is a grayscale diagram schematically showing a laser machining process according to an embodiment of the present invention. DETAILED DESCRIPTION
[0033] 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 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 those skilled in the art without creative work are within the scope of protection of the present invention.
[0034] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0035] An embodiment of a method for calculating heat distribution in laser processing.
[0036] like Figure 1 As shown, a flow chart of a method for calculating heat distribution in laser processing according to an embodiment of the present invention includes the following steps:
[0037] S1: Acquire target images during laser processing.
[0038] In one embodiment, the target image during the laser processing process can be acquired by a high-precision image acquisition device, such as a CMOS camera or a CCD camera. CMOS and CCD cameras have different technical advantages, but both can provide high-resolution, low-noise, and high-dynamic range image acquisition capabilities, which are suitable for accurately capturing subtle changes in the laser processing process in industrial environments. CMOS cameras generally have advantages in speed and energy efficiency, while CCD cameras are superior in image quality and performance in low-light environments. Therefore, the images captured by these two cameras can not only ensure the quality and details of the target image, but also ensure that the key features of the laser processing process can be accurately captured under various operating conditions, providing reliable data support for subsequent image processing and analysis.
[0039] In another embodiment, in order to further improve the accuracy and effect of image processing, the acquired target image will undergo a series of preprocessing steps, including image graying and median filtering. The image graying process first converts the color image into a single-channel grayscale image, and by eliminating the interference of color information, the grayscale changes in the image are more prominent, thereby simplifying the subsequent image analysis work. After graying, the image will more clearly show the detailed features and potential abnormal areas in the laser processing process. The median filtering process can effectively eliminate the salt and pepper noise introduced by sensor noise or external environmental interference, while maintaining the edge and detail information of the image. By applying the median filter, the smoothness of the target image is significantly improved, high-frequency noise is removed, and the accuracy of subsequent abnormal detection and thermal distribution calculation is improved. This preprocessing process effectively improves the quality of the image, allowing the subsequent algorithm to more accurately identify abnormal pixels and temperature distribution in the image, thereby ensuring the effectiveness and reliability of real-time monitoring and fault detection during laser processing.
[0040] like Figure 2 As shown, the grayscale diagram of the laser processing process of an embodiment of the present invention.
[0041] By graying the target image and performing median filtering, not only the quality of the image data is optimized, but also a solid foundation is laid for subsequent image analysis and processing steps, greatly improving the detection accuracy and operating efficiency of the overall system.
[0042] S2: Perform anomaly detection on the target image using an improved local outlier factor algorithm.
[0043] In one embodiment, the anomaly detection process specifically includes the following key steps: First, an improved local outlier factor algorithm is used to calculate the local outlier factor value of each pixel in the target image. The local outlier factor algorithm is a density-based anomaly detection method that measures the degree of abnormality of each pixel by evaluating the difference between the density of each pixel in its neighborhood and the density of the surrounding neighborhood. Compared with traditional anomaly detection methods based on global information, the LOF algorithm can better capture changes in local areas in the image, thereby effectively identifying pixels that appear abnormal in the local context. The algorithm can identify abnormal points that are significantly different from surrounding pixels in a similar neighborhood, which is of great significance for abnormal pixels caused by temperature changes, surface defects or noise in laser processing images.
[0044] When the local outlier factor value of each pixel is calculated, these values are compared with the preset threshold. Specifically, when the local outlier factor value of a pixel exceeds the set threshold, the system will determine that the pixel is an abnormal pixel. The setting of this threshold is usually determined through experiments or historical data to ensure that normal pixels and abnormal pixels can be effectively distinguished. Through this threshold judgment, the system can quickly and accurately identify abnormal areas in the image, providing a reliable basis for subsequent processing and analysis.
[0045] After identifying abnormal pixels, the abnormal pixels in the target image need to be removed or corrected. This process can be achieved by replacing the abnormal pixels with the average value of the normal pixels around them, interpolation or other smoothing algorithms. By removing these abnormal pixels, the image quality is significantly improved, providing more accurate and reliable data support for subsequent image analysis, thermal distribution calculation, etc. The removal of abnormal pixels not only helps to improve the overall quality of the image, but also reduces errors and noise interference in subsequent algorithm processing, thereby improving the accuracy and efficiency of the entire detection system.
[0046] S3: Wherein, the improved local outlier factor algorithm includes a neighborhood parameter.
[0047] In one embodiment, the setting of the neighborhood parameter is based on the product of a preset value and an influence factor, where the influence factor is composed of the ratio of the gradient degree and the complexity of the image. Through this improvement, the algorithm can dynamically adjust the sensitivity of abnormal detection in different scenarios, so as to more accurately identify those pixels with small changes in the image but significant abnormal characteristics. This method can not only identify abnormal pixels caused by noise, sensor errors or environmental interference, but also effectively identify local anomalies caused by uneven temperature, material defects or processing errors during laser processing.
[0048] The degree of gradient is:
[0049] ;
[0050] In the formula, is the gradient degree of the pixel at the i-th row and j-th column, is the gray value of the pixel at the i-th row and j-th column, To set the window The Euclidean distance between the pixel point in the i-th row and the j-th column, and the window size is set to , To set the window The gray value of a pixel.
[0051] By introducing the calculation formula of the gradient degree, the local gradient change of each pixel in the image is accurately evaluated. Combining the grayscale difference and spatial position between pixels, it can effectively capture the edge features and subtle changes in the image, which is especially suitable for the detection of temperature fluctuations or surface defects during laser processing. At the same time, by introducing the Euclidean distance to weight the grayscale difference, the interference of noise is reduced, and the accuracy and robustness of anomaly detection are improved. This method can accurately identify local abnormal areas in the image and provide higher quality data support for subsequent image processing and analysis.
[0052] In one embodiment, the complexity is:
[0053] ;
[0054] In the formula, is the complexity of the pixel in the i-th row and j-th column, is the pixel in the set window centered at the pixel point in the i-th row and j-th column. The gray value of a pixel, is the average value of all pixels in the set window, To set the variance of all pixels in the window, set the window size to , is an empirical constant, .
[0055] By calculating the complexity of each pixel, the grayscale distribution characteristics of the local area in the image can be quantified, so as to effectively identify the detail changes and complexity in the image. By considering the grayscale value, mean value and variance of all pixels in the set window, this method can reflect the discrete degree of the grayscale distribution of pixels in the region. A higher clutter value indicates that the grayscale changes in the region are large and there is a higher local complexity, which may correspond to the edge or abnormal features in the image. A lower clutter value means that the grayscale changes in the region are relatively smooth. The design of introducing empirical constants further adjusts the influence of variance on complexity and ensures the adaptability of the algorithm to different scenarios. Through this method, complex areas in the image caused by abnormal processing or noise can be accurately captured, thereby providing more accurate data support for subsequent anomaly detection, edge extraction or image restoration.
[0056] In another embodiment, the complexity is:
[0057] ;
[0058] In the formula, is the complexity of the pixel in the i-th row and j-th column, is the pixel in the set window centered at the pixel point in the i-th row and j-th column. The gray value of a pixel, is the pixel in the set window centered at the pixel point in the i-th row and j-th column. The gradient of a pixel, is the average value of all pixels in the set window, To set the variance of all pixels in the window, set the window size to , is an empirical constant, , is a weighting coefficient used to balance the contribution of pixel grayscale value and gradient.
[0059] In one embodiment, the distance between each pixel in the target image is calculated:
[0060] ;
[0061] In the formula, For the Line Column pixels and Line The distance between columns of pixels, is the total number of rows of the target image, is the total number of columns of the target image, For the Line The gray value of the pixel. For the Line Grayscale value of the pixel.
[0062] By combining spatial position and grayscale difference in the same measurement system, the similarity and correlation between pixels can be accurately characterized. Through the normalization process in the distance formula, the number of rows, columns and grayscale differences are scaled respectively, so that the spatial position and grayscale features have the same dimension, which can avoid a single feature dominating the distance calculation and achieve a comprehensive measurement of multi-dimensional features. This method can more accurately identify similar or different pixel areas, improve the accuracy of anomaly detection and thermal distribution calculation, effectively enhance the sensitivity to edge details and thermal changes in different complex scenes, and provide reliable support for the analysis of laser processing images.
[0063] S4: Calculate the thermal distribution of the target image after anomaly detection.
[0064] In one embodiment, the heat distribution calculation is specifically as follows:
[0065] After using the improved local outlier factor algorithm to remove abnormal pixels in the target image, the heat distribution of the remaining normal pixels in the target image is calculated based on the heat conduction model. The heat conduction model can simulate the heat transfer process in each area of the image and accurately predict the diffusion and conduction of heat between different pixels through physical principles. The model takes into account factors such as the thermal conductivity of each pixel and the temperature difference between adjacent pixels, so that the heat distribution of each pixel can be dynamically calculated. This process is of great significance for analyzing the laws of temperature changes in processes such as laser processing and mechanical processing, especially in applications such as high-precision temperature monitoring and anomaly detection, providing reliable temperature field data.
[0066] In order to more intuitively display the heat distribution calculation results, this embodiment also includes heat map visualization of the heat distribution results. The heat map presents the heat distribution results in the form of color, and the depth of the color represents the temperature changes in different areas. Through this visualization method, the user can clearly identify the areas with higher or lower temperatures in the target image and discover potential abnormalities or overheating problems in time. This not only improves the efficiency of data interpretation, but also greatly enhances the operability of image analysis, and is particularly suitable for industrial detection and real-time monitoring systems.
[0067] The solution of the present invention can accurately calculate the thermal distribution of the target image during laser processing by combining an improved local outlier factor algorithm, a heat conduction model and image processing technology. By eliminating abnormal pixels and calculating the distance between pixels, the high accuracy and robustness of the thermal distribution calculation are ensured. At the same time, the image is carefully analyzed using factors such as the degree of gradient, complexity and clutter, which effectively improves the perception of heat distribution, and can visualize the heat distribution results, enhancing the intuitiveness and operability of image analysis. This technology effectively improves heat monitoring and abnormality detection during laser processing, and provides reliable support for high-precision temperature control and quality control.
[0068] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.
[0069] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.
Claims
1. A method for calculating heat distribution in laser processing, characterized in that: include: Collect target images during laser processing; Using an improved local outlier factor algorithm to perform abnormality detection on the target image and then calculate the thermal distribution; The improved local outlier factor algorithm includes a neighborhood parameter, which is the product of a preset value and an influence factor, and the influence factor is the ratio of the degree of gradual change to the degree of complexity; The complexity represents the clutter of the pixels; The degree of gradient is: ; In the formula, is the gradient degree of the pixel at the i-th row and j-th column, is the gray value of the pixel at the i-th row and j-th column, To set the window The Euclidean distance between the pixel point in the i-th row and the j-th column, and the window size is set to , To set the window The gray value of a pixel.
2. A method for calculating heat distribution in laser processing according to claim 1, characterized in that: The method also includes calculating the distance between each pixel in the target image: ; In the formula, For the Line Column pixels and Line The distance between columns of pixels, is the total number of rows of the target image, is the total number of columns of the target image, For the Line The gray value of the pixel. For the Line Grayscale value of the pixel.
3. The method for calculating heat distribution in laser processing according to claim 1, characterized in that: The complexity levels are: ; In the formula, is the complexity of the pixel in the i-th row and j-th column, is the pixel in the set window centered at the pixel point in the i-th row and j-th column. The gray value of a pixel, is the average grayscale value of all pixels in the set window, To set the variance of the grayscale values of all pixels in the window, set the window size to , is an empirical constant, .
4. The method for calculating heat distribution in laser processing according to claim 1, characterized in that: The heat distribution calculation is specifically as follows: After removing abnormal pixels in the target image using the improved local outlier factor algorithm, the heat distribution of the remaining pixels in the target image is calculated using the heat conduction model.
5. The method for calculating heat distribution in laser processing according to claim 1, characterized in that: The method also includes performing image grayscale conversion and median filtering on the target image.
6. The method for calculating heat distribution in laser processing according to claim 1, characterized in that: Use CMOS camera or CCD camera to collect target images during laser processing.
7. The method for calculating heat distribution in laser processing according to claim 1, characterized in that: It also includes identifying and removing abnormal pixels in the target image, specifically: The improved local outlier factor algorithm is used to calculate the local outlier factor value of each pixel point, and the pixel point whose local outlier factor value is greater than a set threshold is regarded as an abnormal pixel point, and the abnormal pixel points in the target image are removed.
8. The method for calculating heat distribution in laser processing according to claim 1, characterized in that: Also included is the thermal map visualization of the results of the thermal distribution calculation.
Citation Information
Patent Citations
Laser processing heat distribution calculation method
CN111046535A
Cloth defect detection method based on outlier detection
CN115423807A
Irregular hardware surface defect detection method based on computer vision
CN116912248A