A 3D printing workpiece defect identification system based on image detection
By constructing an image detection-based 3D printed workpiece defect recognition system, and utilizing virtual flow field analysis and a two-way feedback mechanism, the real-time and accuracy issues of microscopic defect recognition in 3D printing were solved, achieving millisecond-level response and real-time closed-loop control of defects.
Patent Information
- Application Number
- CN202511984580.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-05-29
AI Technical Summary
Existing 3D printing technologies suffer from problems such as large computational delays, high false alarm rates, and a lack of closed-loop repair mechanisms in the identification and processing of micro-defects. In particular, they are difficult to distinguish between background noise and structural defects when dealing with high-viscosity materials or complex surfaces.
A 3D printed workpiece defect recognition system based on image detection is constructed by employing a coaxial acquisition unit, a gradient potential energy mapping unit, a virtual viscosity diffusion analysis unit, a topological singularity extraction unit, and a field-control bidirectional feedback control center. By reconstructing image data into a virtual flow field, real-time defect recognition and closed-loop control are achieved using virtual viscosity diffusion and topological singularity analysis.
It achieves millisecond-level real-time response, significantly improving the accuracy of defect identification and the robustness of the system. It can keenly detect latent defects and block defect accumulation through a two-way feedback mechanism, reducing computational latency and false alarm rate.
Smart Images

