Cutting parts scanning system for fully automatic intelligent production line

By analyzing infrared scanning grayscale images, calculating cutting features and background features, and adaptively determining filter weights for image enhancement, the problem of inaccurate cutting path recognition in the intelligent cutting system is solved, and the recognition accuracy and enhancement effect are improved.

CN118417953BActive Publication Date: 2024-09-20SHAANXI SHOULV ALU FORMWORK TECH CO LTD CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410888267.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-09-20
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

In the existing technology, when the intelligent cutting system cuts high-strength alloy plates, the weight of the image enhancement processing often obtains a fixed value based on experience, resulting in inaccurate cutting path recognition results and a greater impact from ambient lighting.

Method used

By obtaining the infrared scanning grayscale image, perform regional segmentation, analyze the grayscale value difference and fluctuation characteristics of pixels in the cutting line area, calculate the cutting feature representation value and the background feature representation value, and adaptively determine the filter weight based on the lighting influence trend value. Perform image enhancement to improve the recognition accuracy of cutting paths.

Benefits of technology

It effectively enhances the grayscale contrast of the cutting line area, reduces the impact of ambient lighting, and improves the recognition accuracy of the cutting path and the image enhancement effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118417953B
    Figure CN118417953B
Patent Text Reader

Abstract

The present invention relates to the field of image enhancement technology, and specifically to a cutting piece scanning system for a fully automatic intelligent production line, wherein the system performs the following method: obtaining an infrared scanning grayscale image, obtaining a surface background area, a heat-affected area, and a cutting line area through regional segmentation; performing symmetry and fluctuation analysis on the grayscale features of pixels in the cutting line area to obtain a cutting feature characterization value and a background feature characterization value for each pixel in the cutting line area; obtaining a lighting influence trend value according to the correlation and grayscale difference between the grayscale value and the background feature characterization value in the cutting line area; determining a filtering weight according to the difference between the cutting feature characterization value and the background feature characterization value of each pixel in the cutting line area and the pixel at the center of the area; performing enhancement processing on the cutting line area based on the filtering weight to obtain a cutting recognition result of the infrared scanning grayscale image. The present invention makes the recognition result of the cutting path in the alloy plate cutting process more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image enhancement technology, and in particular to a cutting piece scanning system for a fully automatic intelligent production line. Background Art

[0002] The high-strength alloy formwork adopts the latest generation of cold-rolled roller-pressed integrated forming technology, which has the advantages of high strength, light weight, and easy disassembly and assembly. After the concrete is poured and the formwork is removed, the forming effect is good, the appearance is good, and there are few bubbles. For high-strength alloy formwork, cutting operations are required during its manufacturing process. Large pieces of alloy plates can be cut into specific sizes or shapes for subsequent assembly or processing. Among them, the current intelligent cutting includes a variety of cutting technologies, such as laser cutting. At the same time, in the process of cutting the alloy plate, it is necessary to visually scan the surface of the cutting part to help identify the placement and posture of the alloy plate, so as to correct the cutting path and ensure the cutting quality.

[0003] At present, machine vision methods are often used to identify the cutting path of the alloy plate cutting process, such as threshold segmentation and edge detection methods. However, during the cutting process, along the vertical sides of the moving direction of the cutting equipment, the parts closer to the cutting path will generate gradually increasing heat, so that the pixels on the original cutting path are affected by the surrounding high-heat areas, and the contrast between them and the pixels on the surrounding non-cutting paths is low, affecting the results of threshold segmentation or edge detection. Existing methods often use image enhancement methods for processing, but the weights of the enhancement processing are often obtained based on experience. Fixed values, resulting in poor enhancement effects, and thus making the identification results of the cutting path of the alloy plate cutting process less accurate. Summary of the invention

[0004] In order to solve the technical problem that the weight of the existing enhancement processing is often obtained based on experience to obtain a fixed value, resulting in poor enhancement effect, and thus making the recognition result of the cutting path in the alloy plate cutting process less accurate, the purpose of the present invention is to provide a cutting part scanning system for a fully automatic intelligent production line, and the technical solution adopted is as follows:

[0005] A cutting piece scanning system for a fully automatic intelligent production line includes a memory and a processor, wherein the processor executes a computer program stored in the memory to implement the following steps:

[0006] Obtain an infrared scanning grayscale image of the surface of the cut piece during the cutting process on the production line, and perform regional segmentation on the infrared scanning grayscale image to obtain the surface background area, heat-affected area, and cutting line area;

[0007] According to the gray value difference distribution, gray value fluctuation characteristic distribution and symmetry characteristic performance of each pixel point in the cutting line area and in the heat affected area perpendicular to the cutting direction, the cutting characteristic representation value of each pixel point in the cutting line area is obtained;

[0008] According to the gray value fluctuation characteristic distribution and gray value balanced distribution of each pixel point in the cutting line area and belonging to the surface background area in the direction perpendicular to the cutting direction, the background characteristic representation value of each pixel point in the cutting line area is obtained;

[0009] According to the correlation between the grayscale values ​​of all pixels in the cutting line area and the corresponding background feature representation values, and the grayscale difference distribution of pixels in the neighborhood of each pixel in the cutting line area in the cutting direction, the illumination influence trend value of the cutting line area is obtained;

[0010] According to the difference in the cutting feature characterization value between each pixel point in the cutting line area and the central pixel point of the area, as well as the difference in the background feature characterization value, combined with the difference in the illumination influence trend value and the grayscale value, the filtering weight of each pixel point in the cutting area is determined; the cutting line area is enhanced based on the filtering weight, and the cutting recognition result of the infrared scanning grayscale image is obtained according to the processing result.

[0011] Preferably, the cutting feature representation value of each pixel point in the cutting line area is obtained according to the gray value difference distribution, gray value fluctuation characteristic distribution and symmetry characteristic performance of each pixel point in the cutting line area and belonging to the heat affected area in the cutting direction perpendicular to the cutting direction, specifically including:

[0012] Taking any pixel point in the cutting line area as the target pixel point, and determining a first local pixel point sequence and a second local pixel point sequence of the target pixel point based on the pixel points belonging to the heat-affected area in a direction perpendicular to the cutting direction of the target pixel point with the target pixel point as the center;

[0013] determining a vertical diffusion uniformity based on an overall level of grayscale value differences between corresponding pixels of the first local pixel point sequence and the second local pixel point sequence, wherein the overall level of grayscale value differences is negatively correlated with the vertical diffusion uniformity;

[0014] According to the balance and fluctuation of the grayscale values ​​of the pixels in the first local pixel sequence and the balance and fluctuation of the grayscale values ​​of the pixels in the second local pixel sequence, combined with the vertical diffusion uniformity, the cutting feature representation value of the target pixel is obtained.

[0015] Preferably, the method for obtaining the cutting feature representation value of the target pixel point is specifically as follows:

[0016] For any local pixel sequence, the overall horizontal coefficient and the discrete coefficient of the grayscale values ​​of all pixels in the local pixel sequence are fused to obtain the distribution characteristic factor of the local pixel sequence;

[0017] Based on the distribution characteristic factor of the first local pixel point sequence and the distribution characteristic factor of the second local pixel point sequence and the degree of vertical diffusion uniformity, a cutting feature representation value of the target pixel point is determined.

[0018] Preferably, the background feature representation value of each pixel point in the cutting line area is obtained according to the gray value fluctuation characteristic distribution of each pixel point in the cutting line area and the gray value balanced distribution of the pixel points belonging to the surface background area in the vertical direction to the cutting direction, specifically including:

[0019] Taking the target pixel as the center and based on the pixels belonging to the surface background area in the direction perpendicular to the cutting direction of the target pixel, determine a third local pixel point sequence and a fourth local pixel point sequence;

[0020] The distribution characteristic factors of the third local pixel point sequence and the fourth local pixel point sequence are obtained, and the background feature representation value of the target pixel point is determined based on the distribution characteristic factors of the third local pixel point sequence and the distribution characteristic factors of the fourth local pixel point sequence.

