Laser melt injection method based on deep learning and intelligent detection device
By establishing a synchronous correspondence between image frames and scanning paths through deep learning methods, the problem of image and path decoupling in existing technologies is solved, and real-time abnormal state recognition and heat distribution adjustment during the laser melting process are realized, thereby improving the forming quality and stability.
Patent Information
- Application Number
- CN202510693996.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-10-17
Smart Images

Figure CN120808058A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of intelligent control, in particular to a laser melting and casting method and an intelligent detection device based on deep learning. BACKGROUND
[0002] The technical field of intelligent control includes the whole process control system for sensing, judging and adjusting the running state of various automatic equipment and systems. The core content of this technical field is to couple the data collected by sensors with mathematical models or rule sets to execute real-time control decisions and realize the stable operation of equipment, processes or systems under complex working conditions. Intelligent control technology can be divided into fuzzy control, adaptive control, neural network control, expert system control, deep learning control and other technical branches, and is widely used in industrial and engineering scenarios such as manufacturing, unmanned systems, traffic control and energy scheduling. The overall structure usually consists of an information collection mechanism, a data preprocessing method, a control strategy generation mechanism, a controller execution link and a feedback regulation loop, emphasizing the self-learning, self-adjusting and self-optimizing capabilities of the system.
[0003] Among them, the laser melting and casting method based on deep learning refers to using a convolutional neural network as a prediction model to train and model the geometric features of the molten pool formed during the laser melting and casting process and its evolution trend, and then infer the heat input distribution state according to real-time image feedback data, and adjust the scanning path, power density and feed speed parameters in linkage. This method mainly covers the selection of laser beam irradiation mode, the construction of feature extraction network structure, the generation and labeling mechanism of training sample data, the training process of control parameter back-deduction model, and the association strategy formulation between prediction output and processing instructions, which belongs to the closed-loop control application scenario of deep neural network in the metal material cladding forming process.
[0004] The existing intelligent control scheme has a frame decoupling problem in the association processing of images and paths. The boundaries or heat structures extracted from the images are mostly fragmentary static data, which cannot correspond to each behavior node in the advancing paragraph in real time, resulting in unstable abnormal state capture. The image features relied on by path control are often processed as whole frame or whole segment feature vectors, and the local changes of spatial structure are difficult to accurately express in the control chain, resulting in path misalignment or structure disconnection. The coupling relationship between boundary response and advancing behavior is not established in the control layer, and the heat input area is often generated based on fixed path strategy, with a lag response to scanning dynamic changes, especially in non-continuous trajectory paragraphs, the heat accumulation effect is obvious, and the boundary area is prone to energy threshold-induced organization cracking or profile collapse. There is a lack of linkage labeling mechanism between path direction, speed change and image offset trend, resulting in delay of adjustment instruction source, disorder of power regulation rhythm, easy to cause forming deviation or redundant power input, and affecting the overall stability and forming quality. SUMMARY
[0005] To solve the technical problems existing in the prior art, the embodiment of the present application provides a laser fusion injection method based on deep learning, comprising the following steps: In order to achieve the above-mentioned purpose, the present application adopts the following technical scheme: a laser fusion injection method based on deep learning, comprising the following steps: S1: based on the scanning path and the workpiece surface image sequence in the laser fusion forming process, extracting the boundary spot direction and the center texture position in the image frame, mapping the texture change and the path advancing direction in sequence, and obtaining an image texture migration path structure diagram; S2: based on the image texture migration corresponding path structure diagram, identifying the texture fracture zone and the light spot offset point, extracting the offset direction and the path angle trend, mapping the offset to the path paragraph in sequence, and obtaining a laser focal point path offset response area diagram; S3: based on the laser focal point path offset response area diagram, selecting the light spot profile, analyzing the boundary trend and the path direction, superimposing the light spot boundary and the trajectory layer, marking the overlapping profile, and obtaining a path coupling influence area layer structure; S4: based on the path coupling influence area layer structure, tracking the profile change of the layer, extracting the deflection node, matching the advancing direction and the boundary coincident segment, combining the profile deformation trend to mark the path, and obtaining a path coupling dynamic response diagram; S5: based on the path coupling dynamic response diagram, extracting the angle change point and the displacement direction of the focal point offset segment, identifying the offset segment and the thermal boundary coincident position, and obtaining a thermal displacement adjustment control instruction set.
[0006] As a further scheme of the present application, the image texture migration path structure diagram includes boundary spot direction distribution, center texture distribution position, path corresponding frame annotation information, frame sequence texture mapping structure, the laser focal point path offset response area diagram includes texture fracture area position, light spot offset direction data, path segment displacement number, image offset projection sequence, the path coupling influence area layer structure includes light spot irradiation profile boundary, path advancing trend, boundary intersection point coordinates, layer superposition distribution relationship, the path coupling dynamic response diagram includes layer boundary deflection node, path advancing intersection point, boundary response trend, deformation trajectory contrast index, and the thermal displacement adjustment control instruction set includes scanning angle change node, path displacement direction sequence, thermal zone boundary intersection trajectory, and offset control instruction code.
[0007] As a further scheme of the present application, the specific steps of S1 are: S101: acquiring the scanning path and the workpiece surface image sequence in the laser fusion forming process, extracting the profile direction of the boundary spot and the scanning trajectory position of the corresponding frame in the image frame, marking the direction change of the boundary spot and the path advancing segment in time sequence, and obtaining a boundary spot direction change sequence; S102: based on the boundary spot direction change sequence, extract the texture distribution position of the center region of the image, pair the texture distribution direction with the scanning track direction, screen the texture section and the path section with consistent direction in the image frame, and obtain the center texture path matching contrast information; S103: based on the center texture path matching contrast information, mark the texture direction and the path section in each frame, add the direction mark to the corresponding section of the scanning track, and obtain the image texture migration path structure diagram.
[0008] As a further scheme of the present application, the specific steps of S2 are: S201: based on the image texture migration path structure diagram, identify the texture continuity breakpoint in the image frame, extract the edge direction change of the breakpoint position in each frame, mark the change point and the corresponding path section according to the frame number, and obtain the texture fracture direction label sequence; S202: based on the texture fracture direction label sequence, extract the image center region spot coordinates, compare with the focal point position in the scanning track, analyze the included angle trend between the spot position offset direction and the path advancing direction, and obtain the spot offset direction comparison result; S203: based on the spot offset direction comparison result, correspond the offset direction and the path section number according to the image frame sequence, mark the offset trend at the corresponding position, map to the path control paragraph, and obtain the laser focal point path offset response area diagram.
[0009] As a further scheme of the present application, the specific steps of S3 are: S301: based on the laser focal point path offset response area diagram, select the spot irradiation boundary in the image frame in the offset area, extract the contour line direction information, mark the start and end point coordinates of the boundary line, and arrange the boundary direction change according to the frame sequence, and obtain the spot contour direction distribution result; S302: based on the spot contour direction distribution result, according to the scanning path advancing direction data, extract the included angle sequence between the contour and the path in the adjacent frames, calculate the continuous frame included angle change rate, and screen the path section number whose change rate exceeds the average change amplitude of the included angle, and obtain the included angle rate variation label group; S303: based on the included angle rate variation label group, extract the coincident area of the corresponding numbered contour section and path section, align the contour extension line and the track point in the layer, and mark the path and boundary intersection position, and obtain the path coupling influence area layer structure.
[0010] As a further scheme of the present application, the calculation formula of the continuous frame included angle change rate is specifically: ; Wherein, represents the first Path segment in frame The angle between the upper contour direction and the path advancement direction, Represents a path segment Previous The contour direction angle in unit pixels, Represents a path segment Previous The propulsion direction angle corresponding to the frame, Represents a path segment Previous The edge gradient weight value of the unit pixel, Represents a path segment The weighted average of the edge gradients of the unit pixels above, Represents a path segment Previous The sum of the edge lengths of the frame scan segments, Represents a path segment The number of unit pixels used to extract the contour direction.
[0011] As a further solution of the present invention, the specific steps of S4 are: S401: Based on the layer structure of the path coupling influence area, extract the coordinates of the contour line endpoints of the boundary contour in each frame according to the layer number sequence, analyze the coordinate jump points at the contour deflection in adjacent layers, mark the deflection point positions according to the layer sequence, and store them in an index table to obtain a boundary deflection point list; S402: Based on the boundary deflection point list, extract the intersection position of the path advancement direction and the corresponding deflection point in each layer, calculate the intersection density value between the path advancement direction line and the contour boundary connection line, and mark the change trend position of the intersection density in consecutive sections in numerical order to obtain the path intersection section density marking result; S403: Based on the density annotation results of the path interlaced sections, the path segments and boundary line segments in the numbered corresponding layers are sequentially matched, the deformation path trajectory and the hot zone contour are synchronously annotated, the structural position is mapped, and the associated area image is output to obtain the path coupling dynamic response diagram.
[0012] As a further solution of the present invention, the calculation formula of the intersection density value between the path advancement direction line and the contour boundary connection line is specifically: ; in, Representative The intersection density value between the layer path advancement direction line and the outline boundary connection line, Representative The length of the advancement track of the layer path segment, Represents the total number of intersections between the path and the boundary line, Representative The horizontal coordinate of the path advancement direction point, Representative The vertical coordinate of the path advancement direction point, Representative The horizontal coordinates of the intersection points of the boundary lines, Representative The vertical coordinates of the intersection points of the boundary lines, The direction of the path advancement is The tangent angle at the intersection point, Represents the direction angle of the boundary connection line, Represents a very small positive constant set to prevent the denominator from being zero.
[0013] As a further solution of the present invention, the specific steps of S5 are: S501: Based on the path coupling dynamic response diagram, extract the angle change nodes on the spot focus offset path segment, identify the position of the direction turning in the path, mark the advancement direction and turning trend of each path segment, and obtain the spot direction turning sequence; S502: Based on the light spot direction turning sequence and the scanning speed change segment data, the direction turning trend is matched with the speed change position, and the distribution of the turning points in the speed change segment in the path is analyzed to obtain the radial speed linkage trajectory segment; S503: Based on the radial velocity linkage trajectory segment, the intersection area of the turning path segment and the boundary of the thermal action zone is identified, the spot direction change and the boundary direction are marked in the layer, and converted into displacement adjustment content to obtain a thermal displacement adjustment control instruction set.
[0014] A deep learning-based intelligent detection device for laser melting, comprising a memory and a processor, characterized in that a computer program is stored in the memory, and when the processor executes the computer program, the deep learning-based intelligent detection method for laser melting according to any one of claims 1 to 9 is implemented.
[0015] Compared with the prior art, the advantages and positive effects of the present invention are: In the present invention, the spot direction and texture position in the image frame are mapped to the path advancement direction to establish a synchronous correspondence between image changes and scanning behaviors. The positioning of texture breaks and offset points enhances the accuracy of abnormal segment recognition. The overlap of contour boundaries and path layers forms the basis of spatial response. The matching of path directions and boundary deflection points strengthens the linkage between hot zone changes and displacements. The control instructions are generated by combining angle changes with thermal boundary positions, so that the adjustment action closely follows the structural offset and heat distribution changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.
[0017] Figure 1 The step flowchart of the present application. DETAILED DESCRIPTION
[0018] The technical solutions in the present application will be described below with reference to the drawings.
[0019] In the embodiments of the present application, the words such as "example", "for example" are used to represent as an example, illustration or description. Any embodiment or design scheme described as "example" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the word "example" is intended to present the concept in a specific manner. In addition, in the embodiments of the present application, the meaning expressed by "and / or" can be both, or can be one of the two.
[0020] In the embodiments of the present application, "image" and "picture" can be used interchangeably at times. It should be pointed out that when the distinction is not emphasized, the meanings expressed are consistent. "Of", "corresponding" and "relevant" can be used interchangeably at times. It should be pointed out that when the distinction is not emphasized, the meanings expressed are consistent.
[0021] In the embodiments of the present application, sometimes the subscript such as W1 can be written in the form of non-subscript such as W1. When the distinction is not emphasized, the meanings expressed are consistent.
[0022] In order to make the technical problems, technical solutions and advantages to be solved by the present application more clear, the following will be described in detail with reference to the drawings and specific embodiments.
[0023] Please refer to Figure 1 The embodiment of the present application provides a laser fuse injection method based on deep learning, comprising the following steps: S1: acquiring a scanning path and a workpiece surface image sequence in a laser fuse forming process, extracting a moving direction of a boundary spot and a distribution position of a center texture in a continuous image frame, performing position mapping on a texture change trend and a path advancing direction in sequence, labeling the texture direction in each frame to a corresponding section of the scanning track, and obtaining an image texture migration path structure diagram; S2: Based on the image texture migration path structure diagram, the texture fracture area in the image frame and the light spot deviation position in the image center area are identified, the texture deviation direction and the included angle with the scanning path are extracted, and the image deviation trend is projected into the path control sequence to obtain a laser focal point path deviation response area diagram; S3: Based on the laser focal point path deviation response area diagram, the light spot irradiation area profile in each deviation area is selected, the boundary line direction of the irradiation area is compared with the current path direction, the light spot profile extension boundary at the corresponding position is mapped with the scanning trajectory, the overlapping area profile boundary and the laser path intersection point are labeled, and a path coupling influence area layer structure is obtained. S4: Based on the path coupling influence area layer structure, the boundary profile morphological change trend is tracked in sequence according to the layer sorting, the deflection points of the boundaries in adjacent layers are positionally mapped, the laser path advancing direction in the staggered area is continuously matched with the layer boundary position, the deformation trajectory in the path advancing process is correspondingly labeled with the response mode of the heat area structure, and a path coupling dynamic response diagram is obtained. S5: Based on the path coupling dynamic response diagram, the scanning angle change nodes and the path displacement direction on the light spot focal point deviation path segment are extracted, the position segments where the scanning speed changes are combined, the deflection position in the path and the heat action area boundary are spatially overlapped, the light spot direction and the heat boundary deviation trajectory are sequentially arranged, and a heat displacement adjustment control instruction set is obtained.
[0024] The image texture migration path structure diagram includes boundary spot direction distribution, center texture distribution position, path corresponding frame labeling information, frame sequence texture mapping structure, the laser focal point path deviation response area diagram includes texture fracture area position, light spot deviation direction data, path segment displacement number, image deviation projection sequence, the path coupling influence area layer structure includes light spot irradiation profile boundary, path advancing direction, boundary intersection point coordinates, layer overlapping distribution relationship, the path coupling dynamic response diagram includes layer boundary deflection node, path advancing staggered point position, boundary response direction, deformation trajectory comparison index, and the heat displacement adjustment control instruction set includes scanning angle change node, path displacement direction sequence, heat area boundary intersection trajectory, and deviation control instruction code.
[0025] The specific steps of S1 are as follows: S101: Acquire the scanning path and workpiece surface image sequence in the laser melt injection forming process, extract the profile direction of the boundary spot in the image frame and the scanning trajectory position of the corresponding frame, mark the direction change of the boundary spot and the path advancing segment in time sequence, and obtain a boundary spot direction change sequence. First, set a boundary spot detection window with a fixed radius in each image frame, the window boundary range is set to the area from 10 pixels to 30 pixels offset inward from the image edge, detect the edge gray gradient direction distribution in the spot area, take the gradient angle corresponding to the main direction as the spot contour direction, the direction angle is marked as 0 to 180 degrees, when the boundary spot edge gradient direction fluctuates within any 90 to 120 degree range, define the frame boundary as southeast inclined, for example, the boundary direction angle corresponding to image frame number 17 is 112 degrees, then mark this frame as southeast inclined frame, then extract the scan trajectory paragraph corresponding to the image frame number, the trajectory segment is derived from the workpiece path CAD drawing, sorted by trajectory segment number per frame, the scan trajectory direction of each frame exists in the form of a vector, its direction is the angle of the line segment formed by adjacent points relative to the reference line, for example, the scan path segment advancing direction corresponding to image frame 17 is 108 degrees, this advancing direction is recorded as the corresponding scan segment angle of image frame 17, according to the boundary direction change amplitude between the front and rear consecutive image frames, judge the continuity of the direction in time sequence, when the boundary direction angle difference between two consecutive image frames exceeds 20 degrees, define it as a boundary direction mutation segment, pair the mutation segment frame number with the trajectory segment paragraph number to mark, form the direction change label chain in time sequence, at the same time, according to the time sequence, statistics the evolution trend of the boundary direction in the process of each path advancing, mark the direction angle extracted in each group of image frames to the corresponding trajectory segment, if the direction angles of image frames 17, 18, 19 are 112, 118, 123 degrees, the corresponding angles of the scan trajectory segment are 108, 109, 110 degrees, then write the direction angle sequence 112, 118, 123 into trajectory segment paragraph numbers A1, A2, A3, thus complete the direction change mapping operation between image and path advancing, get the boundary spot direction change sequence.
[0026] S102: Based on the boundary spot direction change sequence, extract the texture distribution position of the center region of the image, pair the texture distribution direction with the scan trajectory direction, screen the texture segment and path segment with consistent direction in the image frame, get the center texture path matching information. First, set the image frame size to 640x480 pixels, extract a rectangular texture window in the center region of each image frame with a width of 40%, the window range is 192 to 448 pixels in the x-axis and 144 to 336 pixels in the y-axis, after extracting the gray value matrix in the extraction area, based on each 8x8 pixel block, the local gradient direction is counted, the gradient direction interval is set to 0 to 180 degrees, the texture main direction is set with the maximum gradient direction as the center, if the main direction is concentrated between 45 to 75 degrees, it is marked as a diagonal direction texture frame, taking image frame number 9 as an example, the gray main direction in the center region of this frame is 63 degrees, so it is marked as a diagonal texture frame, then, the scanning path segment corresponding to the image frame number is extracted, the advancing direction of the path segment is determined by the direction of the trajectory segment, if the trajectory segment is consistent with the image frame number, the advancing direction of the path segment is the included angle between the line segment connecting the front and rear points and the horizontal reference direction, if the included angle is 60 degrees, the advancing direction of the frame path is recorded as 60 degrees; then, the texture direction extracted in the image frame is compared with the path advancing direction in terms of angle, and it is judged whether they are consistent, the included angle deviation threshold is set to ±10 degrees, when the included angle between the texture main direction and the path advancing direction is less than 10 degrees, it is determined that the frame is consistent in direction, the subsequent frames are processed and it is judged whether three or more frames continuously exist which meet the consistent determination condition, if three frames continuously exist which meet the direction consistency, for example, frames 9, 10 and 11 are 63 degrees, 65 degrees and 68 degrees respectively, and the path segment advancing directions are 60 degrees, 62 degrees and 66 degrees respectively, it is indicated that the frame segment direction has consistency, which is defined as an effective pairing paragraph; the effective pairing frame segment and the path segment number are corresponded one by one to generate a pairing list, and the frame number and the texture direction angle coding are added, the path segment is represented by paragraph number, and the texture direction angle is recorded as an integer angle, for example, frame 9 is marked as angle 63 degrees, and path segment number P5, then the output pairing record is frame 9-P5-63 degrees, the corresponding information is added to the pairing control table, all frame segments that meet the direction consistent judgment condition are executed with the same operation, after the pairing table is exported, the center texture path matching control information is obtained.
[0027] S103: Based on the center texture path matching control information, mark the texture direction in each frame and the path segment, add the direction mark to the corresponding section of the scanning trajectory, and obtain the image texture migration path structure diagram; Firstly, the center region of the image frame is normalized to gray scale, and the gray scale interval is set to 0 to 255. A center extraction window with a side length of 0.4 times the image width is selected in the center square region. The local gradient direction distribution is extracted in the window, and the main direction interval is determined. If the direction distribution fluctuates within ±15 degrees, it is marked as a stable texture frame. If the direction distribution exceeds the range, the frame is defined as a direction change frame. Then, the texture direction of the above marked frame is extracted. The extraction method is based on the statistical angle distribution sequence of the main gradient direction in the window. The direction offset angle between the previous and subsequent frames is determined every 5 frames. If the offset angle of three consecutive frames is greater than 20 degrees, it is defined that the texture segment direction changes. The direction change point is identified by the image frame number, and the corresponding frame path segment number is recorded. Then, the advancing direction value of the frame corresponding to the scanning track paragraph is called. The direction value is derived from the workpiece CAD path. The direction is the angle value between the vector line segment and the horizontal reference line. The matching path segment advancing direction in different image frames is determined by the angle between two angles. If the angle change value is less than 5 degrees continuously, it is determined that the advancing direction is consistent. The frame texture direction is marked in the advancing segment vector line segment. The angle coincidence between the texture direction and the path advancing direction is determined. When the angle between the texture direction and the path advancing direction is less than 15 degrees, it is defined as an effective texture marking frame segment. The texture direction coding value of the effective segment is written in the track segment identification bit in the form of integer angle. For example, if the image frame 123 corresponds to the texture direction of 36 degrees, the path advancing direction is 40 degrees, and the included angle is 4 degrees, which satisfies the condition of less than 15 degrees. Therefore, the texture direction coding 36 of the frame is marked in the path track segment 123 identification field. The continuous texture direction marking frame segment is numbered and written after being exported. Finally, the image texture migration path structure diagram is obtained.
[0028] The specific steps of S2 are: S201: Based on the image texture migration path structure diagram, the texture continuity breakpoint in the image frame is identified, the edge direction change of the breakpoint position in each frame is extracted, the change point and the corresponding path segment are marked according to the frame number, and the texture fracture direction label sequence is obtained. First, the texture direction label corresponding to each frame image and its path segment number are located in the path structure diagram, the image frame size is set to 640*480 pixels, a square window with a size of 256*256 pixels is extracted in the center area of each frame image, gradient direction information is collected in the area, each 8*8 pixels is a subunit, the gray change direction in each unit is extracted, the main gradient angle is obtained by statistics, and the angle value is recorded as the center texture direction angle of the frame. The same processing is performed on each frame to form a sequence of continuous frame direction angles, the angle change threshold is set to 20 degrees, when the direction angle change between any two adjacent frames exceeds the threshold, it is judged that the position is a texture continuity breakpoint, for example, the main direction angle of frame number 32 is 60 degrees, the main direction angle of frame number 33 is 92 degrees, the difference between them is 32 degrees, which exceeds the threshold of 20 degrees, so frame 33 is defined as a texture interruption frame, then the direction change of the edge region in the frame is judged, the edge region is set to the outer 20 pixel band of the image, the gradient direction angle is extracted according to the same 8*8 pixel subunit, and the angle deviation between the edge gradient direction and the direction of the previous frame is calculated, if the angle deviation is greater than 25 degrees, it is considered that the edge direction has changed suddenly, for example, the edge direction angle of frame 32 is 65 degrees, the edge direction angle of frame 33 is 100 degrees, the angle deviation is 35 degrees, which meets the judgment condition, frame 33 is marked as an edge direction change point again. The frame number and its corresponding path segment number are bound, the change angle value is encoded in integer form and attached after the number, and the frame number sequence is sorted, all image frame numbers, angle change values and path segment numbers that meet the conditions are sorted into a sequence, for example, frames 33, 34 and 36 meet the direction interruption condition, the angle change values are 32, 28 and 30 degrees, and the corresponding path segments are P17, P18 and P20, then the label sequence is: frame 33-P17-32 degrees, frame 34-P18-28 degrees, frame 36-P20-30 degrees, and finally the texture fracture direction label sequence is obtained.
[0029] S202: Based on the texture fracture direction label sequence, the image center region spot coordinates are extracted, compared with the focal point positions in the scanning track, the angle trend between the spot position offset direction and the path advancing direction is analyzed, and the spot offset direction comparison result is obtained; The light spot coordinate information of the center region of the image frame is extracted, the size of each image frame is 640*480 pixels, the center region is extracted with a window of 240*240 pixels, the circular highlight region is located as the light spot region through brightness contrast, the pixel gradient is extracted at the edge of the light spot, the center point coordinates of the edge pixel group are calculated and defined as the center of the light spot, and the light spot coordinates are recorded in the form of two-dimensional coordinates with the top left corner of the image as the origin, such as the center of the light spot of image frame No. 28 is (323, 246), then the focal point coordinate corresponding to the frame in the scanning track is called, the coordinate is obtained from the laser incident point set in the path segment, the track point coordinate format is consistent with the image frame, and it is assumed that the focal point coordinate corresponding to frame 28 is (310, 240). The displacement direction between the two points is the offset direction of the light spot relative to the focal point position, the included angle required for calculating the direction is taken as the reference of the x-axis, the offset direction angle θ1 of the light spot is formed, the angle is calculated through the inverse tangent function after the ratio of the y and x direction offset is calculated, for example, Δx=13 pixels, Δy=6 pixels, and the offset angle is 24.78 degrees. Then the advancing direction θ2 of the scanning path is extracted, the advancing direction is obtained through the included angle of the front and rear track point coordinates of the segment, such as the advancing direction of segment 28 is 27 degrees. After obtaining the angles of the two directions, the included angle difference value comparison is performed on θ1 and θ2, and the difference value 2.22 degrees is defined. The included angle difference value operation is performed on each frame in this way, and the frame number, light spot center coordinate, focal point position coordinate, θ1, θ2 and θ3 value of each frame are recorded. The consistency judgment threshold of the included angle is set to ±10 degrees, when θ3 is less than 10 degrees, it is determined that the directions are consistent, if the included angle difference values of image frame numbers 28, 29 and 30 are 2.22, 5.34 and 8.91 degrees respectively, which are all less than the threshold, then three consecutive frames meet the direction consistency condition, the corresponding frame number and the comparison data of the included angle direction are uniformly output, the data structure of number-θ1-θ2-θ3 is generated, and the comparison result of the offset direction of the light spot is obtained.
[0030] S203: Based on the comparison result of the offset direction of the light spot, the offset direction is corresponded to the path segment number according to the image frame sequence, the offset trend of the corresponding position is marked, and the path control paragraph is mapped to obtain a laser focal point path offset response region map; First, the image frame number, spot center coordinates, focal point coordinates, angle θ1 and path advancing direction θ2 are extracted from the comparison results, it is confirmed whether the angle deviation θ3 of each frame is within the preset range, the angle sequence is sorted by frame number, the angle trend marking interval is set as follows: the trend is stable when θ3 is between 0 and 10 degrees, the trend is deviated when θ3 is between 10 and 30 degrees, and the trend is severely deviated when θ3 is more than 30 degrees, if the angle sequence of image frame numbers 25 to 28 is 6.5, 8.3, 11.2 and 14.9 degrees, frames 25 and 26 are marked as stable, and frames 27 and 28 are marked as deviated, then the frame number is corresponded to the path segment number one by one, the control instruction position of the corresponding number in the path control paragraph is extracted, and the deviation trend mark is added at the position, the mark content is set as three types of T0, T1 and T2, wherein T0 represents stable advancing, T1 represents slight deviation, and T2 represents severe deviation, in the foregoing example, path segments 25 and 26 are additionally marked with T0, segments 27 and 28 are additionally marked with T1, the remaining frames are processed in the same manner, and a complete trend marking table corresponding to the frame and the path segment is formed, the trend marking result is then mapped to the path control segment, the control segment coordinate data corresponding to the path segment number in the path planning file is called, the trend marking field is inserted into the control data, the field exists in the form of mark code, and a label field is added at the tail of the control segment, for example, the original control content of path segment number P25 is (310, 240, 12.5), after adding the label, it is (310, 240, 12.5, T0), all matching segments are written in this way, the trend marking is covered and mapped to the path control paragraph, an instruction deviation trend chain between frame control and path execution is generated, the output file is arranged according to the path segment number, the label field column exists as an independent output column, finally, a three-tuple format of number-angle-label is formed, after the mapping table is output, the laser focal point path deviation response area graph is obtained.
[0031] The specific steps of S3 are: S301: Based on the laser focal point path deviation response area graph, the spot irradiation boundary in the image frame in the deviation area is selected, the profile direction information is extracted, the start and end point coordinates of the boundary line are marked, and the boundary direction change is arranged according to the frame sequence, so that the spot profile direction distribution result is obtained. First, the image frame numbers of the offset markers T1 and T2 are selected, and the light spot irradiation boundary region in the corresponding image frame is sequentially extracted. The size of each image frame is set to 640x480 pixels, the gray contrast extraction is performed in the circular region with a radius of 40 pixels in the center region of the image, the irradiation edge of the light spot is located, the light spot edge is defined as the set of pixel points with a gray value gradient change greater than a set threshold, the threshold is the average gray value of the entire image plus 20, for example, if the gray value of image frame 45 is 128, the edge pixel point set with a gray gradient greater than 148 is extracted, the main closed contour is reserved by 8 connectivity screening, a closed boundary point sequence is formed, then the contour boundary pixel points are extracted according to the pixel index, the leftmost boundary point is defined as the starting point, and the rightmost boundary point is defined as the ending point, the starting and ending points are recorded in the form of image coordinates, such as the starting point (287, 243) and the ending point (359, 245), after recording the starting and ending point positions of the frame, the direction angle of the entire boundary contour is extracted, the contour is segmented into line segments according to every 10 pixels, the direction angles between adjacent line segments are sequentially taken, the direction angle is the included angle value between the line segment connecting the two points at the beginning and end of the segment and the horizontal axis of the image, the direction change judgment threshold is set to 10 degrees, if the angle of a segment differs from the previous segment by more than the value, the direction change point is recorded, such as the direction of contour segment 1 in frame 45 is 15 degrees, segment 2 is 28 degrees, the difference is 13 degrees, which is recorded as a boundary change point, and the point is marked in the frame, the direction difference judgment and recording of all segments are continuously performed, the boundary change direction of all frames is recorded according to the frame sequence number after the extraction of the direction change points of the current frame, the numbering sequence corresponds to the image frame index, each frame record contains the boundary contour direction angle sequence, the direction jump point position and the starting and ending boundary coordinates, finally, the contour direction features of all frames are sorted according to the image frame index, and the light spot contour direction distribution result is obtained.
[0032] S302: Based on the light spot contour direction distribution result, the angle sequence between the contour and the path in adjacent frames is extracted according to the scanning path advancing direction data, the continuous frame angle change rate is calculated, and the path segment number with a change rate exceeding the average change amplitude of the angle is screened, to obtain an angle rate variation marker group; The calculation formula of the continuous frame angle change rate is as follows: ; Wherein, represents the angle value between the contour direction and the path advancing direction on the path segment in the th frame, represents the contour direction angle of the th unit pixel on the path segment , represents the advancing direction angle corresponding to the th frame on the path segment , represents the advancing direction angle of the first unit pixel on the path segment Previous The edge gradient weight value of the unit pixel, Represents a path segment The weighted average of the edge gradients of all unit pixels on Represents a path segment Previous The sum of the edge lengths of the frame scan segments, Represents a path segment The number of unit pixels used to extract the contour direction; Assumptions: =45, 50, 55, 60, 65 degrees, =55 degrees, =0.8, 0.9, 1.0, 0.95, 0.85, = , =100 pixels, =5; Calculation process: ; ; ; Calculate the denominator: ; ; ; Calculate the final result: ; The results show that in the path segment Previous In the frame, the angle between the contour direction and the path advancement direction is approximately 9589.67 degrees. This value is used to subsequently calculate the angle change rate and filter the path segment numbers whose change rate exceeds the average angle change amplitude to obtain the angle rate change marker group.
[0033] S303: Based on the angular rate change mark group, the overlap area of the corresponding numbered contour segment and the path segment is extracted, the contour extension line and the trajectory point are aligned in the layer, and the intersection position of the path and the boundary is marked to obtain the path coupling influence area layer structure; Firstly, the position segment number of the angle mutation rate greater than the set threshold in the pre-image frame is called, the corresponding extracted spot profile boundary point sequence in the image frame is extracted, and the scanning path paragraph data matched therewith is read. The scanning path is composed of trajectory points, which are defined as a set of two-dimensional coordinate points arranged in sequence, for example, frame number 52 corresponds to path segment number P35, P35 includes trajectory points (312, 240), (315, 244), (318, 248), etc. The profile boundary points in the image frame are arranged in the order of edge closure, such as profile boundary points (310, 238), (314, 243), (319, 249), etc. The profile points and the trajectory points are respectively established in one-to-one correspondence structure with the index as the reference, and the matching order is matched in the distance minimum priority mode, that is, the Euclidean distance between each profile point and all trajectory points is calculated in sequence, and if the distance between a certain profile point and a certain trajectory point is less than a preset distance threshold of 20 pixels, it is considered as an effective matching point, for example, the distance between points (314, 243) and trajectory points (315, 244) is about 1.41 pixels, which meets the threshold condition, and the matching is written into the matching table. After all the effective matching is completed, the direction of the connecting line formed between the boundary points and the trajectory points is selected, and the included angle between the direction angle and the trajectory advancing direction is calculated. The included angle range is set within 15 degrees to be considered as a direction matching segment, and the exceeding is considered as a boundary deflection segment. The path segment number is labeled according to this standard, the coordinates of the end point of the connecting line where the trajectory point and the boundary point coincide are extracted as the intersection position, for example, the trajectory point (318, 248) and the profile point (319, 249) are coincident segments, and the intersection position is (318.5, 248.5), and the path segment number P35 to which the point belongs is recorded. The matching boundary points are sequentially executed to generate a multi-field structure table with the path segment number as the index, the matching boundary points as the sub-items, and the intersection coordinates as the values. The table is mapped to the overall layer trajectory, the layer structure information set is output, and the path coupling influence area layer structure is obtained.
[0034] The specific steps of S4 are: S401: Based on the path coupling influence area layer structure, the profile line end point coordinates of the boundary profile in each frame are extracted in the order of layer number, the coordinate jump point positions of the profile deflection in the adjacent layers are analyzed, the deflection point positions are labeled in the order of layers, and are stored in an index table to obtain a boundary deflection point list; Extract the boundary contour information of the corresponding image frames under all layers in sequence according to the layer number, locate the starting point and the end point of the boundary contour line in each frame of the image by pixel indexing, and record the image coordinate values of the starting and ending points. In each frame of the image, the first point of the contour pixel sequence is used as the starting point and the last point is used as the end point. The coordinates are recorded, such as the starting point of frame number 31 is (265, 231) and the end point is (336, 234). After completing the endpoint extraction of all frames, arrange them frame by frame in the order of layer numbers to construct a contour endpoint coordinate sequence, and then call the contour endpoint coordinates of the corresponding frame in the adjacent layer number. The horizontal and vertical offset values between the start and end point coordinates of each two adjacent frames are used as jump detection parameters. The jump judgment threshold is set to 15 pixels. If the coordinate offset of an endpoint between adjacent layer frame numbers n and n+1 is in the horizontal direction, the vertical offset value is used as the jump detection parameter. Or if it exceeds the threshold in either direction, it is marked as a jump point. For example, the starting coordinate of frame 32 is (268, 230), and the horizontal offset from the starting coordinate of the previous frame (265, 231) is 3 pixels and the vertical offset is 1 pixel, which is within the limit, so no jump is recorded. If the starting point of frame 33 is (285, 214), the horizontal offset is 17 pixels and the vertical offset is 16 pixels, then it is determined to be a coordinate jump point, and the frame number and jump position mark are recorded. It is also marked as the deflection starting point in the contour structure. The four fields of frame number, contour line number, jump point type and position coordinates are recorded to form a record entry. All detected deflection points are arranged in ascending order according to the layer number to generate a complete jump point mark index table. Each record corresponds to the frame number in the layer structure. Finally, all jump point positions and their coordinate indexes are summarized to obtain a list of boundary deflection points.
[0035] S402: Based on the list of boundary deflection points, the intersection positions of the path advancement direction and the corresponding deflection points in each layer are extracted, the intersection density value between the path advancement direction line and the contour boundary connection line is calculated, and the changing trend positions of the intersection density in consecutive sections are marked in numerical order to obtain the path intersection section density marking results; The calculation formula of the cross density value between the path advancement direction line and the contour boundary connection line is as follows: ; in, Representative The intersection density value between the layer path advancement direction line and the outline boundary connection line, Representative The length of the advancement track of the layer path segment, Represents the total number of intersections between the path and the boundary line, Representative The horizontal coordinate of the path advancement direction point, Representative The vertical coordinate of the path advancement direction point, Representative The horizontal coordinates of the intersection points of the boundary lines, Representative The vertical coordinates of the intersection points of the boundary lines, The direction of the path advancement is The tangent angle at the intersection point, Represents the direction angle of the boundary connection line, Represents a very small positive constant set to prevent the denominator from being zero; Assumptions: In layer number 4, the scan path points are listed as ; Calculate the path segment length: mm; In this example, set , the intersection parameters are as follows: The coordinates of the first path point are ; The coordinates of the boundary points are ; The direction angles are 、 ; The coordinates of the boundary points are ; The direction angles are 、 ; The coordinates of the third path point are ; The coordinates of the boundary points are ; The direction angles are 、 ; Set stable value item degrees, to avoid the denominator of the angle difference being zero; Calculate the sub-items for each point separately: Item 1: ; Item 2: ; Item 3: ; The sum is: ; Substitute the formula to calculate the cross density value: ; The result shows that the intersection density value between the layer path advancing direction line numbered 4 and the contour boundary connection line is 0.0722, which is used to reflect the numerical expression of the path advancing and boundary line segment intersection intensity. Subsequently, the position of the change trend can be labeled in the continuous paragraph in the order of numbering, and finally the path intersection paragraph density labeling result is obtained.
[0036] S403: Based on the path intersection paragraph density labeling result, sequentially match the path segment in the numbered corresponding layer and the boundary line segment, synchronize the deformed path trajectory and the hot area contour, map the structure position, and output the associated area image to obtain the path coupling dynamic response graph; First, call the numbered layer labeled in the preface and its corresponding path number, extract the path segment information in each layer one by one, obtain the position information and extension direction of the path segment in the layer structure, and extract the endpoint coordinates and connection direction of each boundary line segment in combination with the boundary line segment number. The path segment and the boundary segment with the same number are paired one by one, and then the sequential matching operation is performed on each group of path segments and boundary line segments. In the matching process, the direction consistency comparison is performed according to the coordinate point arrangement direction. When the path advancing direction and the boundary direction have the same direction relationship or the angle change rate continuously does not exceed the micro-variation interval of two consecutive images, it is determined that the path segment and the boundary segment have a matching relationship. Then, the coordinates of each break point on the path line in the path segment with a matching relationship are extracted and projected with the outer contour line in the boundary line segment. Whether the path line segment exists in the same track with the boundary segment in the advancing direction is recorded. When there are three or more continuous node overlapping areas, it is determined that it is a synchronous segment, the overlapping position node number in the path segment is marked, and the deformed path trajectory is labeled. Subsequently, all the trajectory nodes corresponding to the synchronous segment in the path advancing segment are labeled one by one according to the number and the corresponding layer hot area contour. In this labeling process, the offset vector coordinate values between the hot contour and the deformed trajectory in each frame path segment are recorded, and the synchronous segment path number in the previous frame and the next frame is aligned during the labeling process. The position change in the layer order is corrected. Then, all the labeled layer regions are jointly mapped to draw the image region of the structure association between the path advancing form and the hot action region in the overall layer. Finally, the graphical image containing the complete labeled path, boundary projection and numbered mapping coordinate record is output, and the path coupling dynamic response graph is obtained.
[0037] The specific steps of S5 are: S501: Based on the path coupling dynamic response graph, extract the angle change node on the path segment of the focal point offset, identify the position of the direction turning in the path, label the advancing direction and turning trend of each path segment, and obtain the spot direction turning sequence. The coordinate sequence of consecutive points in the path segment is obtained and the linear connection direction between adjacent points is calculated. The forward direction vector of each path segment is extracted and numbered. Then, the angle between the end of the current path segment and the starting point of the next segment is obtained. It is determined whether the change in the direction vector exceeds the angle turning reference value of 45°. If it does, the angle position is set as the direction change node, and the node position and the corresponding path segment number are stored in the direction turning mark sequence. The change trend direction of the path advancement direction is then annotated under the same number, such as clockwise or counterclockwise, and a trend type label is set to assist in subsequent data structure tracking. During the entire recognition process, the coordinate displacement vector group of each change point is called and the angle analysis operation is performed with the direction baseline formed by the previous segment. The trajectory continuity check mechanism is combined to filter out sudden changes to prevent contour breakpoints from falsely triggering direction change judgments. The node position and number index are marked in the image annotation interface using color blocks. Finally, the combined data of each turning point and the adjacent path advancement direction are arranged in sequence, and the core data unit for spot angle behavior analysis is output to obtain the spot direction turning sequence.
[0038] S502: Based on the light spot direction turning sequence and the scanning speed change segment data, the direction turning trend is matched with the speed change position, and the distribution of the turning points in the speed change segment in the path is analyzed to obtain the radial speed linkage trajectory segment; Extract the frame number and path coordinate index of each direction turning node, match the information with the pre-recorded scanning speed change segment data, extract the start and end path point positions of the speed change segment and their corresponding frame sequence, establish a one-to-one correspondence between the path segment and the speed change segment, analyze whether the direction change node falls within the speed change segment range, if so, record the node number and path segment number and include them in the speed linkage segment list. In the specific operation, take the path segment numbers 32 to 46 in the actual forming task as an example, if the direction change node number corresponding to the frame number is N 41, N44, which coincide with the start and end frame numbers of the speed change segment, the direction change points numbered 41 and 44 are marked as the points where the speed coupling behavior occurs. The direction change trend vectors and speed changes in path segments 32 to 46 are merged and analyzed. Each set of paired data is judged to check whether the speed change gradient direction is consistent with the path turning direction. If they are consistent, the steering and speed coupling labels are set to positive, otherwise they are set to reverse. At the same time, the trajectory sequence of the coupling nodes is output in time sequence to assist in the subsequent execution of the trajectory segment thermal control processing, and finally the radial velocity linkage trajectory segment is obtained.
[0039] S503: Based on the radial velocity linkage trajectory segment, the intersection area of the turning path segment and the boundary of the thermal action zone is identified, the change in the light spot direction and the boundary direction are marked in the layer, and converted into displacement adjustment content to obtain a thermal displacement adjustment control instruction set; The trajectory is traversed and path numbers and corresponding boundary line segment numbers are extracted from the trajectory, the relative positional relationship between each path segment and the heat-affected zone boundary is detected, the spatial intersection state is determined by comparing the trajectory point coordinates and the boundary point set, the intersection point position is extracted from the layer in the form of coordinates, the turning frame position of the light spot focal point path is identified, the relative deflection angle range is calculated by combining the angle relationship between the path segment direction vector and the boundary line segment trend vector, the direction change vector at each intersection point is recorded frame by frame according to the frame number, and the boundary trend vector is divided into three types of deflection modes, namely, positive approach, reverse departure and staggered offset, wherein the positive approach indicates that the direction change and the boundary trend are consistent, the reverse departure indicates that the direction change deviates from the heat-affected zone, and the staggered offset indicates that there is angle oscillation. Taking the path segment with the number 27 as an example, the path direction vector of this path segment is 45 degrees right and upward, and the corresponding boundary line direction is upward, and the angle between the two is 45 degrees, which is judged as positive approach, and the point is marked as a path heat-affected linkage control point. Each type of control point generates a corresponding displacement adjustment mode, wherein the positive point generates a weighted close adjustment instruction, the reverse point generates a far away correction command, and the staggered point generates a jitter suppression adjustment strategy. Finally, all adjustment points and their corresponding control types and displacement direction information are integrated to obtain a heat displacement adjustment control instruction set.
[0040] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A laser melting method based on deep learning, characterized in that: The following steps are involved: S1: Based on the scanning path and workpiece surface image sequence during the laser injection molding process, the boundary spot direction and the center texture position in the image frame are extracted, and the texture change and the path advancement direction are mapped in frame order to obtain the image texture migration path structure diagram; S2: Based on the image texture migration corresponding path structure diagram, identify the texture break area and the spot offset point, extract the offset direction and the path angle trend, map the offset to the path segment according to the image sequence, and obtain the laser focus path offset response area diagram; S3: Based on the laser focus path offset response area map, select the spot contour, analyze the boundary direction and path direction, overlap the spot boundary and trajectory layer, mark the overlapping contours, and obtain the path coupling influence area layer structure; S4: Based on the layer structure of the path coupling influence area, track the layer contour changes, extract the deflection nodes, match the advancement direction with the boundary coincidence segment, mark the path based on the contour deformation trend, and obtain the path coupling dynamic response diagram; S5: Based on the path coupling dynamic response diagram, extract the angle change point and displacement direction of the focus offset segment, identify the overlap position of the offset segment and the thermal boundary, and obtain a thermal displacement adjustment control instruction set.
2. A deep learning-based laser melting intelligent detection device, comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and when the processor executes the computer program, the deep learning-based laser melting intelligent detection method according to claim 1 is implemented.