A method and system for detecting defects in printed models during 3D printing
By analyzing the grayscale image of the printing layer during 3D printing, combining the contrast and grayscale fluctuations between layers, the real defect areas are screened out, which solves the problem of low accuracy in defect detection in the prior art, and achieves a more efficient defect detection effect.
Patent Information
- Application Number
- CN202510060332.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2045-01-15
AI Technical Summary
The prior art has low accuracy in the printing model defect areas detected by edge detection algorithm during 3D printing, resulting in poor detection results.
By collecting the grayscale images of each printing layer during 3D printing, combining the grayscale mutations and grayscale fluctuations, the contrast between layers and the degree of defect performance are determined, and the areas of suspected defects are screened out, and the areas of true defects are further screened out through area change characteristic values and regional change continuity.
It improves the accuracy of printing model defect detection during 3D printing, so that real defect areas can be more effectively identified and screened out, and improves the detection effect.
Smart Images

Figure CN119477915B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image defect detection, and in particular to a method and system for detecting defects in a printed model during 3D printing. Background Art
[0002] Selective laser melting (SLM) is an additive manufacturing technology that uses high-energy laser as a heat source, also known as 3D printing technology. It uses high-energy lasers to precisely scan the metal powder layers, causing them to melt locally and solidify quickly, and then stack them layer by layer to create a printed model with high density and complex geometry. However, in the 3D printing process, the process parameters and quality monitoring requirements are high, and defects are prone to occur, affecting product quality and reliability. Therefore, a method is needed to monitor the defects of printed models during 3D printing.
[0003] In the prior art, during the process of defect detection of printed models in the 3D printing process, the defective areas are usually quickly identified through edge detection algorithms. However, there may be complex textures, inter-layer transitions or equipment noise in the normal structure of the printed model, and these features may be very similar to certain defective areas in image performance. For example, the print layer pattern may be similar to the shape of a crack, and the slight change in surface roughness may be similar to the edge of a pore. The noise signal may also mask the existence of tiny defects. This similarity can easily lead to false detection or missed detection. That is, the accuracy of the defective areas in the printed model detected by the edge detection algorithm in the prior art during the 3D printing process is low, resulting in poor effect of defect detection of the printed model during the 3D printing process. Summary of the invention
[0004] The present application provides a method and system for detecting defects in printed models during 3D printing. First, after screening out the print detail area, based on the characteristic that there is a large difference in grayscale between the defect area and other print areas, the interlayer contrast is determined according to the grayscale mutation between two adjacent print layers of each print detail area; then, based on the fact that the grayscale of the defect area is usually randomly distributed, the degree of defect manifestation is determined on the basis of the interlayer contrast combined with the grayscale fluctuation, thereby preliminarily screening out suspected defect areas; further, based on the characteristic that the defect area appearing during the 3D printing process will have a cumulative effect in the subsequent printing process, resulting in the area of the defect area becoming larger and the defect manifestation becoming more obvious, the corresponding real defect possibility is comprehensively characterized by the calculated area change characteristic value and area change continuity, thereby screening out more accurate real defect areas, solving the problem of low accuracy of defect areas in the printed model detected by the edge detection algorithm in the prior art during the 3D printing process, so that the effect of performing print model defect detection according to the real defect area in the 3D printing process is better.
[0005] The present application provides a method for detecting defects in a printed model during a 3D printing process, comprising:
[0006] During the 3D printing process, a grayscale image of the surface of each printing layer is collected; threshold segmentation is performed according to the grayscale distribution in the grayscale image of the surface of the printing layer to determine all printing detail areas of each printing layer;
[0007] Determine the interlayer contrast of each printing detail area in each printing layer according to the grayscale mutation of each printing detail area in the previous printing layer; determine the degree of defect expression of each printing detail area in each printing layer according to the interlayer contrast combined with the grayscale fluctuation in each printing detail area; and screen out suspected defect areas by threshold value according to the degree of defect expression;
[0008] Determine the area change characteristic value of each suspected defective area according to the area increase of the matching area in each printing layer after the corresponding printing layer of the suspected defective area; determine the regional change continuity of each suspected defective area according to the interlayer contrast change of the matching area in each printing layer after the corresponding printing layer of the suspected defective area; determine the real defect possibility of each suspected defective area according to the area change characteristic value and the regional change continuity;
[0009] The real defect area is screened out according to the real defect possibility; and the printed model defect detection is performed according to the real defect area during the 3D printing process.
[0010] Furthermore, the process of obtaining the print detail area includes:
[0011] The binary image obtained by threshold segmentation of the grayscale image of the printed layer surface by the Otsu threshold method is used as the corresponding initial binary image; the initial binary image is subjected to connected domain analysis to obtain at least two initial connected domains;
[0012] In the grayscale image of the printed layer surface, the grayscale value variance and the grayscale value mean of all pixels in each initial connected domain are calculated; the product of the negative correlation mapping value of the grayscale value variance and the grayscale value mean is used as the metal powder expression degree of each initial connected domain; other areas outside the initial connected domain corresponding to the maximum metal powder expression degree in the grayscale image of the printed layer surface are used as the printing area;
[0013] The binary image obtained by threshold segmentation of the printing area by Otsu threshold method is used as the corresponding reference binary image; each connected domain obtained by connected domain analysis of the reference binary image is used as the printing detail area.
[0014] Furthermore, the process of obtaining the inter-layer contrast includes:
[0015] The previous printing layer of each printing layer is used as a comparison layer of each printing layer;
[0016] Taking the difference between the grayscale value of each pixel point in each printing layer and the grayscale value of the corresponding pixel point in the comparison layer as the grayscale change value of each pixel point in each printing layer;
[0017] The average value of the grayscale change values of all pixels in each printing detail area in each printing layer is used as the inter-layer contrast of each printing detail area in each printing layer.
[0018] Furthermore, the process of obtaining the defect manifestation degree includes:
[0019] In each printing layer, the product of the negative correlation mapping value of the gray value variance of all pixels in each printing detail area and the gray value extreme difference is taken as the gray chaos degree of each printing detail area;
[0020] The product of the grayscale confusion degree and the inter-layer contrast is normalized to determine the defect manifestation degree of each printing detail area.
[0021] Furthermore, the process of obtaining the matching area includes:
[0022] The printing detail area where the centroid point of the suspected defect area is located in each printing layer is used as the matching area of the suspected defect area in each printing layer.
[0023] Furthermore, the process of obtaining the area change characteristic value includes:
[0024] All printing layers after the corresponding printing layer of the suspected defective area are used as analysis layers of the suspected defective area;
[0025] The difference between the area of the matching area corresponding to the suspected defect area in each analysis layer and the area of the matching area corresponding to the previous analysis layer is taken as the defect area increase value of each analysis layer; the average of the defect area increase values of all analysis layers is taken as the area change characteristic value of the suspected defect area.
[0026] Furthermore, the process of obtaining the regional change continuity includes:
[0027] Calculate the cumulative value of the defect manifestation degree of the matching area corresponding to the suspected defect area in all analysis layers; and take the product of the negative correlation mapping value of the variance of the defect manifestation degree of the matching area corresponding to the suspected defect area in all analysis layers and the cumulative value as the regional change continuity of each suspected defect area.
[0028] Furthermore, the process of obtaining the real defect possibility includes:
[0029] The product of the area change characteristic value and the regional change continuity is normalized to determine the real defect possibility of each suspected defect area.
[0030] Furthermore, the process of obtaining the real defect area includes:
[0031] The suspected defect area corresponding to the real defect possibility greater than the preset defect threshold is regarded as the real defect area.
[0032] The present application also proposes a system for detecting defects in printed models during 3D printing, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any one of the steps of a method for detecting defects in printed models during 3D printing.
[0033] This application has the following beneficial effects:
[0034] First of all, the main purpose of this application is to screen out the defective areas that appear on the printed model during the 3D printing process, so it is necessary to analyze the defective areas in combination with the distinguishing features of other areas. First of all, in the grayscale image of the printed layer surface taken, there is usually a background area corresponding to the printing platform, and the printing platform in the metal SLM technology usually belongs to the metal powder area that is not irradiated by the laser, and its grayscale value is generally high and relatively consistent. Therefore, based on this feature, the influence of the background area can be first excluded; in addition, the defective area in the printed model has an irregular and irregular nature, and the defective area is usually caused by material processing errors, which makes the grayscale texture of the defective area different from other printed areas. Therefore, firstly, according to the grayscale distribution in the grayscale image of the printed layer surface, threshold segmentation is performed to preliminarily determine the printing detail area that may contain the defective area. In the printing detail area, it may contain areas belonging to real defects, and it may also contain printing areas belonging to normal textures; therefore, it is necessary to further analyze the defective area in combination with the distinguishing features of other printed areas.
[0035] The appearance of defective areas is usually accompanied by more dramatic grayscale changes; while normal textures are usually printed step by step, and the corresponding grayscale changes are relatively gentle; therefore, the interlayer contrast that can characterize the performance of defective areas can be determined first according to the grayscale mutation between two adjacent printing layers of each adjacent printing detail area; the greater the interlayer contrast, the greater the possibility of the corresponding defective area. Metal SLM printing technology selectively melts the metal powder layer through a high-energy laser beam, so the defects that appear are usually bulges corresponding to material accumulation. The grayscale characteristics corresponding to the bulge state are more chaotic than the grayscale characteristics corresponding to the grayscale characteristics of other printing areas, and the grayscale value has a stronger fluctuation; therefore, for each printing detail area, the greater the corresponding interlayer contrast and the more prominent the grayscale fluctuation characteristics, the more the printing detail area conforms to the characteristics of the defective area, and the greater the corresponding defect performance; therefore, the degree of defect performance is determined according to the interlayer contrast and grayscale fluctuation, so as to further screen out suspected defective areas.
[0036] The defect area is obtained by statically analyzing each print detail area in each print layer. The analysis is based on the texture characteristics of the defect area in a static state. The defect area also has certain distinguishing characteristics in the dynamic printing process. Therefore, in order to screen out more accurate real defect areas, it is further necessary to analyze the dynamic change dimension of the defect area. In the layer-by-layer printing process, defects often have a cumulative effect. If there is a material accumulation problem, the corresponding accumulation will be further expanded in the subsequent printing process, making the print detail area corresponding to the defect larger and larger. And because the defect area is expanding, the corresponding defect performance level will also be stable and continuously growing. Therefore, this application determines the area change characteristic value according to the area increase of the matching area in each print layer after the corresponding print layer of the suspected defect area, and combines the regional change continuity that characterizes the interlayer contrast change of the matching area in each print layer after the corresponding print layer of the suspected defect area, and comprehensively determines the real defect possibility of each suspected defect area, thereby screening out more accurate real defect areas, so that the effect of printing model defect detection based on the real defect area in the 3D printing process is better. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1A flow chart of a method for detecting defects in a printed model during 3D printing provided by one embodiment of the present invention;
[0039] Figure 2 A schematic diagram of a printing platform after powder is laid in a metal SLM technology provided by an embodiment of the present invention;
[0040] Figure 3 A schematic diagram of a printing platform after laser melting in a metal SLM technology provided by an embodiment of the present invention;
[0041] Figure 4 A schematic diagram of a raised defect of a printed model during a 3D printing process provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a method and system for detecting defects in a printed model in a 3D printing process proposed by the present invention, its specific implementation, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment, and the specific features, structures or characteristics in one or more embodiments may be combined in any suitable form. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.
[0043] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0044] The following is a detailed description of a method and system for detecting defects in a printed model during 3D printing provided by the present invention in conjunction with the accompanying drawings.
[0045] This application embodiment provides a method for detecting defects in a printed model during 3D printing. Figure 1 , which shows a flow chart of a method for detecting defects in a printed model during 3D printing provided by an embodiment of the present invention, the method comprising:
[0046] Step S101: During the 3D printing process, a grayscale image of the surface of each printing layer is collected; threshold segmentation is performed according to the grayscale distribution in the grayscale image of the surface of the printing layer to determine all printing detail areas of each printing layer.
[0047] First of all, the main purpose of this application is to screen out the defective areas that appear on the printed model during the 3D printing process, so it is necessary to analyze the defective areas in combination with the distinguishing features of other areas. First of all, in the grayscale image of the printed layer surface taken, there is usually a background area corresponding to the printing platform, and the printing platform in the metal SLM technology usually belongs to the metal powder area that is not irradiated by the laser, and its grayscale value is generally high and relatively consistent. Therefore, based on this feature, the influence of the background area can be excluded first.
[0048] In a specific implementation of the embodiment of the present invention, the image acquisition device is installed above the printing model inside the printer to ensure that the image acquisition device is fixed and not affected by vibration, and the image acquisition device is controlled to align each printing layer of the printing model for image acquisition; after the printer is started, the image acquisition device and the printer control system are started synchronously to start the image acquisition task; after each layer of powder is laid and the laser is melted, the image acquisition device immediately performs an image acquisition, thereby acquiring the surface image of each printing layer; it should be noted that the time spent on the printing process corresponding to the powder laying and laser melting of each printing layer can be adjusted to be consistent, so that a fixed image acquisition device sampling frequency can be set to stably acquire the surface image of each printing layer; further considering that the subsequent analysis needs to be combined with the grayscale value for analysis, the obtained surface image of the printing layer is grayed to determine the grayscale image of the surface of the printing layer required by this application. It should be noted that the image acquisition device uses a high-resolution industrial camera, which can be adjusted according to the specific implementation environment.
[0049] Preferably, in some possible implementations of the embodiments of the present invention, the process of acquiring the printing detail area includes:
[0050] The binary image obtained after threshold segmentation of the grayscale image on the surface of the printed layer by the Otsu threshold method is used as the corresponding initial binary image; the initial binary image is subjected to connected domain analysis to obtain at least two initial connected domains; in the grayscale image on the surface of the printed layer, the grayscale value variance and grayscale value mean of all pixels in each initial connected domain are calculated; the product of the negative correlation mapping value of the grayscale value variance and the grayscale value mean is used as the metal powder expression degree of each initial connected domain; other areas outside the initial connected domain corresponding to the maximum metal powder expression degree in the grayscale image on the surface of the printed layer are used as the printing area. It should be noted that the Otsu threshold method is a technical means well known to those skilled in the art and will not be further described here.
[0051] See also Figure 2 , which shows a schematic diagram of a printing platform after laying powder in a metal SLM technology provided by an embodiment of the present invention, Figure 2In the example, after the printing platform is paved with powder, the overall grayscale value is large and the grayscale remains consistent; please refer to Figure 3 , which shows a schematic diagram of a printing platform after laser melting in a metal SLM technology provided by an embodiment of the present invention, Figure 3 In the non-printing area, the powder is still laid, and the corresponding grayscale features remain unchanged; while the grayscale value of the printing area is smaller than that of the non-printing area, that is, the printing platform area, and when there is a specific texture in the subsequent printing process, the corresponding grayscale value usually shows a different grayscale performance. Therefore, for the background area, that is, the non-printing area in the grayscale image of the printed layer surface, the grayscale value distribution in the area is very stable, the grayscale values are relatively close, and the grayscale values are generally high; therefore, the metal powder performance degree that characterizes the possibility of the non-printing area is determined by multiplying the negative correlation mapping value of the grayscale value variance with the grayscale value mean; and the background area is usually integrated, so the other areas outside the initial connected domain corresponding to the largest metal powder performance degree in the grayscale image of the printed layer surface are used as the printing area. The implementer can also select the other areas outside the initial connected domain corresponding to the largest two, three or even more metal powder performance degrees according to the specific implementation environment as the printing area, which will not be further elaborated here.
[0052] In a specific implementation of the embodiment of the present invention, the process of obtaining the metal powder performance level is expressed by the formula: ;in, is the grayscale image of the printed layer surface The metal powder performance of the initial connected domain; is the grayscale image of the printed layer surface The gray value variance of all pixels in the initial connected domain; is the grayscale image of the printed layer surface The mean gray value of all pixels in the initial connected domain; is an exponential function with a natural constant as its base.
[0053] After excluding the influence of the background area, it is necessary to consider that the defective area in the printed model is usually irregular and unregulated, and the defective area is usually caused by material processing errors, which makes the grayscale texture of the defective area different from that of other printed areas, that is, the grayscale performance of the defective area and other normal texture areas is different, and they are usually independent connected domains. Therefore, the binary image obtained after threshold segmentation of the printed area by the Otsu threshold method is further used as the corresponding reference binary image; each connected domain obtained after connected domain analysis of the reference binary image is used as the printing detail area; in the printing detail area, it may contain areas belonging to real defects, and it may also contain printing areas belonging to normal textures; therefore, it is necessary to further combine the distinguishing features of the defective area compared with other printed areas for analysis.
[0054] Step S102: Determine the interlayer contrast of each printing detail area in each printing layer according to the grayscale mutation of each printing detail area in the previous printing layer; determine the degree of defect expression of each printing detail area in each printing layer according to the interlayer contrast combined with the grayscale fluctuation in each printing detail area; and filter out suspected defect areas according to the defect expression degree through a threshold.
[0055] The appearance of defective areas is usually accompanied by more dramatic grayscale changes; while normal textures are usually printed step by step, and the corresponding grayscale changes are relatively gentle; therefore, the interlayer contrast that can characterize the performance of defective areas can be determined first according to the grayscale mutation between two adjacent printing layers of each adjacent printing detail area; the greater the interlayer contrast, the greater the possibility of the corresponding defective area. Metal SLM printing technology selectively melts the metal powder layer through a high-energy laser beam, so the defects that appear are usually bulges corresponding to material accumulation. The grayscale characteristics corresponding to the bulge state are more chaotic than the grayscale characteristics corresponding to the grayscale characteristics of other printing areas, and the grayscale value has a stronger fluctuation; therefore, for each printing detail area, the greater the corresponding interlayer contrast and the more prominent the grayscale fluctuation characteristics, the more the printing detail area conforms to the characteristics of the defective area, and the greater the corresponding defect performance; therefore, the degree of defect performance is determined according to the interlayer contrast and grayscale fluctuation, so as to further screen out suspected defective areas.
[0056] Preferably, in some possible implementations of the embodiments of the present invention, the process of acquiring the inter-layer contrast includes:
[0057] The previous printing layer of each printing layer is used as the comparison layer of each printing layer; the difference between the grayscale value of each pixel in each printing layer and the grayscale value of the corresponding pixel in the comparison layer is used as the grayscale change value of each pixel in each printing layer; the average of the grayscale change values of all pixels in each printing detail area in each printing layer is used as the inter-layer contrast of each printing detail area in each printing layer. Since defects are usually caused by material processing errors, the appearance of defects is sudden and without warning, so when the defective area is formed, there will be a more drastic grayscale change in a short period of time; in contrast, normal textures are usually printed step by step, and the corresponding grayscale changes are relatively gentle; therefore, each printing layer is subjected to grayscale comparison analysis with its previous printing layer, so that when the overall grayscale change value of all pixels is larger, that is, when the inter-layer contrast is larger, the corresponding printing detail area is more consistent with the characteristics of drastic grayscale changes when the defective area appears, and the corresponding defect performance is greater.
[0058] In a specific implementation of the embodiment of the present invention, the process of obtaining the inter-layer contrast is expressed by the formula: ;in, For the The first printing layer The inter-layer contrast of each printed detail area; For the The first printing layer The number of pixels in the print detail area; For the The first printing layer Print detail area The gray value of each pixel; For the The first printing layer Print detail area The gray value of each pixel in the corresponding contrast layer; For the The first printing layer Print detail area The grayscale change value of each pixel.
[0059] Preferably, in some possible implementations of the embodiments of the present invention, the process of obtaining the defect manifestation degree includes:
[0060] In each printing layer, the product of the negative correlation mapping value of the gray value variance of all pixels in each printing detail area and the gray value range is taken as the grayscale disorder degree of each printing detail area. When the material is accumulated, a raised defect corresponding to the defect is formed, which usually shows a certain grayscale fluctuation under the influence of light; please refer to Figure 4, which shows a schematic diagram of a raised defect of a printed model during a 3D printing process provided by an embodiment of the present invention, Figure 4 In the figure, the raised defects have significant grayscale fluctuations. Therefore, for each print detail area, the larger the grayscale value variance of all corresponding pixels, the stronger the fluctuation of the grayscale distribution of the print detail area, that is, the higher the grayscale chaos, the more it conforms to the grayscale fluctuation characteristics of the raised defects, and the higher the corresponding defect performance. On this basis, combined with the characteristic that the greater the inter-layer contrast, the greater the corresponding defect performance, the product of the grayscale chaos and the inter-layer contrast is normalized to determine the defect performance of each print detail area, so that the greater the defect performance, the more the corresponding print detail area conforms to the defect texture performance, and the greater the possibility of the corresponding defect area.
[0061] In a specific implementation of the embodiment of the present invention, the process of obtaining the defect manifestation degree includes: ;in, For the The first printing layer The degree of defect expression in each print detail area; For the The first printing layer The inter-layer contrast of each printed detail area; For the The first printing layer The gray value variance of all pixels in the print detail area; For the The first printing layer The grayscale confusion of each print detail area; It is a linear normalization function. The implementer can adjust the normalization method according to the specific implementation environment. is an exponential function with a natural constant as the base; implementers can adopt other negative correlation mapping methods according to the specific implementation environment, such as , and the reciprocal, where is a hyperbolic tangent function, which will not be further described here.
[0062] For each print detail area, the greater the corresponding defect performance degree, the greater the possibility that it belongs to the defect area. Therefore, the suspected defect area is further screened out by threshold according to the defect performance degree. Specifically: the print detail area with a defect performance degree greater than the preset performance threshold is regarded as a suspected defect area; in a specific implementation of the embodiment of the present invention, the preset performance threshold is set to 0.57, which can be adjusted according to the specific implementation environment. And the reason why the suspected defect area is screened out is to facilitate the subsequent further analysis combined with the dynamic change characteristics, so that the real defect area finally screened out is more accurate.
[0063] Step S103: Determine the area change characteristic value of each suspected defect area according to the area increase of the matching areas in each printing layer after the corresponding printing layer of the suspected defect area; determine the regional change continuity of each suspected defect area according to the inter-layer contrast change of the matching areas in each printing layer after the corresponding printing layer of the suspected defect area; determine the real defect possibility of each suspected defect area according to the area change characteristic value and the regional change continuity.
[0064] The defect area is obtained by statically analyzing each print detail area in each print layer. The analysis is based on the texture features of the defect area in a static state. The defect area also has certain distinguishing features in the dynamic printing process. Therefore, in order to screen out more accurate real defect areas, it is necessary to further analyze the dimension of dynamic changes in the defect area. In the layer-by-layer printing process, defects often have a cumulative effect. If there is a problem of material accumulation, the corresponding accumulation will be further expanded in the subsequent printing process, making the print detail area corresponding to the defect larger and larger. And because the defect area is expanding, the corresponding defect performance level will also be stable and continue to grow. Therefore, this application determines the area change characteristic value according to the area increase of the matching area in each print layer after the corresponding print layer of the suspected defect area, and combines the regional change continuity that characterizes the interlayer contrast change of the matching area in each print layer after the corresponding print layer of the suspected defect area to comprehensively determine the real defect possibility of each suspected defect area.
[0065] Preferably, in some possible implementations of the embodiments of the present invention, the process of obtaining the matching area includes:
[0066] The printing detail area where the centroid of the suspected defect area is located in each printing layer is used as the matching area of the suspected defect area in each printing layer. Considering that the same suspected defect area may correspond to different shape features in different printing layers, there may be ambiguity when continuing to use the same suspected defect area, so it is redefined through the matching area to clearly characterize the regional changes of each suspected defect area in subsequent printing layers.
[0067] Preferably, in some possible implementations of the embodiments of the present invention, the process of acquiring the area change characteristic value includes:
[0068] All the printing layers after the corresponding printing layer of the suspected defective area are used as the analysis layers of the suspected defective area. Since the area of the corresponding defective area will become larger and larger under the influence of the cumulative effect after the defective area appears, for each suspected defective area, this application only analyzes the regional changes of the suspected defective area in the subsequent printing layers, so as to more accurately analyze the dynamic change characteristics of the defective area.
[0069] The difference between the area of the matching area corresponding to the suspected defect area in each analysis layer and the area of the matching area corresponding to the previous analysis layer is used as the defect area increase value of each analysis layer; the average of the defect area increase values of all analysis layers is used as the area change characteristic value of the suspected defect area. Since the defect area has a cumulative effect, the corresponding defect area will gradually increase in the subsequent printing process. Therefore, for each suspected defect area, the larger the corresponding area change characteristic value is, the more it conforms to the characteristic of the defect area gradually increasing, and the greater the possibility that the corresponding defect area is a real defect area.
[0070] In a specific implementation of the embodiment of the present invention, the process of obtaining the area change characteristic value is expressed by the formula: ;in, Suspected defect area The area change characteristic value of Suspected defect area The corresponding number of analysis layers; Suspected defect area In the corresponding The difference between the area of the matching area corresponding to the analysis layer and the area of the matching area corresponding to the previous analysis layer, that is, the suspected defect area In the corresponding It should be noted that, for any suspected defect area, the defect area increase value of the first analysis layer can be obtained by the difference between the area of the matching area corresponding to the suspected defect area in the first analysis layer and the area of the suspected defect area, which will not be further elaborated here.
[0071] Preferably, in some possible implementations of the embodiments of the present invention, the process of acquiring the regional change continuity includes:
[0072] Calculate the cumulative value of the defect performance degree of the matching area corresponding to the suspected defect area in all analysis layers; take the product of the negative correlation mapping value of the variance of the defect performance degree of the matching area corresponding to the suspected defect area in all analysis layers and the cumulative value as the regional change continuity of each suspected defect area. For the real defect area, under the influence of the cumulative effect, the area of the corresponding matching area should be gradually and slowly increased, so that the area of the corresponding matching area will gradually increase, and under the influence of the increase in the number of corresponding pixels, the corresponding defect performance degree will show a certain degree of slow growth, and because of the pixels belonging to the defect area, the defect performance degree will maintain a stable growth, so the smaller the variance of the defect performance degree of the matching area corresponding to the suspected defect area in all analysis layers, the more it conforms to the characteristics of the real defect area; and just because the area of the defect area will gradually expand, so under the layer-by-layer accumulation, the larger the cumulative value of the defect performance degree of the matching area corresponding to the suspected defect area in all analysis layers, the more it conforms to the characteristics of the real defect area; therefore, the greater the regional change continuity obtained based on the product, the more likely the corresponding suspected defect area is to be a real defect area.
[0073] In a specific implementation of the embodiment of the present invention, the process of obtaining the continuity of regional changes is expressed by the formula: ;in, Suspected defect area Continuity of regional changes; Suspected defect area The variance of the defect manifestation degree of the corresponding matching area in all analysis layers; Suspected defect area In the corresponding The degree of defect expression in the corresponding matching area in each analysis layer; Suspected defect area The corresponding number of analysis layers; Suspected defect area The cumulative value of the defect manifestation degree of the corresponding matching area in all analysis layers.
[0074] Preferably, in some possible implementations of the embodiments of the present invention, the process of obtaining the real defect possibility includes:
[0075] Since the larger the area change characteristic value and the greater the regional change continuity, the more likely the corresponding suspected defect area is to be a real defect area, the product of the area change characteristic value and the regional change continuity is normalized to determine the real defect possibility of each suspected defect area, thereby screening out the real defect area based on the real defect possibility; and normalization can limit the value range of the real defect possibility to within 0 to 1, which is convenient for subsequent screening.
[0076] In a specific implementation of the embodiment of the present invention, the process of obtaining the real defect possibility is expressed by the formula: ; Suspected defect area The real possibility of defects; Suspected defect area Continuity of regional changes; Suspected defect area The area change characteristic value of is a linear normalization function, and the implementer can adjust the normalization method according to the specific implementation environment. It should be noted that in addition to the product, the implementer can also calculate the possibility of real defects through other methods according to the correlation, such as the normalized value of the mean or the normalized value of the sum, etc., which will not be further elaborated here.
[0077] Step S104: screening out real defect areas according to the possibility of real defects; and performing print model defect detection according to the real defect areas in the 3D printing process.
[0078] Since the greater the possibility of a real defect, the higher the possibility that the corresponding suspected defect area belongs to the real defect area, the more accurate real defect area is finally screened out according to the real defect possibility, so that the effect of printing model defect detection based on the real defect area in the 3D printing process is better. Therefore, in a specific implementation method of an embodiment of the present invention, the process of obtaining the real defect area includes: taking the suspected defect area corresponding to the real defect possibility greater than the preset defect threshold as the real defect area; wherein the preset defect threshold is set to 0.63, which can be adjusted according to the specific implementation environment, and will not be further elaborated here. It should be noted that after the real defect area is detected during the printing process, the printing job is immediately suspended to avoid further accumulation or superposition of defects leading to more serious quality problems, and the technical staff is notified for on-site confirmation to deal with the printing defects in time, thereby significantly reducing material waste and cost losses, and ensuring that the quality of the final printed model product meets the design requirements. It should be noted that the embodiment of the present invention performs real defect area screening every 20 layers of printing, and suspends the printing operation and notifies the technicians after the real defect area is detected. The implementers can adjust the corresponding number of layers according to the specific implementation environment, which will not be further elaborated here.
[0079] In summary, the present application proposes a method for detecting defects in printed models during 3D printing. First, after screening out the printed detail area, the interlayer contrast is determined according to the grayscale mutation between two adjacent printed layers of each printed detail area based on the characteristic that the defect area has a large difference in grayscale from other printed areas; then, based on the fact that the grayscale of the defect area is usually randomly distributed, the degree of defect manifestation is determined based on the interlayer contrast combined with the grayscale fluctuation, thereby preliminarily screening out suspected defect areas; further, based on the fact that the defect area appearing during the 3D printing process will have a cumulative effect in the subsequent printing process, resulting in the area of the defect area becoming larger and the defect manifestation becoming more and more obvious, the corresponding real defect possibility is comprehensively characterized by the calculated area change eigenvalue and area change continuity, thereby screening out more accurate real defect areas, solving the problem of low accuracy of defect areas in the printed model detected by the edge detection algorithm in the prior art during the 3D printing process, so that the effect of printing model defect detection based on the real defect area in the 3D printing process is better.
[0080] The present application also proposes a system for detecting defects in printed models during 3D printing, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any one of the steps of a method for detecting defects in printed models during 3D printing.
[0081] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0082] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A method for detecting defects in printed models during 3D printing, characterized in that: The method comprises: During the 3D printing process, a grayscale image of the surface of each printing layer is collected; threshold segmentation is performed according to the grayscale distribution in the grayscale image of the surface of the printing layer to determine all printing detail areas of each printing layer; Determine the interlayer contrast of each printing detail area in each printing layer according to the grayscale mutation of each printing detail area in the previous printing layer; determine the degree of defect expression of each printing detail area in each printing layer according to the interlayer contrast combined with the grayscale fluctuation in each printing detail area; and screen out suspected defect areas by threshold value according to the degree of defect expression; Determine the area change characteristic value of each suspected defective area according to the area increase of the matching area in each printing layer after the corresponding printing layer of the suspected defective area; determine the regional change continuity of each suspected defective area according to the interlayer contrast change of the matching area in each printing layer after the corresponding printing layer of the suspected defective area; determine the real defect possibility of each suspected defective area according to the area change characteristic value and the regional change continuity; Screening out a real defect area according to the real defect possibility; performing defect detection on the printed model according to the real defect area during the 3D printing process; The process of obtaining the interlayer contrast includes: The previous printing layer of each printing layer is used as a comparison layer of each printing layer; Taking the difference between the grayscale value of each pixel point in each printing layer and the grayscale value of the corresponding pixel point in the comparison layer as the grayscale change value of each pixel point in each printing layer; The average value of the grayscale change values of all pixels in each printing detail area in each printing layer is used as the inter-layer contrast of each printing detail area in each printing layer; The process of obtaining the defect performance degree includes: In each printing layer, the product of the negative correlation mapping value of the gray value variance of all pixels in each printing detail area and the gray value extreme difference is taken as the gray chaos degree of each printing detail area; Normalizing the product of the grayscale confusion degree and the inter-layer contrast ratio to determine the degree of defect expression of each printing detail area; The process of obtaining the matching area includes: The printing detail area where the centroid point of the suspected defect area is located in each printing layer is used as the matching area of the suspected defect area in each printing layer.
2. A method for detecting defects in printed models during 3D printing according to claim 1, characterized in that: The process of obtaining the print detail area includes: The binary image obtained by threshold segmentation of the grayscale image of the surface of the printed layer by the Otsu threshold method is used as the corresponding initial binary image; the initial binary image is subjected to connected domain analysis to obtain at least two initial connected domains; In the grayscale image of the printed layer surface, the grayscale value variance and the grayscale value mean of all pixels in each initial connected domain are calculated; the product of the negative correlation mapping value of the grayscale value variance and the grayscale value mean is used as the metal powder expression degree of each initial connected domain; other areas outside the initial connected domain corresponding to the maximum metal powder expression degree in the grayscale image of the printed layer surface are used as the printing area; The binary image obtained by threshold segmentation of the printing area by Otsu threshold method is used as the corresponding reference binary image; each connected domain obtained by connected domain analysis of the reference binary image is used as the printing detail area.
3. The method for detecting defects in printed models during 3D printing according to claim 1, characterized in that: The process of obtaining the area change characteristic value includes: All printing layers after the corresponding printing layer of the suspected defective area are used as analysis layers of the suspected defective area; The difference between the area of the matching area corresponding to the suspected defect area in each analysis layer and the area of the matching area corresponding to the previous analysis layer is taken as the defect area increase value of each analysis layer; the average of the defect area increase values of all analysis layers is taken as the area change characteristic value of the suspected defect area.
4. The method for detecting defects in printed models during 3D printing according to claim 3, characterized in that: The process of obtaining the regional change continuity includes: Calculate the cumulative value of the defect manifestation degree of the matching area corresponding to the suspected defect area in all analysis layers; and take the product of the negative correlation mapping value of the variance of the defect manifestation degree of the matching area corresponding to the suspected defect area in all analysis layers and the cumulative value as the regional change continuity of each suspected defect area.
5. The method for detecting defects in printed models during 3D printing according to claim 1, characterized in that: The process of obtaining the actual defect possibility includes: The product of the area change characteristic value and the regional change continuity is normalized to determine the real defect possibility of each suspected defect area.
6. The method for detecting defects in printed models during 3D printing according to claim 1, characterized in that: The process of obtaining the real defect area includes: The suspected defect area corresponding to the real defect possibility greater than the preset defect threshold is regarded as the real defect area.
7. A system for detecting defects in printed models during 3D printing, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
3D printing model defect pre-judgment system and method based on visual neural learning
CN110070521A
Printing effect quality detection method and device based on photocuring printing equipment
CN115946344A