[0021] Preferably, the step of obtaining the illumination influence trend value of the cutting line area according to the correlation between the grayscale values ​​of all pixels in the cutting line area and the corresponding background feature representation values ​​and the grayscale difference distribution of pixels in the neighborhood of each pixel in the cutting line area in the cutting direction specifically includes:

[0022] Calculate the similarity index based on the grayscale values ​​of all pixels in the cutting line area and the background feature representation values ​​of the same pixels;

[0023] Take any pixel point as the selected pixel point, and obtain all the neighboring pixel points on each line segment parallel to the cutting direction in the neighborhood window of the selected pixel point to form each neighborhood pixel point sequence;

[0024] According to the difference change of the gray value in the neighborhood pixel point sequence of the pixel point in the cutting line area, combined with the similarity index, the illumination influence trend value of the cutting line area is obtained.

[0025] Preferably, the step of obtaining the illumination influence trend value of the cutting line area according to the difference change of the grayscale value in the neighborhood pixel point sequence of the pixel point in the cutting line area in combination with the similarity index specifically includes:

[0026] For any neighborhood pixel sequence, based on the fluctuation degree of the grayscale value difference between adjacent pixels in the neighborhood pixel sequence, a grayscale variation factor of the neighborhood pixel sequence is determined;

[0027] According to the mean value of the grayscale change factor of all neighboring pixel point sequences of all pixel points in the cutting area, combined with the similarity index, the illumination influence trend value of the cutting line area is obtained;

[0028] The mean value is negatively correlated with the illumination influence trend value, and the similarity index is positively correlated with the illumination influence trend value.

[0029] Preferably, the filtering weight of each pixel in the cutting area is determined based on the difference between the cutting feature characterization value of each pixel in the cutting line area and the central pixel of the area and the difference between the background feature characterization value, combined with the difference between the illumination influence trend value and the gray value, specifically including:

[0030] Based on the grayscale value in the neighborhood window of each pixel point in the cutting line area and the grayscale value in the neighborhood window of the central pixel point in the cutting line area, the mean square error corresponding to each pixel point in the cutting line area is calculated;

[0031] According to the difference of the cutting feature representation value between each pixel point and the central pixel point in the cutting line area, the difference of the background feature representation value between each pixel point and the central pixel point, and the illumination influence trend value, a feature difference factor of each pixel point in the cutting line area is obtained;

[0032] According to the feature difference factor and the mean square error, a filter weight of each pixel in the cutting line area is obtained, wherein the feature difference factor is negatively correlated with the filter weight, and the mean square error is positively correlated with the filter weight.

[0033] Preferably, the method for obtaining the characteristic difference factor is specifically as follows:

[0034] For any pixel point in the cutting line area, a first difference feature of the pixel point is determined based on the difference in cutting feature representation values ​​between the pixel point and the central pixel point of the cutting line area; a second difference feature of the pixel point is determined based on the difference in background feature representation values ​​between the pixel point and the central pixel point;

[0035] Determine a weight coefficient of the first difference feature and a weight coefficient of the second difference feature according to the illumination influence trend value of the cutting line area, wherein the illumination influence trend value is negatively correlated with the weight coefficient of the first difference feature, and the illumination influence trend value is positively correlated with the weight coefficient of the second difference feature;

[0036] The first difference feature and the second difference feature are weightedly fused using the weight coefficient to obtain a feature difference factor of the pixel point.

[0037] Preferably, obtaining the cutting recognition result of the infrared scanning grayscale image according to the processing result specifically includes:

[0038] The edge detection is performed on the enhanced infrared scanning grayscale image to obtain the cutting route corresponding to the cutting piece.

[0039] Preferably, the step of performing region segmentation on the infrared scanning grayscale image to obtain the surface background region, the heat-affected region and the cutting line region specifically includes:

[0040] A neural network is used to segment the background and target in the infrared scanning grayscale image to obtain the surface background area and the heat source area. The heat source area is subjected to threshold segmentation processing to obtain the heat affected area and the cutting area, and the minimum circumscribed rectangle of the cutting area is used as the cutting line area.

[0041] The embodiments of the present invention have at least the following beneficial effects:

[0042] The present invention first obtains an infrared scanning grayscale image of the cutting piece during the cutting process, and performs preliminary regional segmentation on the image to distinguish the area where the approximate cutting path part is located in the image, and the surface background area of ​​the heat-affected area and other background parts affected by the heat source around the cutting path. Then, by analyzing the grayscale difference distribution of the pixel points in the cutting line area perpendicular to the cutting direction and belonging to the heat-affected area, as well as the grayscale fluctuation and symmetry characteristics, the cutting feature expression degree of the pixel points in the cutting line area in the heat-affected area is quantified, and the cutting feature characterization value also reflects the cutting feature expression degree of the pixel points that conform to the symmetric distribution. At the same time, the grayscale feature distribution and grayscale fluctuation of the pixel points in the cutting line area perpendicular to the cutting direction and belonging to the surface background part are analyzed, and the grayscale features exhibited by the surface background part are characterized by the background feature characterization value. Further, by analyzing the correlation between the grayscale value of the pixel point and the background feature characterization value, the correlation trend of the grayscale change affected by the ambient light is reflected, and the light influence trend value is quantified in combination with the grayscale difference distribution of the pixel points in the cutting direction, reflecting the response degree affected by the ambient light in the cutting line area. Finally, combining the feature difference performance of each pixel point in the cutting line area in two aspects and the grayscale difference, the filter weight corresponding to each pixel point is adaptively obtained, which can effectively enhance the grayscale contrast in the cutting line area while avoiding the influence of ambient light, making the image enhancement effect of the cutting line area better, so as to obtain more accurate recognition results of the cutting path of the alloy plate cutting process. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 It is a flowchart of the steps of a method performed by a cutting piece scanning system for a fully automatic intelligent production line provided by the present invention;

[0045] Figure 2 is a schematic diagram of an infrared scanning grayscale image provided by the present invention;

[0046] Figure 3 It is a flowchart of the steps of the method for obtaining the cutting feature characterization value provided by the present invention;

[0047] Figure 4 is a flowchart of the steps of the method for obtaining the illumination influence trend value provided by the present invention;

[0048] Figure 5 It is a flowchart of the steps of the method for obtaining the filtering weight of a pixel point provided by the present invention;

[0049] Figure 6 is a schematic diagram of an enhanced image provided by the present invention;

[0050] Figure 7 is a schematic diagram of the Sobel detection result corresponding to the enhanced image provided by the present invention;

[0051] Figure 8 It is a schematic diagram of the canny detection result provided by the present invention;

[0052] Fig. 9 It is a schematic diagram of the structure of a computer device provided by the present invention;

[0053] Fig.10 It is a schematic diagram of a cutting piece scanning device for a fully automatic intelligent production line provided by the present invention. DETAILED DESCRIPTION

[0054] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation, structure, features and effects of a cutting piece scanning system for a fully automatic intelligent production line proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0055] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0056] The following is a detailed description of a specific scheme of a cutting piece scanning system for a fully automatic intelligent production line provided by the present invention in conjunction with the accompanying drawings.

[0057] This embodiment proposes a cutting piece scanning system for a fully automatic intelligent production line, which can achieve the following Figure 1 The specific steps are as follows:

[0058] Step S100, obtaining an infrared scanning grayscale image of the surface of the cut piece during the cutting process on the production line, and performing region segmentation on the infrared scanning grayscale image to obtain a surface background region, a heat-affected region, and a cutting line region.

[0059] First of all, it should be noted that in the process of cutting the cutting piece, a certain amount of heat will be generated at the positions close to both sides of the cutting path in the direction perpendicular to the cutting path, and the heat will gradually increase. When the alloy plate is scanned by infrared, this part will appear highlighted.

[0060] In order to provide a data basis for the subsequent analysis of the distribution of the influence characteristics of the heat source on the cutting path, this embodiment requires infrared scanning of the surface of the cut piece during the cutting process. A high-resolution infrared camera can be installed just above the assembly line to collect infrared images of the surface of the cut piece during the cutting process. At the same time, the infrared image is grayed to obtain an infrared scanning gray image, such as Figure 2 This facilitates subsequent feature analysis.

