A pipe injection molding monitoring method and system
Through edge detection, the edge segments are divided by corners and multiple data are calculated, which solves the problem of text identification affecting defect detection and achieves the accuracy and accuracy of defect detection of injection molded pipe fittings.
Patent Information
- Application Number
- CN202510765190.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-06-10
AI Technical Summary
When detecting defects of injection molded pipe fittings in the prior art, the edge characteristics of the text marking are more obvious, resulting in a decrease in the accuracy of defect detection results.
The closed edge is screened through edge detection, and the edge segments are divided by corner points, and the translation coincidence, the first complexity, the second complexity and the flatness of the communication domain are calculated. The probability of the defect edge is calculated based on multiple aspects of data, and the closed edge with corresponding probability is removed below the threshold value to achieve the accuracy of defect detection.
It improves the accuracy of defect detection, eliminates the impact of text marking edges on the detection results, and realizes accurate monitoring of the injection molding process of injection molding pipe fittings.
Smart Images

Figure CN120279498B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and more particularly to a method and system for monitoring pipe injection molding. Background Art
[0002] Injection-molded pipe fittings are manufactured using injection molding technology. Molten plastic is injected into a mold, cooled, and solidified to create a plastic product with a specific shape and dimensional accuracy. This process has gained significant application in a variety of industries, including automotive, electronics, medical devices, and daily necessities. However, during the injection molding process, improperly set injection molding instrument parameters (such as temperature, pressure, and injection speed) can lead to defects in the produced pipe fittings. To ensure production quality, defect detection is necessary to promptly identify problems and make adjustments to ensure that the final product meets quality standards. Therefore, accurately detecting defects in injection-molded pipe fittings is crucial for monitoring the injection molding process.
[0003] In the related art, a morphologically based defect detection method for ice box injection molded parts is disclosed in a patent application document with publication number CN115330782A. The method includes: obtaining a top view image of the ice box injection molded part to obtain a corresponding binary image; obtaining an edge image of the binary image, and rotating and rectifying the edge image to obtain a rectifying image; obtaining a ridge area in the rectifying image, judging whether there is a defect in the ridge area, and based on the judgment result and the run length of the grayscale run matrix corresponding to the ridge area, selecting a corresponding one-dimensional structural element type to perform a morphological operation on the ridge area to obtain a new image, and performing an XOR operation on the new image and the binary image to obtain a defect image; obtaining a defect connected domain based on the defect image, and taking the product of the number and area of the defect connected domain as a defect detection index.
[0004] However, since injection molded parts usually have text marks, and the edge features of the text marks are relatively obvious, they are usually detected as edges. When analyzing the edge image to obtain the defect image, the above solution does not take into account the influence of the edge of the text marks, thereby affecting the accuracy of the determined defect image and reducing the accuracy of the defect detection results. Summary of the Invention
[0005] In order to solve the problem of being unable to accurately detect defects on the surface of injection-molded parts, the present invention provides a pipe injection molding monitoring method and system.
[0006] According to a first aspect of the present invention, a method for monitoring injection molding of a pipe fitting is provided, comprising:
[0007] Acquire the image of the injection molded pipe to be tested;
[0008] Perform edge detection on the image to be tested and filter closed edges. Take any closed edge as the target edge. Use the corner points on the target edge to divide the target edge into multiple edge segments. Obtain the matching edge segments of each edge segment through translation operation and calculate the translation overlap of the target edge. : ; For the The translation distance from an edge segment to a matching edge segment; is the number of pixels in the edge segment; is the number of pixels that the edge segment overlaps with the matching edge segment; The preset maximum translation distance; is the natural exponential function; is the number of edge segments of the target edge;
[0009] Calculate the probability that the target edge is a defect edge : ; is the first complexity of the target edge, representing the roughness of the edge segment in the target edge; is the second complexity of the target edge, representing the complexity of the target edge shape; is a function that returns the minimum value; is the translation overlap of the target edge; is the flatness of the connected domain of the target edge, representing the distribution characteristics of the grayscale value in the connected domain;
[0010] Closed edges whose corresponding defective edge probability is less than a preset threshold are removed, and defects of the injection molded pipe are monitored based on the remaining edges.
[0011] The present invention calculates the probability of each closed edge being a defect edge by integrating various data, thereby ensuring the accuracy of the calculated probability of defect edges. By removing closed edges whose corresponding probability of defect edges is less than a preset threshold, it is possible to avoid misjudging edges marked with text as defect edges, thereby improving the accuracy of defect results and realizing precise monitoring of the injection molding process of injection molded pipe fittings.
[0012] Preferably, after edge detection is performed on the image to be tested, the method further comprises:
[0013] For any non-closed edge, determine whether there is another endpoint of the non-closed edge or any endpoint of the remaining edges within a preset neighborhood range of any endpoint of the non-closed edge;
[0014] If it exists, any endpoint of the closed edge is connected to the endpoint within the neighborhood to form a closed edge, so as to screen all closed edges based on the closed edges obtained by edge detection and the closed edges obtained by the connection operation.
[0015] The present invention connects some non-closed edges into closed edges through a connection operation, which can eliminate the situation where the edges of the text logo are broken due to the existence of noise or other factors, ensures that the edges of the text logo are all closed edges, and enables the screened edges to cover the edges of all text logos.
[0016] Preferably, the method for obtaining the first complexity of the target edge includes:
[0017] Calculate the roughness of any edge segment in the target edge, satisfying the following relationship:
[0018] ;
[0019] Where, For the The roughness of each edge segment; For the The average curvature of the edge segments; 、 Respectively The edge segment pixels and the The curvature of each pixel; For the The edge segment Pixels and The angle difference of the gradient direction of each pixel; is the trigonometric sine function; is the absolute value symbol; For the The number of pixels in an edge segment; is a natural exponential function; the average roughness of all edge segments in the target edge is taken as the first complexity of the target edge.
[0020] The present invention can accurately measure the roughness of each closed edge, so that different edge types can be judged by utilizing the feature that the edge of a text mark is relatively smooth while the edge of a defect is relatively rough.
[0021] Preferably, the second complexity of the target edge satisfies the following relationship:
[0022] ;
[0023] Where, is the second complexity of the target edge; is the number of corner points on the target edge; is the maximum number of corner points in each closed edge; is the area of the connected domain of the target edge; is the area of the circumscribed circle of the target edge; is the area of the circumscribed rectangle of the target edge; is the length of the target edge.
[0024] The present invention integrates various data to calculate the second complexity of each closed edge, which can accurately measure the complexity of the shape of each closed edge, so as to judge different edge types by using the difference in shape between the edge marked with text and the edge of the defect.
[0025] Preferably, the method for obtaining the flatness of the connected domain of the target edge includes:
[0026] Divide the connected domain of the target edge into multiple blocks according to the preset window size, calculate the difference between the maximum grayscale value and the minimum grayscale value of the pixel points in each block, and obtain the range of the grayscale value in the corresponding block;
[0027] According to the preset rules, the value range of pixel grayscale values is divided into several grayscale levels, the entropy value of the grayscale in all regional blocks is obtained, and the flatness of the connected domain of the target edge is calculated. The flatness is negatively correlated with the entropy value and the average value of the extreme difference of the grayscale values in all regional blocks.
[0028] Preferably, before calculating the flatness, the method further comprises:
[0029] Normalization is performed on the range of the grayscale value in each area block to obtain a normalized value of the range of the grayscale value in the corresponding area block, and the flatness is calculated based on the average value of the normalized values of the range of the grayscale value in all area blocks.
[0030] The present invention standardizes the range of grayscale values in each area block and limits the range of the range to 0-1, thereby avoiding the problem of inconsistent processing caused by excessive differences in grayscale value ranges in different area blocks and ensuring the accuracy of flatness.
[0031] Preferably, monitoring defects of the injection molded pipe based on the remaining edge includes:
[0032] After removing closed edges whose corresponding defective edges have a probability less than a preset threshold, the number of remaining edges is counted. If the number of edges is greater than the preset threshold, it is determined that the injection molded pipe has defects; or
[0033] The areas of the connected domains of the remaining edges are counted and summed. If the accumulated sum is greater than a preset area threshold, it is determined that the injection molded pipe has defects.
[0034] According to a second aspect of the present invention, a pipe injection molding monitoring system is provided. The system includes a memory and a processor. The memory stores a computer program. The processor executes the computer program to implement the steps of the first aspect of the present invention.
[0035] The present invention has the following effects:
[0036] 1. When the present invention uses the edge detection algorithm to perform defect detection on injection molded pipe fittings, it can eliminate the influence of the edge of the text mark on the defect detection effect, thereby improving the accuracy of defect detection and realizing accurate detection of the injection molding process of injection molded pipe fittings.
[0037] 2. The present invention calculates the probability that each closed edge is a defective edge by integrating various data, which can ensure the accuracy of the calculated probability, so that the edges of the text logo can be accurately screened out based on the preset threshold, so that the edges of the text logo can be effectively removed from the edge detection results.
[0038] 3. The present invention utilizes the characteristic that the edges of the text logo are closed edges and selects the closed edges for analysis, thereby covering the edges of all the text logos while reducing the number of edges to be processed. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an illustrative and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0040] Figure 1 This is a schematic flow chart of the steps of a pipe injection molding monitoring method according to an embodiment of the present invention;
[0041] Figure 2 Schematic diagram of the corner points of the edge of a text mark in an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.
[0043] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0044] Reference Figure 1 A pipe injection molding monitoring method includes steps S1 to S4, specifically as follows:
[0045] S1: Acquire the image of the injection molded pipe to be tested.
[0046] Specifically, the front image of the injection molded pipe body can be captured using a camera in the injection molded pipe inspection system, and then the front image can be divided into the pipe area and the background area using a semantic segmentation algorithm or a global threshold method, and the pipe area can be used as the image to be tested.
[0047] S2: Perform edge detection on the image to be tested and filter closed edges. Take any closed edge as the target edge, divide the target edge into multiple edge segments using the corner points on the target edge, obtain the matching edge segments of each edge segment through translation operation, and calculate the translation overlap of the target edge.
[0048] It should be noted that the surface of injection-molded pipes generally has a smooth shape, while defects (such as cracks, bubbles, surface unevenness, and cracks) often appear as local irregular shapes or protrusions, resulting in strong edge gradients. Therefore, extracting edges in the image through edge detection algorithms can effectively capture the edges of defects, thereby identifying defects in injection-molded pipes based on the detected edges.
[0049] However, injection molded pipes often have text markings, and the edges of the text markings are more distinct. This can cause edge detection algorithms to misidentify the edges of the text markings as defect edges, affecting the accuracy of defect detection results. Therefore, the present invention calculates multiple indicators to distinguish the types of detected edges, thereby eliminating the impact of the presence of text markings on defect detection results and improving defect detection results.
[0050] In an exemplary embodiment of the present invention, a closed edge refers to an edge that can constitute a connected domain. It should be noted that since the text logo is a three-dimensional structure, the edges of the text logo are often closed edges. Therefore, screening the closed edges for analysis can reduce the number of edges to be processed while covering the edges of all text logos.
[0051] A matching edge segment is the edge segment with the greatest number of overlapping pixels with any remaining edge segment. Translational overlap measures the degree of matching between edge segments and serves as a metric for distinguishing the edges of text marks from those of defects. It should be noted that the edges of text marks are often regular in shape, with relatively more overlap between edge segments, whereas the edges of defects are often irregular in shape, with relatively less overlap between edge segments. Therefore, the present invention utilizes this characteristic to calculate the translational overlap of any closed edge, thereby distinguishing between the edges of text marks and those of defects.
[0052] Optionally, edge detection can be performed on the image to be tested using a Canny edge detection algorithm or a Sobel algorithm, thereby obtaining all edges in the image to be tested. This embodiment does not specifically limit the type of edge detection algorithm selected.
[0053] In an exemplary embodiment of the present invention, after edge detection is performed on the image to be detected, the following steps are further included:
[0054] For any non-closed edge, determine whether there is another endpoint of the non-closed edge or any endpoint of the remaining edges within a preset neighborhood range of any endpoint of the non-closed edge; if so, connect any endpoint of the closed edge with the endpoint within the neighborhood range to form a closed edge, so as to screen all closed edges based on the closed edges obtained by edge detection and the closed edges obtained by the connection operation.
[0055] It should be noted that during the edge detection process, there may be noise or other factors that may cause the connection of the edges of the text logo to be broken. Therefore, the present invention performs a connection operation on some non-closed edges, so as to ensure that the edges of the text logo are all closed edges, so that the screened edges can cover the edges of all text logos, so as to perform further analysis based on the screened edges.
[0056] Among them, the non-closed edge refers to the edge that cannot form a connected domain; for any non-closed edge, the remaining edges refer to the edges of all edges except the non-closed edge.
[0057] Optionally, the preset neighborhood range can be set to a 24-neighborhood range, so that some non-closed edges can be connected to form closed edges based on the presence of endpoints within the 24-neighborhood range of any endpoint of each non-closed edge. This embodiment does not specifically limit the size of the neighborhood range.
[0058] Furthermore, after connecting some of the unclosed edges, all closed edges can be screened and any closed edge can be selected as a target edge. Corner point detection can then be performed on the target edge, thereby dividing the target edge into multiple edge segments based on all the corner points obtained. It should be noted that the corner point detection process is a conventional technique and will not be described in detail in this embodiment.
[0059] Exemplary, reference Figure 2 As shown, after all corner points on the target edge are determined, the line between any two corner points can be used as an edge segment of the target edge, thereby obtaining all edge segments of the target edge.
[0060] Next, the process of obtaining matching edge segments for each edge segment through translation operation is described in detail:
[0061] For each edge segment of the target edge, the Sobel operator is first used to calculate the gradient direction of each pixel on any edge segment. Then, the average angle value of the angle between the gradient directions of all pixel points and the horizontal direction is calculated, and the direction with the average angle value to the horizontal direction is used as the translation direction. The translation operation is performed on each edge segment. When any edge segment overlaps with other edge segments, the number of overlapping pixels is counted, and the data segment with the largest number of overlapping pixels is used as the matching edge segment of the corresponding edge segment, and the translation distance between each edge segment and the corresponding matching edge segment is marked.
[0062] Furthermore, after determining the matching edge segments of each edge segment in the target edge, the translation overlap of the target edge can be calculated. Specifically, the translation overlap of the target edge satisfies the following relationship:
[0063] ;
[0064] Where, is the translation overlap of the target edge; For the The translation distance from an edge segment to a matching edge segment; is the number of pixels in the edge segment; is the number of pixels that the edge segment overlaps with the matching edge segment; To preset the maximum translation distance, in this embodiment It should be noted that the maximum translation distance can be set according to the resolution of the image to be measured or the size of the text mark on the injection molded tube. This embodiment does not specifically limit the maximum translation distance. is a natural exponential function, where the natural exponential function refers to a function with a natural constant An exponential function with base ; is the number of edge segments of the target edge.
[0065] Among them, when When it is smaller, it indicates The distance between the edge segment and the matching edge segment is small, which further indicates that the translation overlap of the target edge is relatively large, and the corresponding target edge is more likely to be the edge of a text logo.
[0066] Reflects the The ratio of the overlap between the edge segment and the matching edge segment. The larger the value, the better. The more pixels that overlap between an edge segment and a matching edge segment, the higher the translation overlap of the target edge is, and the greater the possibility that the corresponding target edge is the edge of a text logo.
[0067] S3: Calculate the probability that the target edge is a defect edge.
[0068] Specifically, the probability that the target edge is a defect edge can be calculated by the following steps:
[0069] Step 1: Calculate the first complexity of the target edge, where the first complexity represents the roughness of the edge segment in the target edge;
[0070] In an exemplary embodiment of the present invention, the determination of the first complexity of the target edge may be achieved by the following steps:
[0071] The roughness of any edge segment in the target edge is calculated, and the average roughness of all edge segments in the target edge is taken as the first complexity of the target edge.
[0072] Specifically, the roughness of any edge segment in the target edge satisfies the following relationship:
[0073] ;
[0074] Where, For the The roughness of each edge segment; For the The average curvature of the edge segments; 、 Respectively The edge segment pixels and the The curvature of each pixel; For the The edge segment Pixels and The angle difference of the gradient direction of each pixel; is the trigonometric sine function; is the absolute value symbol; For the The number of pixels in an edge segment; is the natural exponential function.
[0075] in, The smaller the The straighter the edge segment, the smaller the roughness of the corresponding edge segment; Reflects the The difference in curvature of adjacent pixels on an edge segment. The smaller the value, the closer the curvature of adjacent pixels on the edge segment, which means the straighter the edge segment is and the smaller the roughness of the edge segment is. The smaller it is, the closer the gradient directions of any two adjacent pixels on the edge segment are, which means that the edge segment is smoother and the corresponding roughness of the edge segment is smaller.
[0076] Optionally, when the first complexity of the target edge is small, it means that the target edge is a smooth edge, while the edge of a text logo is often relatively smooth, and the edge of a defect usually appears as an edge with strong irregularity and high complexity, that is, there are irregular protrusions, depressions or other features, and it is relatively rough; therefore, when the first complexity of the target edge is small, the target edge is more likely to be the edge of a text logo.
[0077] Step 2: Calculate the second complexity of the target edge, which represents the complexity of the target edge shape;
[0078] Specifically, the second complexity of the target edge satisfies the following relationship:
[0079] ;
[0080] Where, is the second complexity of the target edge; is the number of corner points on the target edge; is the maximum number of corner points in each closed edge; is the area of the connected domain of the target edge; is the area of the circumscribed circle of the target edge; is the area of the circumscribed rectangle of the target edge; is the length of the target edge.
[0081] in, The larger the value is, the greater the number of corner points on the target edge is, which means the shape of the target edge is more complex. Although the edge of the defect is not smooth, the closed edge of the defect is often close to a circle and the shape complexity is low. Therefore, when When it is larger, it means that the target edge is more likely to be the edge of a text mark.
[0082] It reflects the proportion of the target edge in the circumscribed graphics. The smaller the value, the more likely the target edge is a text mark. It should be noted that the closed edge of a defect is often close to a circle and relatively compact, and its proportion in the circumscribed graphics is relatively large, while the shape of a text mark is more complex and the structure is relatively sparse, and its proportion in the circumscribed graphics is relatively small. Therefore, the smaller the proportion of the target edge in the circumscribed graphics, the more likely the target edge is a text mark.
[0083] It reflects the degree of deviation between the shape of the target edge and the circle. The value range is 0-1. When the value is 1, it means that the shape of the target edge is circular, which means that the target edge is more likely to be a defective edge. The smaller the value, the greater the deviation between the shape of the target edge and the circle, which means that the target edge is more likely to be an edge with a text mark.
[0084] Optionally, when the second complexity of the target edge is greater, it indicates that the shape of the target edge is more complex, and the corresponding target edge is more likely to be an edge of a text mark.
[0085] Step 3: Calculate the smoothness of the connected domain of the target edge. The smoothness represents the distribution characteristics of the grayscale value in the connected domain of the target edge.
[0086] In an exemplary embodiment of the present invention, the flatness of the connected domain of the target edge can be determined by the following steps:
[0087] (1) Divide the connected domain of the target edge into multiple blocks according to the preset window size, calculate the difference between the maximum grayscale value and the minimum grayscale value of the pixel points in each block, and obtain the range of the grayscale value in the corresponding block;
[0088] For example, the window size can be set to 3×3, and then the connected domain of the target edge can be divided into multiple area blocks using the 3×3 window. This embodiment does not impose any special limitation on the size of the window.
[0089] Optionally, the range of grayscale values within any region block can reflect the value range of the grayscale values within the region block. A larger range indicates a larger variation in the grayscale values within the region block, and further indicates that the smoothness within the region block is poor.
[0090] (2) According to the preset rules, the grayscale value range of the pixel point is divided into several gray levels, the entropy value of the gray levels in all regional blocks is obtained, and the smoothness of the connected domain of the target edge is calculated. The smoothness is negatively correlated with the entropy value and the average value of the extreme difference of the grayscale values in all regional blocks.
[0091] Optionally, 8 grayscale values can be used as a grayscale level, thereby dividing the pixel grayscale value range of 0-255 into 32 grayscale levels, that is, 0-7 is grayscale level 1, 8-15 is grayscale level 2, and so on, to obtain grayscale level 32 of 248-255. This embodiment does not specifically limit the grayscale division method.
[0092] In an exemplary embodiment of the present invention, before calculating the flatness of the connected domain of the target edge, the following steps are further included:
[0093] Normalization is performed on the range of the grayscale value in each area block to obtain a normalized value of the range of the grayscale value in the corresponding area block, and the flatness is calculated based on the average value of the normalized values of the range of the grayscale value in all area blocks.
[0094] Specifically, the flatness of the connected domain of the target edge satisfies the following relationship:
[0095] ;
[0096] Where, is the flatness of the connected domain of the target edge; 、 Respectively The maximum grayscale value and the minimum grayscale value of the pixels in the area block; is the number of regional blocks in the connected domain of the target edge; Grayscale The probability of appearing in all area blocks; is the logarithmic function with base 2.
[0097] in, Reflects the normalized value of the extreme grayscale value in any area block; It reflects the entropy value of the gray levels in all regional blocks. The smaller the value, the more concentrated the gray values in all regional blocks are distributed and the smaller the change is, which further indicates that the connected domain of the target edge is smoother.
[0098] In another embodiment, other methods can be used to normalize the grayscale value range in any area block, such as normalizing by the maximum pixel value instead of the maximum pixel value. The function performs normalization.
[0099] Optionally, when the flatness of the connected domain of the target edge is relatively large, it indicates that the target edge is more likely to be an edge of a text mark.
[0100] Step 4: Calculate the probability that the target edge is a defect edge by combining the translation overlap, the first complexity, the second complexity, and the flatness of the connected domain of the target edge.
[0101] Specifically, the probability that the target edge is a defect edge satisfies the following relationship:
[0102] ;
[0103] Where, is the probability that the target edge is a defect edge; is the first complexity of the target edge; is the second complexity of the target edge; is a function that returns the minimum value; is the translation overlap of the target edge; is the flatness of the connected domain of the target edge.
[0104] Optionally, when the first complexity of the target edge is smaller, it indicates that the target edge is a smooth and straight edge, and the target edge is more likely to be an edge of a text mark, and the corresponding probability of the target edge being a defective edge is lower.
[0105] When the second complexity of the target edge is greater, it means that the shape of the target edge is more complex, and the target edge is more likely to be an edge of a text mark, and the corresponding probability of the target edge being a defective edge is lower.
[0106] When the translation overlap of the target edge is large, it means that each edge segment in the target edge can match more pixel points after the translation operation, which further indicates that the shape of the target edge is relatively regular. In this case, the target edge is more likely to be the edge of a text logo, and the corresponding probability of the target edge being a defective edge is low.
[0107] When the flatness of the connected domain of the target edge is large, it means that the difference between the pixels in the connected domain of the target edge is small and the pixel values of the pixels are close, which further indicates that the connected domain of the target edge is relatively flat. In this case, the target edge is more likely to be an edge of a text mark, and the corresponding probability of the target edge being a defective edge is low.
[0108] S4: removing closed edges whose corresponding probability of being defective edges is less than a preset threshold, and monitoring abnormalities of the injection molded pipe based on the remaining edges.
[0109] In an exemplary embodiment of the present invention, monitoring of abnormalities of injection molded pipes can be achieved by the following steps:
[0110] After removing closed edges whose corresponding defective edge probability is less than a preset threshold, the number of remaining edges is counted. If the number of edges is greater than the preset threshold, the injection molded tube is determined to have a defect. Alternatively, the areas of the connected domains of the remaining edges are counted and summed. If the cumulative sum is greater than the preset area threshold, the injection molded tube is determined to have a defect.
[0111] Optionally, the preset threshold value can be set to 0.4, the preset quantity threshold value can be set to 10, and the preset area threshold value can be set to the surface area of the injection molded pipe. When the probability that any closed edge is a defective edge is less than 0.4, the closed edge can be determined to be the edge of the text mark, and the number of remaining edges can be counted. If the number of remaining edges is greater than 10, it is determined that the injection molded pipe has defects; or the cumulative sum of the areas of the connected domains of the remaining edges can be counted. When the cumulative sum is greater than the surface area of the injection molded pipe, When , it is determined that the injection molded pipe has defects. This embodiment does not impose any special restrictions on the value of each threshold.
[0112] Furthermore, when it is determined that an injection molded pipe fitting has defects, an alarm can be issued to remind the staff to check the injection molding equipment or adjust the parameters, thereby ensuring the production quality of the injection molded pipe fitting.
[0113] It should be noted that, due to the correlation between various links in the production process of injection-molded pipe fittings, when defects appear continuously on the pipe, it is likely that there is a problem with the injection molding instrument. The injection molding instrument plays a vital role in the pipe molding process. If the instrument fails, such as due to wear or aging of certain components, it may cause repeated problems in pipe production. In addition, improper setting of injection molding parameters may also lead to similar defects. For example, unreasonable settings of parameters such as injection molding temperature, pressure, and injection molding speed may cause problems such as uneven surface and uneven wall thickness of the pipe during the molding process. Therefore, when it is determined that there are defects in injection-molded pipe fittings, it is necessary to promptly inspect the injection molding instrument and adjust the instrument parameters based on the inspection results.
[0114] The present invention also provides a pipe injection molding monitoring system, which includes a memory and a processor, and a computer program is stored in the memory. The computer program integrates the functions of a pipe injection molding monitoring method. When the computer program is executed, the accuracy of defect detection can be improved through a pipe injection molding monitoring method.
[0115] In the description of this specification, "multiple" and "several" mean at least two, such as two, three or more, unless otherwise clearly defined.
[0116] While several embodiments of the present invention have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Numerous modifications, variations, and alternatives will occur to those skilled in the art without departing from the concept and spirit of the present invention. It should be understood that various alternatives to the embodiments of the present invention described herein may be employed in practicing the present invention.
Claims
1. A pipe injection molding monitoring method, characterized in that: include: Acquire the image of the injection molded pipe to be tested; Perform edge detection on the image to be tested and filter closed edges. Take any closed edge as the target edge. Use the corner points on the target edge to divide the target edge into multiple edge segments. Obtain the matching edge segments of each edge segment through translation operation and calculate the translation overlap of the target edge. : ; For the The translation distance from an edge segment to a matching edge segment; For the The number of pixels in an edge segment; For the The number of pixels where the edge segment overlaps with the matching edge segment; The preset maximum translation distance; is the natural exponential function; is the number of edge segments of the target edge; The smaller the The smaller the distance between the edge segment and the matching edge segment, the greater the translation overlap of the target edge, and the greater the possibility that the corresponding target edge is the edge of the text logo; Reflect the The ratio of the overlap between the first edge segment and the matching edge segment. The larger the value, the The more pixels that overlap between the edge segment and the matching edge segment, the higher the translation overlap of the target edge, and the greater the possibility that the corresponding target edge is the edge of the text logo; Calculate the probability that the target edge is a defect edge : ; The first complexity of the target edge represents the roughness of the edge segment in the target edge. The smaller the value, the greater the possibility that the target edge is the edge of a text mark. The second complexity of the target edge represents the complexity of the target edge shape. The larger the value, the more complex the shape of the target edge, and the greater the possibility that the corresponding target edge is the edge of the text mark; is a function that returns the minimum value; is the translation overlap of the target edge; The flatness of the connected domain of the target edge represents the distribution characteristics of the grayscale value in the connected domain. The larger the value, the greater the possibility that the target edge is the edge of the text mark; Closed edges whose corresponding defective edge probability is less than a preset threshold are removed, and defects of the injection molded pipe are monitored based on the remaining edges.
2. A pipe injection molding monitoring method according to claim 1, characterized in that: After performing edge detection on the image to be detected, the method further includes: For any non-closed edge, determine whether there is another endpoint of the non-closed edge or any endpoint of the remaining edges within a preset neighborhood range of any endpoint of the non-closed edge; If it exists, any endpoint of the non-closed edge is connected to the endpoint within the neighborhood to form a closed edge, so as to screen all closed edges based on the closed edges obtained by edge detection and the closed edges obtained by the connection operation.
3. A pipe injection molding monitoring method according to claim 2, characterized in that: A method for obtaining the first complexity of a target edge includes: Calculate the roughness of any edge segment in the target edge, satisfying the following relationship: ; Where, For the The roughness of each edge segment; For the The average curvature of the edge segments; 、 Respectively The edge segment pixels and the The curvature of each pixel; For the The edge segment Pixels and The angle difference of the gradient direction of each pixel; is the trigonometric sine function; is the absolute value symbol; For the The number of pixels in an edge segment; is a natural exponential function; the average roughness of all edge segments in the target edge is taken as the first complexity of the target edge.
4. A pipe injection molding monitoring method according to claim 2, characterized in that: The second complexity of the target edge satisfies the following relationship: ; Where, is the second complexity of the target edge; is the number of corner points on the target edge; is the maximum number of corner points in each closed edge; is the area of the connected domain of the target edge; is the area of the circumscribed circle of the target edge; is the area of the circumscribed rectangle of the target edge; is the length of the target edge.
5. A pipe injection molding monitoring method according to claim 2, characterized in that: The method for obtaining the flatness of the connected domain of the target edge includes: Divide the connected domain of the target edge into multiple blocks according to the preset window size, calculate the difference between the maximum grayscale value and the minimum grayscale value of the pixel points in each block, and obtain the range of the grayscale value in the corresponding block; According to the preset rules, the value range of pixel grayscale values is divided into several grayscale levels, the entropy value of the grayscale in all regional blocks is obtained, and the flatness of the connected domain of the target edge is calculated. The flatness is negatively correlated with the entropy value and the average value of the extreme difference of the grayscale values in all regional blocks.
6. A pipe injection molding monitoring method according to claim 5, characterized in that: Before calculating the flatness, the method also includes: Normalization is performed on the range of the grayscale value in each area block to obtain a normalized value of the range of the grayscale value in the corresponding area block, and the flatness is calculated based on the average value of the normalized values of the range of the grayscale value in all area blocks.
7. A pipe injection molding monitoring method according to claim 1, characterized in that: Monitoring defects in injection molded tubes based on the remaining edge, including: After removing closed edges whose corresponding defective edges have a probability less than a preset threshold, the number of remaining edges is counted. If the number of edges is greater than the preset threshold, it is determined that the injection molded pipe has defects; or The areas of the connected domains of the remaining edges are counted and summed. If the accumulated sum is greater than a preset area threshold, it is determined that the injection molded pipe has defects.
8. A pipe injection molding monitoring system, characterized in that: A pipe injection molding monitoring system includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of a pipe injection molding monitoring method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Morphology-based ice-making box injection molding part defect detection method
CN115330782A
Plunger bulb contour detection method and device
CN120107297A
Defect detection method and device for an LCD screen
US20230326006A1