Figure CN122115314A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of online monitoring and closed-loop control technology in additive manufacturing, specifically to a 3D printed workpiece defect identification system based on image detection. Background Technology
[0002] With the widespread application of additive manufacturing technology, the geometric complexity and precision requirements of 3D printed workpieces have significantly increased. This trend poses a severe challenge to real-time quality monitoring during the printing process, especially in the rapid identification and handling of microscopic defects. Currently, the industry generally adopts visual inspection solutions based on texture feature matching, image threshold segmentation, or deep learning classification, which acquire images through high-resolution cameras and perform backend analysis. However, traditional visual inspection methods heavily rely on high-performance hardware and massive sample training, resulting in significant computational latency and making it difficult to achieve millisecond-level real-time response. At the same time, when dealing with high-viscosity materials or complex surfaces, existing algorithms often struggle to effectively distinguish between the inherent rough texture noise of the material and the actual microstructural anomalies, easily leading to missed detections or false alarms, and lacking an effective closed-loop repair mechanism to prevent defect accumulation. Therefore, how to accurately distinguish between background noise and structural defects while reducing reliance on computing power, and how to achieve real-time adaptive closed-loop control, has become an urgent problem to be solved in this field. Summary of the Invention
[0003] To address the aforementioned technical problems, this invention provides a 3D printed workpiece defect recognition system based on image detection. Specifically, the technical solution of this invention includes: The coaxial acquisition unit is configured at the coaxial position of the print head as the sensing entry point of the system. It is used to continuously capture the surface optical image of the current printing layer during the printing process and convert the surface optical image into the original grayscale image stream for output. The gradient potential energy mapping unit is configured to receive the original grayscale image stream, calculate the grayscale gradient of the image pixels using a preset differential operator, and map the grayscale gradient into a virtual flow velocity vector in two-dimensional space, thereby generating an initial vector field matrix. The virtual viscosity diffusion analysis unit, as the core operator for simulating physical diffusion, is configured to receive the initial vector field matrix and, based on the virtual viscosity coefficient that characterizes the smoothing ability of the algorithm, perform anisotropic diffusion iterative operations on the initial vector field matrix within a virtual time step to filter high-frequency noise and generate an evolution vector field that highlights structural anomalies. The topological singularity extraction unit is configured to receive the initial vector field matrix and the evolved vector field, and extract the topological abrupt change region by calculating the difference between the two vector fields before and after diffusion, thereby generating a defect potential energy heat map containing defect pixel coordinates and potential energy values. The field-control bidirectional feedback control center, as the decision-making core of the system, is configured to receive the defect potential energy heat map and construct a bidirectional feedback mechanism between the detection data and the printing execution: on the one hand, it executes positive feedback based on the potential energy value to generate G-code intervention instructions for the next layer slice; on the other hand, it executes reverse feedback based on the printing results of the next layer to adjust the virtual viscosity coefficient in the virtual viscosity diffusion analysis unit.
[0004] Preferably, the specific logic for the gradient potential energy mapping unit to generate the initial vector field matrix is as follows: The Sobel operator is used to calculate the gray-level gradient of each pixel in the image. Based on the mapping logic that the gray-level gradient represents the virtual flow velocity, the continuous printed texture with uniform gray-level changes is mathematically equivalent to laminar flow in a fluid field, and the defective areas with drastic gray-level jumps or texture disorder are mathematically equivalent to vortices or divergent sources in a fluid field, thereby constructing the initial vector field matrix.
[0005] Preferably, the setting logic for the virtual viscosity coefficient in the virtual viscosity diffusion analysis unit is as follows: The virtual viscosity coefficient is initially set based on the physical melt index of the printing material. When the flowability of the printing material is poor, the virtual viscosity coefficient is set to a higher value to simulate a stronger damping effect and suppress minor texture noise in non-defect areas.
[0006] Preferably, the processing logic for the virtual viscosity diffusion analysis unit to perform anisotropic diffusion iterative calculations is as follows: By utilizing the spatial continuity of normal printed textures, the energy distribution changes during the diffusion process remain stable; by utilizing the abrupt topological changes in defective regions, they are made mathematically singularities that generate energy gradient lags under diffusion operations, thereby preserving anomalous features in the evolution vector field.
[0007] Preferably, the process of generating a defect potential energy heatmap by the topological singularity extraction unit includes calculating the divergence components: The divergence of the vector field is calculated to characterize the source and sink properties of the material. When the calculated divergence value is negative and the absolute value exceeds the preset standard, it is determined that there is a material missing or unfused defect at that location, and the corresponding potential energy value is written into the defect potential energy thermogram.
[0008] Preferably, the process of generating a defect potential energy heatmap by the topological singularity extraction unit includes calculating the curl component: The curl of the vector field is calculated to characterize the rotational properties of the field. When the calculated curl value is abnormal, it is determined that there is a surface warping or turbulent accumulation defect at that location, and the corresponding potential energy value is written into the defect potential energy thermogram.
[0009] Preferably, the specific process by which the field-control bidirectional feedback control center performs positive feedback is as follows: The area in the defect potential energy thermal map where the potential energy value exceeds the dynamic safety threshold is marked as the defect area. Using the built-in coordinate transformation module, the pixel coordinates of the defect area in the image are mapped to the physical platform coordinates of the 3D printer according to the installation position of the coaxial acquisition unit and the field of view parameters. Based on the physical platform coordinates, dynamic intervention is performed when generating the G-code for the next layer slice. Depending on the strength of the potential energy value, the filling density or extrusion amount is increased proportionally in the corresponding physical platform coordinate region to fill the potential gaps detected in the previous layer.
[0010] Preferably, the specific process of the reverse feedback executed by the field-control bidirectional feedback control center is as follows: After the next layer is printed, continuously track whether the potential energy value of the original defect area returns to the normal range; If defective features are still found after compensation, an error signal is generated and sent to the virtual viscosity diffusion analysis unit to automatically fine-tune the virtual viscosity coefficient so that the system adapts to the actual reflectivity and flow characteristics of the current batch of materials.
[0011] Compared with the prior art, the present invention has the following beneficial effects: 1. To address the issue that traditional visual inspection relies heavily on high-performance hardware and suffers from significant computational latency, this system does not employ conventional texture feature matching or deep learning classification techniques. Instead, it utilizes gradient potential energy mapping units to reconstruct discrete image data streams into dynamic, continuous energy fields. This approach reduces the complexity of pattern recognition tasks to local differential operators and physical field simulation operations, enabling the system to run without massive sample training and achieving millisecond-level real-time response. This effectively solves the real-time monitoring challenge in high-speed printing. 2. To address the pain point of false alarms caused by high-viscosity materials or rough surfaces in the background technology, this system utilizes a virtual viscosity diffusion analysis unit to perform anisotropic diffusion iterative calculations. By mapping the physical flowability of the material to the virtual viscosity coefficient in the algorithm, the system simulates the strong damping effect of fluids to suppress minute texture noise in non-defect areas. At the same time, it utilizes the energy gradient hysteresis effect generated by defect areas as topological singularities to preserve abnormal features. This mechanism significantly improves the signal-to-noise ratio without losing edge details, ensuring the accuracy of the detection results. 3. This system is not limited to detecting defects, but can also analyze the physical properties of defects by calculating the divergence and curl components of the vector field; it uses divergence features to identify dent defects caused by material missingness or lack of fusion, and uses curl features to identify distortion defects caused by surface warping or turbulent accumulation; this classification mechanism based on physical field features can keenly perceive the stress concentration characteristics inside the material, thereby capturing hidden defect risks that are difficult to detect by traditional threshold segmentation algorithms. 4. To address the problem of defect accumulation caused by the lack of an effective closed-loop repair mechanism in the background technology, this system designs a positive and negative bidirectional feedback path: on the one hand, based on the potential energy thermogram, the filling density or extrusion amount is dynamically adjusted in the next layer printing to physically fill the defects in the previous layer and prevent defect accumulation; on the other hand, based on the re-inspection results after repair, the virtual viscosity coefficient is automatically fine-tuned, enabling the algorithm to dynamically adapt to the actual reflectivity and flow characteristics of different batches of materials; this mechanism gives the system robustness and self-evolution capability in long-term operation. Attached Figure Description
[0012] The present invention will be further explained below with reference to the accompanying drawings and embodiments: Figure 1 This is a structural diagram of the system of the present invention. Detailed Implementation
[0013] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.
[0014] Example 1: Please see Figure 1 A 3D printed workpiece defect recognition system based on image detection includes: The coaxial acquisition unit is configured at the coaxial position of the print head as the sensing entry point of the system. It is used to continuously capture the surface optical image of the current printing layer during the printing process and convert the surface optical image into the original grayscale image stream for output. The gradient potential energy mapping unit is configured to receive the original grayscale image stream, calculate the grayscale gradient of the image pixels using a preset differential operator, and map the grayscale gradient into a virtual flow velocity vector in two-dimensional space, thereby generating an initial vector field matrix. The virtual viscosity diffusion analysis unit, as the core operator for simulating physical diffusion, is configured to receive the initial vector field matrix and, based on the virtual viscosity coefficient that characterizes the smoothing ability of the algorithm, perform anisotropic diffusion iterative operations on the initial vector field matrix within a virtual time step to filter high-frequency noise and generate an evolution vector field that highlights structural anomalies. The topological singularity extraction unit is configured to receive the initial vector field matrix and the evolved vector field, and extract the topological abrupt region by calculating the difference between the two vector fields before and after diffusion, thereby generating a defect potential energy heat map containing defect pixel coordinates and potential energy values. The field-control bidirectional feedback control center, as the decision-making core of the system, is configured to receive the defect potential energy heat map and construct a bidirectional feedback mechanism between the detection data and the printing execution: on the one hand, it executes positive feedback based on the potential energy value to generate G-code intervention instructions for the next layer slice; on the other hand, it executes reverse feedback based on the printing results of the next layer to adjust the virtual viscosity coefficient in the virtual viscosity diffusion analysis unit.
[0015] In this embodiment, a 3D printed workpiece defect recognition system based on image detection is constructed. Instead of using conventional texture feature matching or deep learning classification techniques, this system establishes an innovative cross-physical domain mapping mechanism, which uses field theory to reconstruct the discrete image data stream in the printing process into a dynamic continuous energy field, thereby achieving real-time capture of micro-defects without the need for a large number of sample training. The coaxial acquisition unit is precisely integrated into the coaxial optical path of the 3D printer's extruder head; its technical configuration is designed to eliminate parallax interference and ensure that the visual acquisition field of view and the printing focus remain relatively stationary during high-speed movement; during the execution of the printing job, the unit continuously scans the current fused deposition layer at a high frame rate, and its output signal is instantly converted into a raw grayscale image stream via a high-speed bus as the basic data input for subsequent differential calculations; After acquisition, the data stream enters the gradient potential energy mapping unit. This unit receives the original grayscale image stream and, through the embedded high-speed differential calculation module, analyzes the subtle rate of change of brightness pixel by pixel, and constructs an initial vector field matrix that characterizes the trend of light and shadow flow. This processing step provides the necessary mathematical environment for the subsequent introduction of physical diffusion equations, transforming the image processing problem into a fluid dynamics problem. The virtual viscosity diffusion analysis unit is configured to run a numerical calculation model simulating fluid diffusion in a medium. This unit receives an initial vector field matrix and performs calculations based on a specific physical parameter control strategy. In this configuration, the virtual viscosity diffusion analysis unit operates based on anisotropic diffusion partial differential equations, where the virtual viscosity coefficient is defined as the baseline value of the conduction function in the equations. This coefficient is mathematically and physically analogous to the kinematic viscosity of a fluid: a higher coefficient indicates a stronger ability to smooth gradient oscillations, thus quantifying the algorithm's ability to smooth image textures and its suppression of random noise. Within the virtual time step period set by the system, this unit performs multiple anisotropic diffusion iterations on the vector field. The iteration termination condition is set as follows: when the energy difference of the vector field between two adjacent iterations is less than a preset convergence threshold. Or reach the maximum number of iterations The calculation stops when the time is right; this iterative process uses the principle of anisotropy to specifically smooth out the regular fluctuations caused by the texture of the printed layer, while retaining and sharpening those abnormal areas with structural abrupt changes, and finally outputting the filtered evolution vector field. The anisotropic diffusion iterative operation follows a vector variant of the discretized Perona-Malik nonlinear diffusion equation, the first... The formula for calculating the next iteration is: ; Where t is the current iteration step; To control the local diffusion conduction coefficient function of local smoothness intensity, take In the formula, Gradient magnitude representing the current pixel position ,Right now K is the gradient threshold constant; the equation exhibits Gaussian smoothness in regions with gentle gradient changes, while the diffusion coefficient approaches 0 in regions with abrupt gradient changes, thus smoothing noise while preserving and sharpening the topological features of defects. The diffused data is transmitted to the topological singularity extraction unit. This unit uses a differential analysis algorithm to compare the spatial residuals of the initial vector field matrix and the evolved vector field. From the perspective of physical field theory, a normal flow field should have a smooth transition, while defective regions are characterized by topological nodes where energy cannot be dissipated or hysteresis occurs. This unit identifies these nodes, defines them as regions of abrupt topological changes, and generates a visualized defect potential energy heatmap. This heatmap not only marks the precise pixel coordinates of the defects but also quantifies the severity of the defects by the magnitude of the potential energy value. The field-control bidirectional feedback control center is responsible for executing the closed-loop control strategy. This unit receives the above-mentioned heat map and processes the bidirectional control logic in parallel: the system converts the detected potential energy anomaly into specific printer motion compensation instructions, which aim to physically cover and fill the defect location when printing the next layer; based on the re-inspection results after filling, the system dynamically corrects the calculation parameters in the virtual viscosity diffusion analysis unit, and establishes an adaptive mechanism for the dynamic evolution of algorithm parameters with material properties. This invention breaks through the dependence of traditional visual inspection on high-performance hardware. By reducing the complexity of pattern recognition tasks to local differential operators and physical field simulation operations, it significantly reduces computational latency and achieves millisecond-level real-time response. By introducing the concept of fluid field potential energy, the system can not only identify surface cracks, but also keenly perceive the hidden defects inside the material that are invisible to the naked eye through the abnormal concentration characteristics of field stress.
[0016] Example 2: The specific logic for generating the initial vector field matrix by the gradient potential energy mapping unit is as follows: The Sobel operator is used to calculate the gray-level gradient of each pixel in the image. Based on the mapping logic that the gray-level gradient represents the virtual flow velocity, the continuous printed texture with uniform gray-level changes is mathematically equivalent to laminar flow in a fluid field, and the defective areas with drastic gray-level jumps or texture disorder are mathematically equivalent to vortices or divergent sources in a fluid field, thereby constructing the initial vector field matrix.
[0017] Specifically, constructing the initial vector field matrix The mathematical expression is: Set the image brightness function to Then the gray-level gradient at that point is ; Defined virtual velocity vector Follow the following mapping transformation: ; ; in, These are the normalized mapping coefficients, taking values of... This is used to eliminate the influence of pixel grayscale values and normalize the gradient magnitude to the [0,1] interval. This transformation is essentially rotating the gradient field counterclockwise by 90 degrees in the two-dimensional plane, so that the laminar flow direction along the texture edge is orthogonal to the gradient direction, thus conforming to the physical intuition of fluid flowing along the pipe wall. It should be noted that the virtual flow velocity defined here is only a vector field construction in the mathematical mapping sense. Its numerical value represents the rate of change of grayscale and does not have the real velocity dimension of length and time in physics. In this embodiment, the gradient potential energy mapping unit performs a rigorous mathematical transformation procedure to transform the disordered pixel array into a vector field that follows the laws of physics. The processing logic of this unit begins with the preprocessing of the original grayscale image. Internally, the unit calls the Sobel differential operator to perform convolution calculations on the grayscale change rate of each pixel in the horizontal and vertical directions, thereby calculating the grayscale gradient vector of that point. Based on this, the system applies a preset physical mapping rule: mapping the calculated grayscale gradient magnitude to the scalar magnitude of the virtual flow velocity, and mapping the gradient direction to the vector direction of the flow velocity. Specifically, the mapping rule uses a direct linear mapping: setting the magnitude of the virtual flow velocity vector to the normalized value of the grayscale gradient magnitude of that pixel, and setting the direction of the virtual flow velocity vector to the direction after rotating the grayscale gradient direction of that pixel counterclockwise by 90 degrees in the two-dimensional plane, thus constructing a flow field distribution that strictly corresponds to the intensity of light and shadow changes. Following this logic, for normal printing areas with uniform material and regular stacking, the grayscale changes are smooth and continuous, thus exhibiting a laminar flow state with consistent direction and stable velocity in the generated vector field. For defective areas with fractures, voids, or impurity accumulation, the grayscale values will experience drastic jumps or disordered oscillations. These areas are mathematically equivalently transformed in the vector field into vortices generated when fluid encounters obstacles or as energy sinking convergence sources. Through this mapping, the system successfully constructed an initial vector field matrix containing rich physical feature information, laying a solid data foundation for subsequent defect topology analysis. Innovatively, a mathematical equivalence relationship between optical image features and fluid physics field models was established, enabling the system to use mature and efficient fluid dynamics operators to analyze microscopic image features, thereby capturing tiny texture anomalies and structural mutations that are easily ignored in traditional image thresholding segmentation algorithms.
[0018] Example 3: The logic for setting the virtual viscosity coefficient in the virtual viscosity diffusion analysis unit is as follows: The initial setting is based on the physical melt index of the printing material. When the flowability of the printing material is poor, the virtual viscosity coefficient is set to a higher value to simulate a stronger damping effect and suppress minor texture noise in non-defect areas.
[0019] The processing logic for the virtual viscosity diffusion analysis unit to perform anisotropic diffusion iteration calculations is as follows: By utilizing the spatial continuity of normal printed textures, the energy distribution changes during the diffusion process remain stable; by utilizing the abrupt topological changes in defective regions, they are made mathematically singularities that generate energy gradient lags under diffusion operations, thus preserving anomalous features in the evolution vector field.
[0020] In this combined embodiment, the parameter adaptation strategy and core operation mechanism of the virtual viscosity diffusion analysis unit are described in detail; The initial value of the virtual viscosity coefficient is not a fixed constant, but rather a function mapping relationship established with the rheological properties and physical melt index of the printing material; the system reads the current printing material... The value is determined based on a preset inverse mapping table to establish the coefficient benchmark. When processing high-viscosity, low-flow-rate materials, the inherent surface roughness of the material can easily generate high-frequency background noise in image detection. In response to this situation, the system automatically increases the virtual viscosity coefficient. This parameter adjustment simulates the strong damping effect of high-viscosity fluids at the algorithm level, enabling the diffusion algorithm to apply a stronger smoothing effect during operation, effectively smoothing out minor texture noise in non-defect areas and preventing false alarms from the system. To ensure that it can be implemented by those skilled in the art, the virtual viscosity coefficient Physical melt index of printing materials The specific function mapping relationship is set as follows: ; Wherein, MFI is the dimensionless value of the physical melt index of the printing material under standard test conditions; constant 10 is the normalized reference constant; The base damping gain has a value range of [0.5, 1.5]. The minimum smoothing constant has a value range of [0.1, 0.3]. For example, for PLA material with MFI = 10 g / 10 min, set The virtual viscosity coefficient can then be calculated. For high-viscosity ABS material with MFI = 2 g / 10 min, the calculation yields... The system automatically retrieves the formula from the pre-stored material property database to calculate. This allows for quantitative parameter adaptation. This unit receives an initial vector field matrix and performs anisotropic diffusion iterations within a set virtual time step. This logic is based on two core physical assumptions: normal printed textures are spatially continuous, and their energy distribution changes very little during the diffusion iteration process, maintaining a steady state; defective regions are topologically discontinuous points, i.e., mathematical singularities. In the diffusion operation, these singularities hinder the smooth transfer of energy, resulting in significant local energy gradient lag. Through this differentiated diffusion response, the generated evolutionary vector field successfully filters out the interference of background textures, while preserving the true structural anomalies with high contrast. A parameter-adaptive intelligent noise reduction mechanism was implemented. By directly linking the core parameters of the algorithm with the physical properties of the material, the system's compatibility with materials of different rheological properties was improved. Furthermore, by utilizing the principle of anisotropic diffusion, the layer noise commonly found in 3D printing processes was effectively suppressed without losing the detailed features of the defect edges, significantly improving the signal-to-noise ratio of the detection system.
[0021] Example 4: The process of generating a defect potential energy heatmap from topological singularity extraction cells includes calculating divergence components: The divergence of the vector field is calculated to characterize the source and sink properties of the material. When the calculated divergence value is negative and the absolute value exceeds the preset standard, it is determined that there is a material missing or unfused defect at that location, and the corresponding potential energy value is written into the defect potential energy thermogram.
[0022] The process of generating a defect potential energy heatmap from topological singularity extraction cells includes calculating the curl component: The curl of the vector field is calculated to characterize the rotational properties of the field. When the calculated curl value is abnormal, it is determined that there is a surface warping or turbulent accumulation defect at that location, and the corresponding potential energy value is written into the defect potential energy thermogram.
[0023] The physical principle is that when the printed surface physically warps or spherizes, the normal direction of the surface is continuously deflected, causing the gray-scale gradient field of the reflected light path on the imaging plane to generate a non-zero rotation component. The specific calculation logic is as follows: for the evolving vector field Calculate curl The flow field in a normally flat and stacked region is approximately an irrotational field, while the warped region mathematically represents a vortex center, and its absolute curl will be significantly higher than the background noise benchmark. In this combined embodiment, the topological singularity extraction unit uses differential geometry analysis to achieve accurate classification and quantitative characterization of defect types; This unit executes divergence calculation logic. In fluid field theory, divergence is used to describe the degree of divergence or convergence of a vector field. The system calculates the divergence value of the evolving vector field point by point and compares the calculation result with a preset threshold standard. If the divergence value of a certain region is negative and its absolute value exceeds the preset judgment threshold, it mathematically indicates that there is a sink in that region, that is, the surrounding streamlines collapse towards that point. In physical terms, this feature directly corresponds to the depressions, micropores, or unfused gaps on the surface of the printed layer. The system captures such features and uses the calculated divergence amplitude as a potential energy value, accurately mapping it to the defect potential energy thermogram. This unit synchronously executes the curl calculation logic; curl is used to describe the rotational intensity of the vector field; when the printed surface exhibits local warping, spheroidization, or irregular turbulent accumulation, its corresponding grayscale gradient field will show significant rotational characteristics; the system monitors the curl value of the vector field in real time, and once it detects that the absolute value of the curl value in a certain area has increased abnormally and exceeded the safety threshold, it is determined that there is a distortion or accumulation of the surface morphology at that location; the system also converts the abnormal curl value into a potential energy value and records it in the heat map; A defect classification and identification mechanism based on physical field characteristics is provided. The system can not only qualitatively determine the existence of defects, but also accurately distinguish whether the defects belong to the category of depression / missing or convex / warping by the different physical meanings of divergence and curl, providing accurate data support for subsequent targeted selection of filling compensation or path correction.
[0024] Example 5: The specific process of the positive feedback executed by the field-control bidirectional feedback control center is as follows: The area where the potential energy value exceeds the dynamic safety threshold in the defect potential energy heat map is marked as the defect area. Then, using the built-in coordinate transformation module, the pixel coordinates of the defect area in the image are mapped to the physical platform coordinates of the 3D printer according to the installation position of the coaxial acquisition unit and the field of view parameters. Based on physical platform coordinates, dynamic intervention is performed when generating the G-code for the next layer slice. Depending on the strength of the potential energy value, the filling density or extrusion amount is increased proportionally in the corresponding physical platform coordinate region to fill the potential gaps detected in the previous layer.
[0025] The specific process of the reverse feedback executed by the field-control bidirectional feedback control center is as follows: After the next layer is printed, continuously track whether the potential energy value of the original defect area returns to the normal range; If defective characteristics are still found after compensation, an error signal is generated and sent to the virtual viscosity diffusion analysis unit to automatically fine-tune the virtual viscosity coefficient so that the system can adapt to the actual reflectivity and flow characteristics of the current batch of materials.
[0026] The specific fine-tuning logic is as follows: If the re-inspection finds that there are still a large number of discrete high-frequency potential energy noise points in the original area, but no obvious continuous topological structure, the system determines that the current virtual viscosity coefficient is too low, which fails to effectively suppress the rough texture noise on the material surface. Therefore, a positive adjustment command is generated to increase the virtual viscosity coefficient by a preset step size. If the re-inspection finds that the defect area still has topological singularities with clear structure, continuity and no decay of potential energy value, it is determined that the physical filling repair has failed. The system outputs a shutdown alarm signal for manual intervention and no longer performs automatic adjustment of the virtual viscosity coefficient to prevent excessive smoothing from masking the real defects. In this combined embodiment, the field-control bidirectional feedback control center constructs a closed-loop intelligent control loop that encompasses physical repair and algorithm self-optimization; The region where the potential energy value exceeds the dynamic safety threshold in the defect potential energy thermal map is marked as the defect area. Prior to this, the system has completed the calibration of the coaxial acquisition unit using a standard calibration board during the initialization phase, obtained the intrinsic parameter matrix of the coaxial acquisition unit, and calculated the extrinsic parameter rotation and translation matrix of the camera coordinate system relative to the printing platform coordinate system. Based on this pre-built projection transformation model, the system maps the pixel coordinates of the defect area in the image to the physical platform coordinates of the 3D printer. The specific dynamic intervention is achieved by modifying the print command flow in real time: the system does not perform a full reslicing of the generated G-code file, but instead utilizes the printer's flow control interface to detect defect coordinates. At the same time, dynamic flow control commands are inserted into the print command buffer queue; for example, when the print head moves to the defect coordinate area, the system automatically sends command M221 S120, and sends command M221 S100 to return to normal after leaving the defect area; this real-time interpolation method based on command flow ensures that the physical filling of the micro gaps in the upper layer is completed within a millisecond response time. The system performs threshold screening on the received defect potential energy heat map, locking areas with potential energy values exceeding the dynamic safety threshold as defect areas requiring intervention. It then calls the built-in coordinate transformation module, which integrates the coaxial mounting geometry parameters and field-of-view data of the coaxial acquisition unit, to perform a precise mapping transformation from the image pixel coordinate system to the printer's physical platform coordinate system. Based on this physical coordinate system, the system intervenes when calculating the next layer's printing path: for areas marked as defects, the system generates variable parameter control commands based on the strength of the potential energy value, proportionally increasing the material extrusion amount or densifying the filling path in that local area. The technical objective is to utilize the next layer of molten material to physically and precisely fill the microscopic voids or cracks left in the previous layer, achieving self-healing of the workpiece. The system demonstrated its parameter self-learning capability; after the above repair measures were implemented and the next layer was printed, the system immediately re-examined the potential energy value at the original defect location; if the re-examination result showed that the potential energy value had returned to the normal range, the repair was deemed successful; if it was found that even after physical compensation, the area still exhibited significant defect characteristics, this indicated that the current detection sensitivity or noise suppression parameters did not match the actual material properties; the control center generated an error signal and fed it back to the virtual viscosity diffusion analysis unit, triggering the unit to automatically fine-tune the virtual viscosity coefficient until the system could accurately reflect and adapt to the actual reflectivity and flow characteristics of the current material batch; Intelligent closed-loop control of the 3D printing process has been achieved; the positive feedback mechanism enables the printer to repair defects in real time during the manufacturing process, blocking the cumulative effect of defects and significantly reducing the scrap rate; the negative feedback mechanism gives the system algorithm-level self-evolution capability, enabling it to dynamically adapt to environmental changes and material batch differences, ensuring the robustness and accuracy of the detection and control system in long-term operation.
[0027] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A 3D printed workpiece defect recognition system based on image detection, characterized in that, include: The coaxial acquisition unit is configured at the coaxial position of the print head as the sensing entry point of the system. It is used to continuously capture the surface optical image of the current printing layer during the printing process and convert the surface optical image into the original grayscale image stream for output. The gradient potential energy mapping unit is configured to receive the original grayscale image stream, calculate the grayscale gradient of the image pixels using a preset differential operator, and map the grayscale gradient into a virtual flow velocity vector in two-dimensional space, thereby generating an initial vector field matrix. The virtual viscosity diffusion analysis unit, as the core operator for simulating physical diffusion, is configured to receive the initial vector field matrix and, based on the virtual viscosity coefficient that characterizes the smoothing ability of the algorithm, perform anisotropic diffusion iterative operations on the initial vector field matrix within a virtual time step to filter high-frequency noise and generate an evolution vector field that highlights structural anomalies. The topological singularity extraction unit is configured to receive the initial vector field matrix and the evolved vector field, and extract the topological abrupt change region by calculating the difference between the two vector fields before and after diffusion, thereby generating a defect potential energy heat map containing defect pixel coordinates and potential energy values. The field-control bidirectional feedback control center, as the decision-making core of the system, is configured to receive the defect potential energy heat map and construct a bidirectional feedback mechanism between the detection data and the printing execution: on the one hand, it executes positive feedback based on the potential energy value to generate G-code intervention instructions for the next layer slice; on the other hand, it executes reverse feedback based on the printing results of the next layer to adjust the virtual viscosity coefficient in the virtual viscosity diffusion analysis unit.
2. The 3D printed workpiece defect recognition system based on image detection according to claim 1, characterized in that, The specific logic for the gradient potential energy mapping unit to generate the initial vector field matrix is as follows: The Sobel operator is used to calculate the gray-level gradient of each pixel in the image. Based on the mapping logic that the gray-level gradient represents the virtual flow velocity, the continuous printed texture with uniform gray-level changes is mathematically equivalent to laminar flow in a fluid field, and the defective areas with drastic gray-level jumps or texture disorder are mathematically equivalent to vortices or divergent sources in a fluid field, thereby constructing the initial vector field matrix.
3. The 3D printed workpiece defect recognition system based on image detection according to claim 1, characterized in that, The logic for setting the virtual viscosity coefficient in the virtual viscosity diffusion analysis unit is as follows: The initial setting is based on the physical melt index (MFI) of the printing material. When the flowability of the printing material is poor, the virtual viscosity coefficient is set to a higher value to simulate a stronger damping effect to suppress minor texture noise in non-defect areas.
4. The 3D printed workpiece defect recognition system based on image detection according to claim 1, characterized in that, The processing logic for the virtual viscosity diffusion analysis unit to perform anisotropic diffusion iterative calculations is as follows: By utilizing the spatial continuity of normal printed textures, the energy distribution changes during the diffusion process remain stable; by utilizing the abrupt topological changes in defective regions, they are made mathematically singularities that generate energy gradient lags under diffusion operations, thereby preserving anomalous features in the evolution vector field.
5. A 3D printed workpiece defect identification system based on image detection according to claim 1, characterized in that, The process of generating a defect potential energy heatmap by the topological singularity extraction unit includes calculating the divergence components: The divergence of the vector field is calculated to characterize the source and sink properties of the material. When the calculated divergence value is negative and the absolute value exceeds the preset standard, it is determined that there is a material missing or unfused defect at that location, and the corresponding potential energy value is written into the defect potential energy thermogram.
6. The 3D printed workpiece defect recognition system based on image detection according to claim 1, characterized in that, The process of generating a defect potential energy heatmap by the topological singularity extraction unit includes calculating the curl component: The curl of the vector field is calculated to characterize the rotational properties of the field. When the calculated curl value is abnormal, it is determined that there is a surface warping or turbulent accumulation defect at that location, and the corresponding potential energy value is written into the defect potential energy thermogram.
7. The 3D printed workpiece defect recognition system based on image detection according to claim 1, characterized in that, The specific process by which the field-control bidirectional feedback control center performs positive feedback is as follows: The area in the defect potential energy thermal map where the potential energy value exceeds the dynamic safety threshold is marked as the defect area. Using the built-in coordinate transformation module, the pixel coordinates of the defect area in the image are mapped to the physical platform coordinates of the 3D printer according to the installation position of the coaxial acquisition unit and the field of view parameters. Based on the physical platform coordinates, dynamic intervention is performed when generating the G-code for the next layer slice. Depending on the strength of the potential energy value, the filling density or extrusion amount is increased proportionally in the corresponding physical platform coordinate region to fill the potential gaps detected in the previous layer.
8. The 3D printed workpiece defect recognition system based on image detection according to claim 1, characterized in that, The specific process by which the field-control bidirectional feedback control center performs reverse feedback is as follows: After the next layer is printed, continuously track whether the potential energy value of the original defect area returns to the normal range; If defective features are still found after compensation, an error signal is generated and sent to the virtual viscosity diffusion analysis unit to automatically fine-tune the virtual viscosity coefficient so that the system adapts to the actual reflectivity and flow characteristics of the current batch of materials.