[0061] As shown in the infrared scanning grayscale image, under normal circumstances, the temperature value of the pixel points on the cutting path is low, and the corresponding grayscale value is small. However, during the cutting process, there are a large number of high-temperature areas on both sides of the cutting path, and the grayscale value of the corresponding pixel points is large, so that the pixel points on the cutting path are affected by the surrounding higher temperature and the contrast with the surrounding non-cutting path parts is low, which is not conducive to the accurate identification of the cutting path. Therefore, it is necessary to compensate for the less significant cutting path parts to achieve more accurate scanning and positioning of the cutting path.

[0062] Based on this, in order to perform feature analysis of different regions in the subsequent embodiment, it is necessary to perform feature segmentation on the infrared scanning grayscale image to preliminarily distinguish the cutting path portion, the heat-affected portion around the cutting path, and the background portion outside these two portions.

[0063] Since there is a heat source part generated by cutting in the infrared scanning grayscale image, and other surrounding background parts have a relatively slight brightness change caused by ambient light, the brightness of the heat source part is displayed as a highlight part. At the same time, considering that the heat source part will show a corresponding heat distribution phenomenon with the cutting path as the central axis, the corresponding grayscale value distribution will also show a certain symmetry. Therefore, the infrared grayscale images in a large number of historical cutting records can be combined with training neural networks to perform preliminary semantic segmentation on the infrared scanning grayscale image, preliminarily divide the background part and the heat source part, and then distinguish the cutting path part and the high heat affected part of the heat source part. That is, the neural network is used to segment the background and target in the infrared scanning grayscale image to obtain the surface background area and the heat source area.

[0064] The specific contents related to the neural network are as follows: first, manually annotate, i.e., select the heat source areas of all images in the infrared grayscale image set, and then divide the annotated infrared grayscale image set into a training set and a validation set according to a ratio of 7:3. The training set is trained using the CNN neural network model, and the loss function is the cross entropy function. The gradient descent method is used to train until the loss function converges, and the validation set is used to verify the training results to complete the training of the neural network. The infrared grayscale image set is a set of images collected in the historical cutting record in the same way as the infrared scanning grayscale image.

[0065] Then, the trained neural network can be used to segment the heat source area in the infrared scanning grayscale image, and other connected areas in the infrared scanning grayscale image except the heat source area are the surface background areas.

[0066] Furthermore, the heat source area includes the high heat affected parts caused by cutting and the cutting path parts surrounded by the high heat affected parts on both sides of the cutting. Although the cutting path is affected by the highlighted heat affected parts and the cutting path is not obvious in the image, compared with the very highlighted heat affected parts, the temperature value is lower and the grayscale value is smaller. The threshold segmentation method can be used to roughly distinguish the approximate area range.

[0067] Specifically, the heat source area is subjected to threshold segmentation processing to obtain the heat affected area and the cutting area, and the minimum circumscribed rectangle of the cutting area is used as the cutting line area. In this embodiment, the heat source area is subjected to threshold segmentation processing to obtain the heat affected area and the cutting area using the Otsu threshold segmentation method, wherein the pixel points with gray values ​​greater than the optimal threshold belong to the heat affected area, and the pixel points with gray values ​​less than the optimal threshold belong to the cutting area, and the optimal threshold is determined by the Otsu threshold segmentation algorithm.

[0068] It should be noted that, considering the heat highlighting effect in the heat-affected zone, which affects the accuracy of the initially divided cutting area, this embodiment uses the minimum circumscribed rectangle of the cutting area as a cutting line area, characterizing it as the area range where the cutting path may be distributed, and compensates the grayscale value of the pixels in this part to obtain a more accurate cutting path recognition result. So far, after regional feature segmentation, the infrared scanning grayscale image of this embodiment is divided into two surface background areas, two heat-affected areas and one cutting line area.

[0069] Step S200, obtaining a cutting feature representation value for each pixel point in the cutting line area according to the gray value difference distribution, gray value fluctuation characteristic distribution and symmetry characteristic expression of each pixel point in the heat affected area in the cutting line area perpendicular to the cutting direction.

[0070] Considering that the cutting path can be approximately regarded as a straight line, the heat-affected areas on both sides of the cutting path that are closer to the cutting path in the direction perpendicular to the cutting path generally show a corresponding distribution phenomenon of heat, which is reflected in the infrared scanning grayscale image, that is, the grayscale values ​​of the pixels in the heat-affected areas on both sides of the cutting path perpendicular to the cutting direction show a symmetrical distribution. At the same time, under normal circumstances, the grayscale value distribution of the pixels in the heat-affected area on the same vertical route of the cutting path shows a high-brightness distribution and is relatively uniform. Based on this feature, each pixel in the cutting line area can be used as the foot of the perpendicular, and the symmetrical distribution characteristics of the pixels in the heat-affected area of ​​each vertical line perpendicular to the cutting direction, as well as the grayscale difference distribution and fluctuation distribution can be analyzed and quantified as the cutting feature characterization value.

[0071] In this embodiment, if Figure 3 As shown, the method for obtaining the cutting feature characterization value can be implemented by steps S201 to S203.

[0072] Step S201, taking any pixel point in the cutting line area as the target pixel point, and determining the first local pixel point sequence and the second local pixel point sequence of the target pixel point based on the pixel points belonging to the heat affected area in the cutting direction perpendicular to the target pixel point, with the target pixel point as the center.

[0073] Specifically, taking the target pixel point as the foot of the perpendicular, a straight line perpendicular to the cutting direction is obtained, and the pixel points on the straight line belonging to the two heat-affected zones constitute the first local pixel point sequence and the second local pixel point sequence respectively. Figure 2 As shown, the target pixel point belongs to the pixel point inside the middle highlighted part. With the target pixel point as the center and perpendicular to the straight line in the cutting direction, the pixel points on the upper side belonging to the heat-affected area constitute the first local pixel point sequence, and the pixel points on the lower side belonging to the heat-affected area constitute the second local pixel point sequence.

[0074] At the same time, it should be noted that, in order to subsequently target the grayscale features of the symmetrical distribution of the two pixel sequences, the two local pixel sequences are arranged according to the distance between the pixel and the target pixel, for example, the pixels are arranged in the order of the Euclidean distance between the pixel belonging to the heat-affected area and the target pixel on a straight line perpendicular to the cutting direction from small to large or from large to small. That is, in the first local pixel sequence and the second local pixel sequence, the Euclidean distance between the pixel at the corresponding position and the target pixel is equal.

[0075] Step S202, determining the vertical diffusion uniformity based on the overall level of grayscale value differences between corresponding pixels of the first local pixel sequence and the second local pixel sequence, wherein the overall level of grayscale value differences is negatively correlated with the vertical diffusion uniformity.

[0076] In this embodiment, taking any pixel point in the cutting line area as an example, the grayscale difference distribution characteristics of the pixel point at the corresponding positions on both sides of the cutting path are analyzed to quantify the grayscale symmetry distribution characteristics. That is, the i-th pixel point in the cutting line area is taken as the target pixel point. As a specific example, the vertical diffusion uniformity corresponding to the i-th pixel point can be expressed by the formula:

[0077] ;in, Indicates the vertical diffusion uniformity of the i-th pixel point in the cutting line area, which is also the target pixel point. represents the minimum value of the number of pixels contained in the first local pixel sequence and the second local pixel sequence corresponding to the i-th pixel, Represents the gray value of the nth pixel in the first local pixel sequence corresponding to the i-th pixel in the cutting line area, It represents the gray value of the nth pixel in the second local pixel sequence corresponding to the i-th pixel in the cutting line area, i represents the i-th pixel in the cutting line area, and exp() represents an exponential function with the natural constant e as the base.

[0078] It reflects the gray value difference between the pixels at corresponding positions in the first local pixel sequence and the second local pixel sequence. When n is 1, it represents the difference between the gray values ​​of the first pixel in the two local pixel sequences. It reflects the overall level of the grayscale value difference between the pixels at the corresponding positions in the two local pixel sequences, that is, this embodiment uses the mean of all grayscale value differences to reflect the overall level. The smaller the grayscale difference between the corresponding positions in the two local pixel sequences, the greater the degree of expression of the symmetric feature with the target pixel as the symmetry center. That is, after negative correlation processing in the form of negative exponential power, the larger the value of the corresponding vertical diffusion uniformity. The vertical diffusion uniformity characterizes the degree of characteristic symmetry of the target pixel points on both sides perpendicular to the cutting direction.

[0079] It should be noted that, in other embodiments, the implementer may also use features such as the median and mode to characterize the overall level of grayscale differences between corresponding positions of two local pixel sequences. Among them, the negative correlation may be mapped in the form of a reciprocal or in the form of a negative exponential power with the natural constant e as the base. At the same time, the cutting direction is determined when the cutting operation is performed on the cutting piece, that is, the cutting direction characterizes the path of the actual cutting operation. In other embodiments, cutting auxiliary lines may be drawn during cutting, and the cutting direction may also be marked based on the cutting auxiliary lines.

[0080] Step S203, according to the balance and fluctuation of the grayscale values ​​of the pixels in the first local pixel sequence, and the balance and fluctuation of the grayscale values ​​of the pixels in the second local pixel sequence, combined with the vertical diffusion uniformity, obtain the cutting feature representation value of the target pixel.

[0081] Considering that the temperature at the corresponding position of the pixel point in the heat-affected area is higher, the heat is higher, and the grayscale value of the corresponding pixel point is larger, and the grayscale value distribution of the pixel points in the heat-affected area is more uniform and has less fluctuation. Based on this feature, by analyzing the grayscale feature distribution of the pixels in the two local pixel sequences and combining the grayscale symmetry distribution characteristics, the degree of feature expression of the pixel points belonging to the cutting path as a whole is quantified.

[0082] In this embodiment, taking any one of the first local pixel point sequence and the second local pixel point sequence as an example, the overall horizontal coefficient and the discrete coefficient of the grayscale values ​​of all pixels in the local pixel point sequence are fused to obtain the distribution characteristic factor of the local pixel point sequence; based on the distribution characteristic factor of the first local pixel point sequence and the distribution characteristic factor of the second local pixel point sequence and the degree of vertical diffusion uniformity, the cutting feature representation value of the target pixel point is determined.

[0083] The overall horizontal coefficient can be the mean of the grayscale values ​​of all pixels in the local pixel sequence, or it can be the median, mode, etc. The dispersion coefficient can be the variance of the grayscale values ​​of all pixels in the local pixel sequence, or it can be the standard deviation, coefficient of variation, etc.

[0084] In this embodiment, as a specific example, the cutting feature representation value of the target pixel point can be expressed by the formula: ;in, It represents the cutting feature representation value of the i-th pixel point in the cutting line area, that is, the target pixel point. and They represent the mean and variance of the grayscale values ​​of all pixels in the first local pixel sequence corresponding to the target pixel, and They represent the mean and variance of the grayscale values ​​of all pixels in the second local pixel sequence corresponding to the target pixel, Indicates the vertical diffusion uniformity of the i-th pixel point in the cutting line area, that is, the target pixel point.

[0085] Represents the distribution characteristic factor of the first local pixel sequence, The distribution characteristic factor representing the second local pixel point sequence is that the corresponding overall horizontal coefficient and discrete coefficient are merged by multiplication in this embodiment. In other embodiments, the implementer may also use summation and other methods for processing.

[0086] In the distribution characteristic factors, and It reflects the overall level of grayscale value distribution in the corresponding local pixel sequence, that is, it reflects the characteristics of the overall grayscale distribution on both sides of the target pixel in the heat affected area. and It reflects the fluctuation degree of the gray value distribution in the corresponding local pixel sequence, that is, it reflects the characteristics of the gray value distribution fluctuation in the heat affected area on both sides around the target pixel. It represents the symmetrical distribution of the two sides around the target pixel. This embodiment realizes the fusion of the three aspects of features through the above formula. Therefore, the cutting feature representation value can represent the comprehensive feature expression degree of the corresponding target pixel in these three aspects.

[0087] Step S300, obtaining a background feature representation value of each pixel point in the cutting line area according to the gray value fluctuation characteristic distribution and gray value balanced distribution of each pixel point in the cutting line area belonging to the surface background area in a direction perpendicular to the cutting direction.

[0088] Analogously to the grayscale feature analysis method of the pixel points in the heat affected area on both sides of the cutting path perpendicular to the cutting direction, the grayscale feature distribution of the pixel points in the surface background area on both sides of the cutting path perpendicular to the cutting direction can also be analyzed and quantified into background feature representation values.

[0089] According to the same acquisition method of the first and second local pixel point sequences in step S200, the pixel points belonging to the surface background area on the upper and lower sides of the target pixel point are acquired. Specifically, based on the pixel points belonging to the surface background area in the target pixel point perpendicular to the cutting direction, the third local pixel point sequence and the fourth local pixel point sequence are determined with the target pixel point as the center.

[0090] That is, still taking the target pixel point as the foot of the perpendicular, on the straight line perpendicular to the cutting direction, obtain the pixel points belonging to the two surface background areas respectively, as shown in Figure 2 , all the pixel points belonging to the upper surface background area on the straight line perpendicular to the cutting direction constitute the third local pixel point sequence, and all the pixel points belonging to the lower surface background area on the straight line perpendicular to the cutting direction constitute the fourth local pixel point sequence.

[0091] Meanwhile, it should be noted that the pixel arrangement of the third local pixel point sequence and the fourth local pixel point sequence is the same as the pixel arrangement of the first local pixel point sequence and the second local pixel point sequence. For example, the four local pixel point sequences are arranged in the order of the Euclidean distances corresponding to the pixels from small to large. Or the four local pixel point sequences are arranged in the order of the Euclidean distances corresponding to the pixels from large to small.

[0092] Obtain distribution characteristic factors of the third local pixel point sequence and the fourth local pixel point sequence. In this embodiment, the method for obtaining the distribution characteristic factors of the third local pixel point sequence and the fourth local pixel point sequence is the same as the method for obtaining the distribution characteristic factors of the first local pixel point sequence and the second local pixel point sequence in step S203.

[0093] Further, the grayscale feature distribution of the pixels in the upper background area on the vertical line corresponding to the target pixel is comprehensively analyzed in the same manner as step S203, that is, the background feature representation value of the target pixel is determined based on the distribution feature factor of the third local pixel sequence and the distribution feature factor of the fourth local pixel sequence.

[0094] In this embodiment, any pixel point in the cutting line area is still used as an example for description, that is, the background feature representation value of the target pixel point can be expressed by the formula:

[0095] ;in, It represents the background feature representation value of the i-th pixel in the cutting line area, which is also the target pixel. and They represent the mean and variance of the grayscale values ​​of all pixels in the third local pixel sequence corresponding to the target pixel, and They respectively represent the mean and variance of the grayscale values ​​of all pixels in the fourth local pixel sequence corresponding to the target pixel.

[0096] Represents the distribution characteristic factor of the third local pixel sequence, represents the distribution characteristic factor of the fourth local pixel sequence. In the distribution characteristic factor, and It reflects the overall level of grayscale value distribution in the corresponding third and fourth local pixel sequences, that is, it reflects the characteristics of the overall grayscale distribution in the surface background area on both sides around the target pixel. and It reflects the fluctuation degree of the gray value distribution in the corresponding third and fourth local pixel sequences, that is, it reflects the characteristics of the gray distribution fluctuation condition in the surface background area on both sides around the target pixel. This embodiment realizes the fusion of the features of these two aspects through the above formula. Therefore, the background feature representation value can represent the comprehensive feature expression degree of the corresponding target pixel in these two aspects.

[0097] It should be noted that, taking into account the possibility that ambient lighting may affect the grayscale value distribution in the surface background area during the cutting process, under normal circumstances, the surface background area presents a darker grayscale distribution, but due to the influence of ambient lighting, less uniform local bright areas may appear, that is, the normal darker distribution generally also has a symmetrical distribution, the influence of ambient lighting destroys this symmetry feature. Therefore, when analyzing the grayscale features of the pixel points in the surface background area on the vertical line corresponding to the target pixel point, this embodiment does not consider the quantization of the symmetry features.

[0098] Step S400, obtaining the illumination influence trend value of the cutting line area according to the correlation between the grayscale values ​​of all pixels in the cutting line area and the corresponding background feature representation values ​​and the grayscale difference distribution of pixels in the neighborhood of each pixel in the cutting line area in the cutting direction.

[0099] Considering that there may be parts of the surface background area with higher brightness due to the influence of ambient light, but due to the uncertainty of ambient light illumination, this part of the ambient light affected area may be mistakenly identified as the heat affected area, thereby destroying the grayscale symmetry characteristics of the heat affected area under normal circumstances, affecting the enhancement effect of the cutting line area. Therefore, this embodiment quantifies the influence of ambient light by combining the grayscale change characteristics of the vertical line corresponding to the pixel point in the cutting line area in the surface background area and the neighborhood grayscale feature distribution of the pixel point, and determines the trend value of light influence.

[0100] In this embodiment, if Figure 4As shown, the method for obtaining the illumination influence trend value can be implemented by steps S401 to S403.

[0101] Step S401, calculating a similarity index based on the grayscale values ​​of all pixels in the cutting line area and the background feature representation values ​​of the same pixels.

[0102] Each pixel in the cutting line area corresponds to a background feature representation value, which reflects the grayscale feature expression of the background part on the vertical line perpendicular to the cutting direction where the pixel is located. The grayscale change of the pixel in the cutting line area and the change of the background feature representation value corresponding to the same pixel are relatively correlated under normal circumstances. When there is a certain difference between the changes of the two, it means that the background part is affected by the ambient light, and relatively abnormal grayscale fluctuations occur. At the same time, the change of ambient light brightness has a greater impact on the grayscale value expression of the pixel in the cutting line area.

[0103] Based on this, by analyzing the correlation between the grayscale values ​​of all pixels in the cutting line area and the background feature representation values ​​of all pixels, the similarity index between the two is calculated. Specifically, in this embodiment, the grayscale values ​​of all pixels in the cutting line area constitute the grayscale value sequence corresponding to the cutting line area, and according to the same arrangement order of pixels, the background feature representation values ​​of all pixels in the cutting area are obtained to constitute the background feature sequence corresponding to the cutting line area.

[0104] The Pearson correlation coefficient between the gray value sequence and the background feature sequence is calculated as the similarity index between the two. This similarity index characterizes the degree of correlation between the grayscale change characteristics of the pixels in the cutting line area and the grayscale change characteristics of the background part corresponding to the vertical line. The larger the value of the similarity index, the greater the influence of the ambient light on the brightness change in the cutting line area.

[0105] In other embodiments, the implementer may also calculate the cosine similarity between the gray value sequence and the background feature sequence as the similarity index, or calculate the negative correlation coefficient of the DTW distance between the gray value sequence and the background feature sequence as the similarity index.

[0106] Step S402: taking any pixel point as a selected pixel point, and obtaining all the neighboring pixel points on each line segment parallel to the cutting direction within the neighborhood window of the selected pixel point to form each neighborhood pixel point sequence.

[0107] Considering that the grayscale feature distribution between adjacent pixels parallel to the cutting direction should be relatively similar, in order to provide a data basis for the subsequent process, it is necessary to first obtain the pixel distribution sequence parallel to the cutting direction in the local range around each pixel. In this embodiment, the neighborhood window size of each pixel is set to 5×5, and the implementer can set it according to the specific implementation scenario.

[0108] In the neighborhood window of each pixel point, the window can be traversed to obtain multiple line segments parallel to the cutting direction. The length of each line segment may be the same or different. All the neighborhood pixel points on each parallel line segment are arranged in a certain order to obtain the neighborhood pixel point sequence corresponding to each parallel line segment. Among them, all the neighborhood pixel points can be arranged in the order from left to right of the line segment, or in the order from right to left, but it is necessary to ensure that the arrangement method of all neighborhood pixel point sequences is the same.

[0109] For example, assuming that the cutting direction is a direction with an angle of 180° with the horizontal direction, that is, the cutting direction is horizontal to the left, and then multiple line segments parallel to the horizontal line in the neighborhood window of the pixel point constitute multiple neighborhood pixel point sequences, that is, in a 5×5 neighborhood window of a pixel point, each row of 5 pixels constitutes a neighborhood pixel point sequence, that is, in the current case, each row of pixels in the neighborhood window of the pixel point is the pixel points on each parallel line segment parallel to the cutting direction.

[0110] Step S403, according to the difference change of the gray value in the neighborhood pixel sequence of the pixel point in the cutting line area, combined with the similarity index, the illumination influence trend value of the cutting line area is obtained.

[0111] Considering that the grayscale value difference of the pixels belonging to the cutting path around each pixel in the cutting line area is small, the grayscale value changes of adjacent pixels in each neighborhood pixel sequence in the neighborhood window are relatively close. Based on this, the degree to which the overall cutting line area is affected by ambient light can be quantified by analyzing the adjacent grayscale changes of each neighborhood pixel sequence corresponding to each pixel in the cutting line area and combining the similarity index.

[0112] Firstly, for any neighborhood pixel sequence, the grayscale variation factor of the neighborhood pixel sequence is determined based on the fluctuation degree of the grayscale value difference between adjacent pixels in the neighborhood pixel sequence.

[0113] In this embodiment, taking any pixel point in the cutting line area as an example, the mth neighborhood pixel point sequence in the neighborhood window of the i-th pixel point in the cutting line area, the gray value difference between each neighborhood pixel point and the next adjacent neighborhood pixel point in the neighborhood pixel point sequence is used as the gray feature difference of each neighborhood pixel point. Taking any neighborhood pixel point as an example, the gray feature difference can be expressed as , Represents the grayscale feature difference of the tth neighboring pixel in the mth neighboring pixel sequence in the neighborhood window of the ith pixel in the cutting line area, and They respectively represent the grayscale value of the tth neighboring pixel in the mth neighborhood pixel sequence in the neighborhood window of the ith pixel in the cutting line area and the grayscale value of the t+1th neighborhood pixel, i represents the ith pixel in the cutting line area, and m represents the mth neighborhood pixel sequence in the neighborhood window of the ith pixel in the cutting line area. It should be noted that the grayscale feature difference of the last pixel is set to 0, or the value of the relevant grayscale feature cannot be calculated for the pixel without a reference object and is not calculated. The grayscale feature difference characterizes the change in the grayscale difference between adjacent pixels in the neighborhood pixel sequence.

[0114] The average of the absolute values ​​of the difference between the grayscale feature differences between each neighboring pixel point in the neighborhood pixel point sequence and the next neighboring pixel point is used as the grayscale change factor of the neighborhood pixel point sequence. That is, by analyzing the difference distribution of the adjacent grayscale differences of each neighboring pixel point in a neighborhood pixel point sequence, the fluctuation of the adjacent grayscale value differences in the neighborhood pixel point sequence is characterized. The greater the difference distribution of the adjacent grayscale differences, the greater the corresponding fluctuation degree, and the greater the value of the grayscale change factor.

[0115] Furthermore, according to the mean of the grayscale variation factors of all neighborhood pixel sequences of all pixels in the cutting area, combined with the similarity index, the illumination influence trend value of the cutting line area is obtained; the mean is negatively correlated with the illumination influence trend value, and the similarity index is positively correlated with the illumination influence trend value.

[0116] In this embodiment, the illumination influence trend value of the cutting line area can be expressed as follows:

[0117] ;

[0118] in, Indicates the trend value of the lighting impact on the cutting line area. represents the similarity index, Indicates the number of pixels contained in the cutting line area. Represents the total number of neighboring pixel sequences contained in the i-th pixel in the cutting line area. Represents the total number of pixels contained in the mth neighborhood pixel sequence of the ith pixel in the cutting line area. It represents the grayscale feature difference of the tth neighboring pixel in the mth neighboring pixel sequence of the ith pixel in the cutting line area. represents the grayscale feature difference of the t+1th neighboring pixel in the mth neighboring pixel sequence of the ith pixel in the cutting line area, c represents the preset hyperparameter, and its value is 0.1 to prevent the denominator from being 0, and Norm() represents the linear normalization function.

[0119] It represents the difference between the grayscale value differences of adjacent pixels in a set of multiple continuous pixels parallel to the actual cutting path line in the neighborhood window, reflecting the difference in grayscale feature differences between adjacent pixels in the neighborhood pixel sequence. The smaller the difference, the more uniform the grayscale change parallel to the cutting direction in the neighborhood window, and the greater the degree of characteristics that conform to the influence of illumination in the neighborhood window. The corresponding grayscale change factor of the mth neighborhood pixel sequence is The larger the value of is, the greater the trend value of the illumination influence in the cutting line area should be.

[0120] Therefore, the distribution of grayscale features parallel to the cutting direction in the neighborhood window of all pixels in the cutting line area is traversed. The larger the value of the illumination influence trend value, the higher the response trend to the ambient illumination, and the higher the authenticity of the calculated illumination influence correlation. Therefore, the correlation is weighted by this value, that is, the larger the value of the corresponding similarity index, the greater the response trend of the grayscale change in the cutting line area to the ambient illumination, and thus the larger the value of the illumination influence trend value. Based on this, the illumination influence trend value of the cutting line area reflects the influence trend of the grayscale value change of the pixel points in the cutting line area on the ambient illumination. The larger its value, the greater the degree of response.

[0121] Step S500, based on the difference in the cutting feature characterization value between each pixel point in the cutting line area and the central pixel point of the area and the difference in the background feature characterization value, combined with the difference in the lighting influence trend value and the grayscale value, determine the filtering weight of each pixel point in the cutting area; based on the filtering weight, enhance the cutting line area, and obtain the cutting recognition result of the infrared scanning grayscale image according to the processing result.

[0122] When the image is enhanced based on the idea of ​​non-local mean filtering for each pixel point belonging to the cutting path, the mean square error in the neighborhood between any pixel point in the cutting line area and the central cutting pixel point of the current area is calculated. The mean square error is calculated based on the grayscale value. When the mean square error is large, that is, when the difference between the central pixel point and other pixels in the cutting line area is large in the local area, in the original non-local mean filtering idea, the similarity between each pixel point in the cutting line area and the central pixel point is small, and the corresponding averaging weight is low. Therefore, the grayscale value of the central pixel point finally obtained is still large, which cannot play the role of enhancement and improve the contrast of the cutting line area.

[0123] Therefore, when this embodiment uses the idea of ​​non-local mean filtering to enhance the cutting line area to improve the contrast of the cutting line area, by adding the characteristic performance of the heat-affected area and the surface background area to the pixel points in the cutting line area, the difference in the characteristic performance of the central pixel point of the cutting line area and each internal pixel point in the local area is used as the adjustment weight of the mean square error. The smaller the difference in characteristic performance, the more similar the characteristics of the two in other areas are, and the greater the reference value of the corresponding mean square error. At the same time, in order to achieve the purpose of enhancing the cutting line area, it is necessary to make the corresponding mean square error between the central pixel point of the cutting line area and each internal pixel point in the local area larger, the corresponding similarity lower, that is, the greater the grayscale difference, so that the averaging weight of each pixel point in the cutting line area except the central pixel point is larger, which can increase the grayscale contrast after averaging processing and achieve the purpose of image enhancement.

[0124] In this embodiment, if Figure 5 As shown, the method for obtaining the filtering weight of each pixel point in the cutting area can be implemented by steps S501 to S503.

[0125] Step S501, based on the grayscale value in the neighborhood window of each pixel point in the cutting line area and the grayscale value in the neighborhood window of the central pixel point in the cutting line area, calculate the mean square error corresponding to each pixel point in the cutting line area.

[0126] It should be noted that in the non-local mean filtering algorithm, the similarity between a larger cutting line area and each local window is usually calculated to determine the more similar parts for smoothing. In the scenario of this embodiment, most of the cutting path parts are cutting line areas. The grayscale value contrast between the pixels in the cutting line area is small, showing relatively similar characteristics, making it difficult to segment and accurately identify the cutting path part in the cutting line area. Therefore, it is necessary to calculate the maximum difference between the center of the cutting line area and the local window of each pixel point to improve the contrast between the two and achieve enhancement and compensation effects.

[0127] Based on this, it is first necessary to calculate the mean square error corresponding to each pixel in the cutting line area based on the grayscale value in the neighborhood window of each pixel in the cutting line area and the grayscale value in the neighborhood window of the central pixel in the cutting line area. Among them, in this embodiment, the pixel point where the centroid of the cutting line area is located is used as the central pixel of the cutting line area. In other embodiments, the implementer can set it according to the specific implementation scenario. Then, the grayscale values ​​of all pixels in the 5×5 neighborhood window of each pixel in the cutting line area constitute the neighborhood grayscale set of each pixel. Similarly, the grayscale values ​​of all pixels in the 5×5 neighborhood window of the central pixel in the cutting line area constitute the neighborhood grayscale set of the central pixel. By calculating the mean square error between each pixel in the cutting line area and the neighborhood grayscale set corresponding to the central pixel, the mean square error corresponding to each pixel required for image enhancement is obtained.

[0128] Step S502, according to the difference of the cutting feature characterization value between each pixel point and the central pixel point in the cutting line area, the difference of the background feature characterization value between each pixel point and the central pixel point, combined with the illumination influence trend value, obtain the feature difference factor of each pixel point in the cutting line area.

[0129] By comparing the difference between the neighborhood window feature distribution of each pixel point in the cutting line area and the neighborhood window feature distribution of the central pixel point, the reference value weight corresponding to the mean square error is taken. The smaller the difference, the greater the feature similarity between the two, the greater the corresponding reference value, and thus the greater the reference weight of the mean square error corresponding to the pixel point.

[0130] Specifically, for any pixel point in the cutting line area, the first difference feature of the pixel point is determined based on the difference in the cutting feature representation value between the pixel point and the central pixel point of the cutting line area; the second difference feature of the pixel point is determined based on the difference in the background feature representation value between the pixel point and the central pixel point; the weight coefficient of the first difference feature and the weight coefficient of the second difference feature are determined according to the illumination influence trend value of the cutting line area, the illumination influence trend value is negatively correlated with the weight coefficient of the first difference feature, and the illumination influence trend value is positively correlated with the weight coefficient of the second difference feature; the first difference feature and the second difference feature are weightedly fused using the weight coefficient to obtain the feature difference factor of the pixel point.

[0131] In this embodiment, taking any pixel point in the cutting line area as an example for explanation, the characteristic difference factor of the i-th pixel point can be expressed as:

[0132]

[0133] in, Represents the characteristic difference factor of the i-th pixel in the cutting line area, Represents the cutting feature representation value of the i-th pixel in the cutting line area, Represents the cutting feature representation value of the central pixel point in the cutting line area, Represents the background feature representation value of the i-th pixel in the cutting line area, Represents the background feature representation value of the central pixel in the cutting line area, Indicates the lighting impact trend value of the cutting line area.

[0134] represents the first difference feature of the i-th pixel in the cutting line area, Indicates the weight coefficient corresponding to the first difference feature. The first difference feature reflects the difference in the symmetrical distribution and grayscale distribution of the i-th pixel and the central pixel in the heat-affected area. The greater the trend of the cutting line area being affected by light, the smaller the reference of the feature difference in this aspect, indicating that the correlation between the feature difference in this aspect and the grayscale value change of the current pixel is smaller, that is, the smaller the value of the weight coefficient of the first difference feature. Use the weight coefficient to weight the first feature difference. Indicates the degree of characteristic difference representation in the first aspect.

[0135] represents the second difference feature of the i-th pixel in the cutting line area, It represents the weight coefficient corresponding to the second difference feature. The second difference feature reflects the difference in the grayscale feature distribution between the i-th pixel and the central pixel in the surface background area. The greater the trend of the cutting line area being affected by the illumination, the greater the correlation between the grayscale change and the ambient illumination in the cutting line area. The larger the value of the weight coefficient corresponding to the second difference feature, the weight coefficient is used to weight the second feature difference. Indicates the degree of characteristic difference representation in the second aspect.

[0136] The characteristic difference factor integrates the degree of characteristic difference between each pixel point in the cutting line area and the central pixel point in the heat affected area and the surface environment area, and quantifies the reference weight of the reference value of the mean square error corresponding to each pixel point.

[0137] Step S503, obtaining a filter weight for each pixel in the cutting line area according to the feature difference factor and the mean square error, wherein the feature difference factor is negatively correlated with the filter weight, and the mean square error is positively correlated with the filter weight.

[0138] By comparing the degree of feature difference between each pixel point and the central pixel point in the cutting line area, the smaller the value of the feature difference factor, the more similar the feature performance in the neighborhood window of the pixel points at different positions, and the larger the reference weight of the mean square error of the pixel point, that is, the feature difference factor of each pixel point and the corresponding mean square error can be combined to determine the filtering weight of each pixel point when performing non-local mean filtering.

[0139] Specifically, taking any pixel point in the cutting line area as an example, the filtering weight of the i-th pixel point in the cutting line area can be expressed as , represents the filter weight of the i-th pixel in the cutting line area, It represents the mean square error between the gray value in the neighborhood window of the i-th pixel and the gray value in the neighborhood window of the center pixel. Represents the feature difference factor of the i-th pixel in the cutting line area.

[0140] The smaller the value of the feature difference factor, the greater the similarity between the feature differences of the i-th pixel in the cutting line area, and the greater the weight of the averaging process during the corresponding filtering. The larger the value of , the greater the difference between the grayscale distribution in the local range of the i-th pixel and the central pixel, and the greater the weight of the averaging process during the corresponding filtering, so as to enhance the grayscale contrast of the i-th pixel. It should be noted that this embodiment uses the reciprocal of the feature difference factor to perform negative correlation processing on the feature difference factor. In other embodiments, the implementer can select other appropriate methods for negative correlation processing according to the specific implementation scenario, such as the form of negative exponential power with the natural constant e as the base, etc.

[0141] The principle of non-local mean filtering is used to obtain the smoothing weight of each pixel in the cutting line area for the central pixel. It is necessary to sum and normalize the filter weights of all non-central pixels, that is, to obtain the normalized value of the filter weight of each pixel in the cutting line area, and filter the central pixel, thereby completing the compensation of the cutting path in the image and achieving the purpose of image enhancement. It should be noted that this embodiment uses the idea of ​​non-local mean filtering to adaptively obtain the filter weight of each pixel in the cutting line area. Through the adaptively obtained filter weight, the purpose of increasing the grayscale contrast in the cutting line area is achieved to achieve the effect of grayscale compensation. At the same time, the non-local mean filtering algorithm is a well-known technology and will not be introduced here.

[0142] Furthermore, after the cutting line area is enhanced, it can be processed by edge detection, threshold segmentation and other image processing methods to obtain the actual cutting path in the cutting line area, that is, edge detection is performed on the enhanced infrared scanning grayscale image to obtain the cutting route corresponding to the cutting piece.

[0143] In this embodiment, in order to ensure the accuracy of the cutting path, after the cutting line area is enhanced, the infrared scanning grayscale image is also subjected to preliminary denoising as a whole. Specifically, after all pixels in the cutting line area are compensated, the compensated infrared scanning grayscale image is subjected to histogram equalization to enhance the contrast. The enhanced image is recorded as the enhanced image. Figure 6 Then, canny edge detection is performed on the enhanced image to obtain the actual cutting path, as shown in Figure 7 The figure shows the schematic diagram of the Sobel detection result corresponding to the enhanced image. Canny detection is performed based on the Sobel detection result, and the background information is suppressed by masking to obtain the actual cutting line of the final cutting path, as shown in Figure 8 The figure shows the canny test result diagram. Finally, the relevant staff can evaluate and monitor whether the cutting process is abnormal based on the actual cutting line and complete the scanning process of the cut part.

[0144] To sum up, this embodiment analyzes the gray value differences in sequence between the pixels in the heat-affected area in the vertical direction of the cutting path, thereby obtaining the uniformity of the vertical heat diffusion of the central pixel, and then analyzing the characteristic factors of the pixel change in the cutting line area. Similarly, the differences corresponding to the pixel change characteristics in the illumination area are obtained. This operation avoids misjudging the influence of the illumination area as a heat source influence, which leads to the loss of the characteristics of the cutting path itself, and improves the accuracy of the cutting path scanning.

[0145] At the same time, based on the relationship between the characteristic factors of the illumination area corresponding to the pixels in the cutting line area and the grayscale value changes of the pixels on the cutting path, the illumination influence trend in the cutting line area is obtained. Finally, based on the principle and operation of the non-local mean filtering algorithm, the original mean square error is supplemented and modified to complete the image enhancement of the cutting area in the image. This operation avoids the defect that the averaging weights of the original filtering algorithm cannot represent the special characteristics of the pixels in the current cutting line area. At the same time, it avoids the influence of heat sources and illumination areas and cannot accurately obtain the impact on the final filtering results, thereby improving the pertinence and accuracy of image enhancement.

[0146] The present application also provides a computer device. Fig. 9, which shows a schematic diagram of the structure of a computer device provided by an embodiment of the present invention, the computer device includes a memory 901, a processor 902, and a computer program 903 stored in the memory 901 and running on the processor 902, wherein when the processor 902 executes the computer program 903, the computer device can execute any one of the cutting part scanning systems for a fully automatic intelligent production line introduced above.

[0147] like Fig.10 , provides a cutting piece scanning device for a fully automatic intelligent production line, the device comprising:

[0148] A preprocessing module is used to obtain an infrared scanning grayscale image of the surface of the cut piece during the cutting process on the production line, and to perform regional segmentation on the infrared scanning grayscale image to obtain a surface background area, a heat-affected area, and a cutting line area;

[0149] A cutting analysis module is used to obtain a cutting feature representation value of each pixel point in the cutting line area according to the gray value difference distribution, gray value fluctuation characteristic distribution and symmetry characteristic performance of each pixel point in the cutting line area and belonging to the heat affected area in the cutting direction perpendicular to the cutting direction;

[0150] A background analysis module is used to obtain a background feature representation value of each pixel point in the cutting line area according to the gray value fluctuation characteristic distribution and gray value balanced distribution of each pixel point in the cutting line area belonging to the surface background area in a direction perpendicular to the cutting direction;

[0151] The illumination analysis module is used to obtain the illumination influence trend value of the cutting line area according to the correlation between the grayscale values ​​of all pixels in the cutting line area and the corresponding background feature representation values, and the grayscale difference distribution of pixels in the neighborhood of each pixel in the cutting line area in the cutting direction;

[0152] The cutting recognition module is used to determine the filtering weight of each pixel in the cutting area according to the difference in the cutting feature representation value between each pixel in the cutting line area and the central pixel of the area, as well as the difference in the background feature representation value, combined with the difference in the lighting influence trend value and the grayscale value; enhance the cutting line area based on the filtering weight, and obtain the cutting recognition result of the infrared scanning grayscale image according to the processing result.

[0153] The device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the cutting piece scanning device for a fully automatic intelligent production line and the cutting piece scanning system for a fully automatic intelligent production line provided in the above embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0154] An embodiment of the present application also provides a computer program product. When the computer program product is run on a computer device, the computer device can execute any one of the cutting part scanning methods for a fully automatic intelligent production line introduced above.

[0155] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is executed on a computer device, the computer device can execute any one of the cutting part scanning methods for a fully automatic intelligent production line introduced above.

[0156] In the embodiments provided in the present application, it should be understood that the provided computer device, computer program product and computer-readable storage medium are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the methods provided above and will not be repeated here.

[0157] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A cutting piece scanning system for a fully automatic intelligent production line, comprising a memory and a processor, It is characterized in that The processor executes the computer program stored in the memory to implement the following steps: Obtain an infrared scanning grayscale image of the surface of the cut piece during the cutting process on the production line, and perform regional segmentation on the infrared scanning grayscale image to obtain the surface background area, heat-affected area, and cutting line area; According to the gray value difference distribution, gray value fluctuation characteristic distribution and symmetry characteristic performance of each pixel point in the cutting line area and in the heat affected area perpendicular to the cutting direction, the cutting characteristic representation value of each pixel point in the cutting line area is obtained; According to the gray value fluctuation characteristic distribution and gray value balanced distribution of each pixel point in the cutting line area and belonging to the surface background area in the direction perpendicular to the cutting direction, the background characteristic representation value of each pixel point in the cutting line area is obtained; According to the correlation between the grayscale values ​​of all pixels in the cutting line area and the corresponding background feature representation values, and the grayscale difference distribution of pixels in the neighborhood of each pixel in the cutting line area in the cutting direction, the illumination influence trend value of the cutting line area is obtained; Determine the filtering weight of each pixel in the cutting area according to the difference between the cutting feature representation value of each pixel in the cutting line area and the central pixel of the area and the difference between the background feature representation value, combined with the difference between the illumination influence trend value and the gray value; The cutting line area is enhanced based on the filtering weight, and a cutting recognition result of the infrared scanning grayscale image is obtained according to the processing result.

2. A cutting piece scanning system for a fully automatic intelligent production line according to claim 1, It is characterized in that The cutting feature representation value of each pixel point in the cutting line area is obtained according to the gray value difference distribution, gray value fluctuation characteristic distribution and symmetry characteristic performance of each pixel point in the cutting line area and in the heat affected area perpendicular to the cutting direction, specifically including: Taking any pixel point in the cutting line area as the target pixel point, and determining a first local pixel point sequence and a second local pixel point sequence of the target pixel point based on the pixel points belonging to the heat-affected area in a direction perpendicular to the cutting direction of the target pixel point with the target pixel point as the center; determining a vertical diffusion uniformity based on an overall level of grayscale value differences between corresponding pixels of the first local pixel point sequence and the second local pixel point sequence, wherein the overall level of grayscale value differences is negatively correlated with the vertical diffusion uniformity; According to the balance and fluctuation of the grayscale values ​​of the pixels in the first local pixel sequence and the balance and fluctuation of the grayscale values ​​of the pixels in the second local pixel sequence, combined with the vertical diffusion uniformity, the cutting feature representation value of the target pixel is obtained.

3. A cutting piece scanning system for a fully automatic intelligent production line according to claim 2, It is characterized in that The method for obtaining the cutting feature representation value of the target pixel point is specifically as follows: For any local pixel sequence, the overall horizontal coefficient and the discrete coefficient of the grayscale values ​​of all pixels in the local pixel sequence are fused to obtain the distribution characteristic factor of the local pixel sequence; Based on the distribution characteristic factor of the first local pixel point sequence and the distribution characteristic factor of the second local pixel point sequence and the degree of vertical diffusion uniformity, a cutting feature representation value of the target pixel point is determined.

4. A cutting piece scanning system for a fully automatic intelligent production line according to claim 3, It is characterized in that The background feature representation value of each pixel point in the cutting line area is obtained according to the gray value fluctuation characteristic distribution and gray value balanced distribution of each pixel point in the cutting line area belonging to the surface background area in the direction perpendicular to the cutting direction, specifically including: Taking the target pixel as the center and based on the pixels belonging to the surface background area in the direction perpendicular to the cutting direction of the target pixel, determine a third local pixel point sequence and a fourth local pixel point sequence; The distribution characteristic factors of the third local pixel point sequence and the fourth local pixel point sequence are obtained, and the background feature representation value of the target pixel point is determined based on the distribution characteristic factors of the third local pixel point sequence and the distribution characteristic factors of the fourth local pixel point sequence.

5. A cutting piece scanning system for a fully automatic intelligent production line according to claim 1, It is characterized in that The method of obtaining the illumination influence trend value of the cutting line area according to the correlation between the grayscale values ​​of all pixels in the cutting line area and the corresponding background feature representation values ​​and the grayscale difference distribution of pixels in the neighborhood of each pixel in the cutting line area in the cutting direction specifically includes: Calculate the similarity index based on the grayscale values ​​of all pixels in the cutting line area and the background feature representation values ​​of the same pixels; Take any pixel point as the selected pixel point, and obtain all the neighboring pixel points on each line segment parallel to the cutting direction in the neighborhood window of the selected pixel point to form each neighborhood pixel point sequence; According to the difference change of the gray value in the neighborhood pixel point sequence of the pixel point in the cutting line area, combined with the similarity index, the illumination influence trend value of the cutting line area is obtained.

6. A cutting piece scanning system for a fully automatic intelligent production line according to claim 5, It is characterized in that The method of obtaining the illumination influence trend value of the cutting line area according to the difference change of the grayscale value in the neighborhood pixel point sequence of the pixel point in the cutting line area and the similarity index specifically includes: For any neighborhood pixel sequence, based on the fluctuation degree of the grayscale value difference between adjacent pixels in the neighborhood pixel sequence, a grayscale variation factor of the neighborhood pixel sequence is determined; According to the mean value of the grayscale change factor of all neighboring pixel point sequences of all pixel points in the cutting area, combined with the similarity index, the illumination influence trend value of the cutting line area is obtained; The mean value is negatively correlated with the illumination influence trend value, and the similarity index is positively correlated with the illumination influence trend value.

7. A cutting piece scanning system for a fully automatic intelligent production line according to claim 1, It is characterized in that The step of determining the filtering weight of each pixel in the cutting area according to the difference between the cutting feature characterization value of each pixel in the cutting line area and the central pixel in the area and the difference between the background feature characterization value, combined with the difference between the illumination influence trend value and the gray value, specifically includes: Based on the grayscale value in the neighborhood window of each pixel point in the cutting line area and the grayscale value in the neighborhood window of the central pixel point in the cutting line area, the mean square error corresponding to each pixel point in the cutting line area is calculated; According to the difference of the cutting feature representation value between each pixel point and the central pixel point in the cutting line area, the difference of the background feature representation value between each pixel point and the central pixel point, and the illumination influence trend value, a feature difference factor of each pixel point in the cutting line area is obtained; According to the feature difference factor and the mean square error, a filter weight of each pixel in the cutting line area is obtained, wherein the feature difference factor is negatively correlated with the filter weight, and the mean square error is positively correlated with the filter weight.

8. A cutting piece scanning system for a fully automatic intelligent production line according to claim 7, It is characterized in that The method for obtaining the characteristic difference factor is specifically as follows: For any pixel point in the cutting line area, determining a first difference feature of the pixel point based on a difference in cutting feature representation values ​​between the pixel point and a central pixel point in the cutting line area; Determine a second difference feature of the pixel point based on a difference in background feature representation values ​​between the pixel point and the central pixel point; Determine a weight coefficient of the first difference feature and a weight coefficient of the second difference feature according to the illumination influence trend value of the cutting line area, wherein the illumination influence trend value is negatively correlated with the weight coefficient of the first difference feature, and the illumination influence trend value is positively correlated with the weight coefficient of the second difference feature; The first difference feature and the second difference feature are weightedly fused using the weight coefficient to obtain a feature difference factor of the pixel point.

9. A cutting piece scanning system for a fully automatic intelligent production line according to claim 1, It is characterized in that The step of obtaining the cutting recognition result of the infrared scanning grayscale image according to the processing result specifically includes: The edge detection is performed on the enhanced infrared scanning grayscale image to obtain the cutting route corresponding to the cutting piece.

10. A cutting piece scanning system for a fully automatic intelligent production line according to claim 1, It is characterized in that The step of performing region segmentation on the infrared scanning grayscale image to obtain the surface background region, the heat-affected region and the cutting line region specifically includes: A neural network is used to segment the background and target in the infrared scanning grayscale image to obtain the surface background area and the heat source area. The heat source area is subjected to threshold segmentation processing to obtain the heat affected area and the cutting area, and the minimum circumscribed rectangle of the cutting area is used as the cutting line area.