Intelligent visual defect detection method for plastic product production

By constructing a sparse topologically constrained texture reference structure and a texture neighborhood self-correction mechanism, the problem of insufficient accuracy and reliability in weld detection in existing technologies is solved, and efficient and accurate identification and location of defects in weld areas are achieved.

CN121883378BActive Publication Date: 2026-07-24HUNAN LIXIN PLASTIC INFLATABLE PROD CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUNAN LIXIN PLASTIC INFLATABLE PROD CO LTD
Filing Date
2025-12-19
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing technologies for inspecting weld seams in plastic products lack in-depth analysis of the inherent flow patterns of weld seam materials, resulting in insufficient accuracy and reliability of inspection results. It is difficult to distinguish between natural texture fluctuations formed by normal fusion of materials and real defect characteristics, leading to frequent false detections and missed detections.

Method used

A texture baseline structure with sparse topological constraints is constructed. By deconstructing local texture primitives and predicting topological structures, texture anomalous regions in the weld area are identified, and the real defect regions are determined based on the texture neighborhood self-correction mechanism.

Benefits of technology

It significantly improves the accuracy and stability of weld defect detection, ensures the precision of defect feature identification and the reliability of defect area location, and meets the real-time and accurate detection requirements for weld quality in actual production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121883378B_ABST
    Figure CN121883378B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of industrial visual inspection, and discloses a kind of intelligent visual defect detection methods for plastic product production, comprising: based on the continuous texture direction formed by fusion material itself in the weld area image, texture reference structure with sparse topological constraint is constructed;According to the texture reference structure, the weld area image is locally textured element deconstruction, and the texture element space layout embedded in the texture reference structure constraint is obtained;According to the texture reference structure, the topological structure of the texture element space layout in the weld area image is predicted, and the topological abnormal area meeting the texture neighborhood self-correction mechanism is determined;According to the spatial topological correlation between the topological abnormal area and the texture reference structure, the real defect area is extracted;The application realizes the accurate and reliable detection of the defect of the weld area of the plastic product by texture topological structure constraint and spatial layout self-correction, effectively improves the stability and accuracy of the weld quality control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial visual inspection technology, and more specifically, to an intelligent visual defect detection method for plastic product manufacturing. Background Technology

[0002] In the plastics manufacturing industry, the quality of the weld seam area on the product surface has a crucial impact on the product's appearance, strength, and performance. However, current quality inspection of the weld seam area in plastic products mainly relies on manual visual inspection or simple image processing methods, which suffers from low inspection efficiency, unstable results, and insufficient accuracy, making it difficult to meet the real-time, stable, and accurate requirements of high-efficiency production lines for weld quality inspection.

[0003] Existing image processing-based weld defect detection methods mostly focus only on grayscale feature changes in the weld area, ignoring the complex texture topology generated during the fusion of weld materials. This makes it difficult to distinguish between natural texture fluctuations formed during normal material fusion and actual defect features, leading to frequent false positives and false negatives. Furthermore, because the material flow during weld formation in plastic products has clear physical constraints, current technologies lack in-depth analysis and effective utilization of the inherent flow laws of weld materials, severely limiting the accuracy and reliability of detection results and preventing precise localization of defects in the weld area.

[0004] Therefore, how to establish an intelligent visual inspection method that can fully integrate the topological structure features and local spatial layout characteristics of weld texture based on the inherent physical characteristics of weld material fusion, so as to improve the accuracy and stability of weld area defect detection, has become an important technical issue that urgently needs to be solved in this field. Summary of the Invention

[0005] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide an intelligent visual defect detection method for plastic product manufacturing.

[0006] To achieve the above objectives, the present invention provides the following technical solution: A method for intelligent visual defect detection in the production of plastic products, the method comprising: The weld seam area image of the plastic product is obtained, and a texture reference structure with sparse topological constraints is constructed based on the continuous texture direction formed by the fused material itself in the weld seam area image. Based on the texture reference structure, the local texture primitives of the weld area image are deconstructed to obtain a texture primitive spatial layout embedded with the texture reference structure constraints. Based on the texture reference structure, the topological structure of the spatial layout of texture primitives in the weld area image is predicted to identify the topologically abnormal regions that satisfy the texture neighborhood self-correction mechanism. Based on the spatial topological association between the topological anomaly region and the texture reference structure, the topological anomaly region that does not satisfy the inherent fusion constraint of the weld is extracted as the real defect region and the position of the real defect region is output.

[0007] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention constructs a texture reference structure with sparse topological constraints, transforming the continuous texture direction of the material itself in the weld area of ​​plastic products into a stable texture topological reference. This effectively avoids the false detection and missed detection phenomena caused by traditional methods that rely solely on grayscale changes, and significantly improves the accuracy and stability of defect detection in the weld area.

[0008] This invention achieves refined decomposition of local texture features in the weld area by embedding texture reference structure constraints in the spatial layout of texture primitives. It can keenly capture the subtle differences between texture anomalies and normal fusion textures, ensuring the accuracy of defect feature identification and overcoming the problem that traditional detection methods cannot effectively distinguish between natural fusion textures and real defects in materials.

[0009] This invention uses a texture neighborhood self-correction mechanism to predict the topological structure of texture primitive layout, quickly and accurately determine topologically abnormal regions, and precisely extract the location of real defect regions under the constraint of spatial topological correlation, which greatly improves the reliability and reproducibility of defect region positioning and meets the needs of real-time and accurate detection of weld quality in actual production. Attached Figure Description

[0010] Figure 1 The flowchart of an intelligent visual defect detection method for plastic product manufacturing provided by the present invention. Detailed Implementation

[0011] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0012] Example 1 Please see Figure 1 As shown in the figure, this embodiment discloses a method for intelligent visual defect detection in the production of plastic products, the method comprising: S101: Obtain an image of the weld area of ​​the plastic product, and construct a texture reference structure with sparse topological constraints based on the continuous texture direction formed by the fusion material itself in the weld area image. Specifically, the process of constructing the texture reference structure includes: By tracing continuous texture ridges along the weld extension direction in the weld area image, a set of texture trajectories reflecting the fusion propagation trajectory is obtained; In practice, continuous texture ridges in the weld area image are defined as pixel lines composed of local maxima of grayscale gradient amplitude along the weld fusion direction. These texture ridges directly correspond to the material flow path during plastic fusion. The tracking process is implemented using local grayscale gradient analysis and pixel-by-pixel tracking methods. First, the pixel whose grayscale gradient magnitude is a local maximum is used as the initial tracking starting point for the texture ridge; Secondly, along the dominant local texture direction at the initial point, the position of the next adjacent pixel is traced forward pixel by pixel; Then, the grayscale gradient magnitude of the next adjacent pixel is determined. If the grayscale gradient magnitude is greater than or equal to a pre-set specific grayscale gradient threshold, the pixel position is added to the current texture ridge and tracking continues. If the grayscale gradient magnitude of the next adjacent pixel is less than the grayscale gradient threshold, the tracking of the current ridge is stopped. Finally, when a texture ridge is traced, the number of consecutive pixels of the texture ridge is counted. If the number of consecutive pixels is greater than or equal to the minimum effective length set (e.g., 20 pixels), the texture ridge is determined to be valid and added to the texture trajectory set; if the number of consecutive pixels is less than the minimum effective length, the texture ridge is discarded.

[0013] For example, assuming the preset grayscale gradient threshold is 50 and the shortest effective length is 20 pixels, if the number of consecutive pixels of a certain texture ridge is 25 pixels and the gradient magnitude of all pixels is greater than or equal to 50, then the texture ridge is valid and added to the set; if another ridge is only 15 pixels long, it is discarded.

[0014] Based on the spatial extension and bifurcation relationships of each texture trajectory in the texture trajectory set, a trajectory association graph describing the connection pattern of texture trajectories is constructed; The process of constructing the trajectory association graph includes: Based on the relative spatial position of texture trajectories in the weld area image, the adjacent candidate relationships between each texture trajectory are determined; In practice, for each pair of texture trajectories in the texture trajectory set, the spatial Euclidean distance between the endpoints of the two texture trajectories is calculated. If the calculated Euclidean distance is less than or equal to a pre-set specific adjacent distance threshold (e.g., 5 pixels), the two texture trajectories are considered to have an adjacent candidate relationship; otherwise, the relationship is not considered to exist.

[0015] For example, the endpoint coordinates of texture trajectory A are (100, 120), and the endpoint coordinates of texture trajectory B are (103, 122). The distance between their endpoints is calculated to be approximately 3.61 pixels, so A and B are considered to have an adjacent candidate relationship. If the endpoint coordinates of texture trajectory C are (110, 135), and the distance between the endpoints of trajectory A and C is approximately 18 pixels, then A and C do not have an adjacent candidate relationship.

[0016] By combining the continuity of the extension direction of the texture trajectory in the adjacent candidate relationship, the adjacent candidate relationship is filtered for directional continuity; In practice, for any two texture trajectories that have an adjacent candidate relationship, the absolute value of the angle between the extension direction vectors of the two texture trajectories at their endpoints is calculated. If the calculated angle is less than or equal to a specific set angle threshold (e.g., set to 10°), the adjacent candidate relationship is retained; if the angle is greater than 10°, the adjacent candidate relationship is deleted.

[0017] For example, if the angle between the endpoint extension directions of trajectory A and trajectory B is 8°, then the adjacent candidate relationship between A and B is retained; if the angle between the endpoint extension directions of trajectory A and trajectory D is 12°, then the adjacent candidate relationship is deleted.

[0018] Adjacent candidate relationships filtered by directional continuity are organized into a trajectory association graph to represent the connection pattern between texture trajectories; In practice, after the above-mentioned directional continuity screening, each texture trajectory is used as a node in the trajectory association graph, and each retained adjacent candidate relationship is used as a connecting edge in the trajectory association graph, thus forming a complete graph structure containing multiple nodes and connecting edges, which clearly expresses the connection relationship between texture trajectories.

[0019] The connection relationships with back extension or multiple redundant branches in the trajectory association graph are trimmed, and the connection relationships that match the unidirectional fusion propagation characteristics of the weld are retained to obtain a texture reference structure with sparse topological constraints. In practice, "return extension connection" is defined as a closed loop structure formed in the trajectory association graph, and "multiple redundant forks" is defined as a structure in which a single node has at least three connecting edges simultaneously. The specific processing includes: For the back-extended connection, the depth-first search algorithm (DFS) is first used to identify all closed loop structures. After each loop structure is identified, the shortest connecting edge is deleted to break the closed loop structure. For a multi-redundant fork structure, for a node with three or more connecting edges, retain the connecting edge with the longest connection length and delete the connecting edges with shorter lengths to ensure that each node has at most two connecting edges. For example, if a closed loop in the trajectory association graph contains three connecting edges with lengths of 15, 20, and 25 pixels respectively, then the shortest connecting edge of 15 pixels is deleted; if a node has three connecting edges with lengths of 30, 35, and 40 pixels respectively, then the connecting edge with a length of 40 pixels is retained, and the other two shorter connecting edges are deleted.

[0020] It should be understood that the trajectory association map after the above-mentioned trimming process is clearly defined as a texture reference structure, which can directly reflect the unidirectional flow and propagation characteristics of plastic materials during the weld fusion process, avoid structural redundancy or misjudgment caused by local detail changes, and provide an accurate reference for subsequent texture anomaly identification.

[0021] S102: Based on the texture reference structure, the local texture primitives of the weld area image are deconstructed to obtain a texture primitive spatial layout embedded with the constraints of the texture reference structure. Specifically, the execution process of the local texture primitive deconstruction includes: Based on the spatial distribution of texture trajectories in the texture reference structure, the local deconstruction region corresponding to the texture trajectory is determined in the weld area image; In practice, each local deconstruction region is centered on a single texture trajectory in the texture baseline structure, and is symmetrically expanded to both sides of a certain width in a horizontal direction perpendicular to the trajectory centerline to form a rectangular region. For example, if a texture trajectory is 100 pixels long and the expansion width is set to 8 pixels on each side, then the local deconstruction region is a rectangular region with a width of 16 pixels and a length of 100 pixels.

[0022] It should be noted that the local deconstruction region of each texture trajectory only covers the texture trajectory and its adjacent area, and does not overlap with the local deconstruction regions of other texture trajectories.

[0023] Within each local deconstruction region, candidate texture segments are segmented based on the collaborative features of texture brightness variation and texture direction variation; The segmentation process of the candidate texture fragment includes: Within the local deconstruction region, a line-by-line lateral scan is performed along the dominant direction defined by the texture reference structure to extract the actual texture response sequence; In practice, sampling is not simply performed along the centerline of the texture reference structure. Instead, it advances along the longitudinal axis of the local deconstructed region (i.e., the direction corresponding to the texture trajectory) with a step size of 1 pixel. At each advancement position, grayscale response extrema points on the cross-section perpendicular to the longitudinal axis are extracted. The grayscale response extrema points extracted at each advancement position and their corresponding actual spatial coordinates are then sequentially arranged to form a continuous sequence of actual texture responses. For example, if the length of the local deconstructed region is 100 pixels, and at the 50th vertical position, the center line of the texture trajectory is located at the horizontal coordinate x=10, but the maximum grayscale value is found to be actually located at x=12 during the horizontal scan at that position, then the pixel value and coordinates at x=12 are stored in the texture response sequence. Through this step, the small natural fluctuations or potential offsets of the weld texture relative to the ideal reference trajectory are captured.

[0024] Based on the position where the response pattern changes in the texture response sequence, the texture response sequence is segmented to form multiple candidate texture fragments; In specific implementation, the response pattern transition position refers to the position in the texture response sequence where the grayscale values ​​of at least three consecutive sampling points change from an increasing trend to a decreasing trend, or from a decreasing trend to an increasing trend. Using the transition position as the boundary, the texture response sequence is divided into multiple sub-segments, each of which is a candidate texture fragment.

[0025] For example, if the gray values ​​of the 10th to 13th sampling points in the texture response sequence increase continuously and the gray values ​​of the 14th to 17th sampling points decrease continuously, then the position of the 13th sampling point is the turning point, and the resulting candidate texture segments are the segments of the 1st to 13th sampling points and the segments from the 14th to the end of the sequence.

[0026] Candidate texture fragments that satisfy the continuous extension feature of weld texture are identified as a set of candidate texture fragments for subsequent construction of texture primitive space layout; In practice, candidate texture segments that satisfy the continuous extension characteristic of weld texture must simultaneously meet the following two conditions: Condition 1: The length of the candidate texture fragment is greater than or equal to the set minimum continuous length threshold, for example, 5 pixels; Condition 2: The angle between the dominant direction of the candidate texture fragment and the dominant direction of the corresponding texture trajectory is less than or equal to the set direction angle threshold, for example, set to 10°.

[0027] For example, if a candidate texture fragment is 8 pixels long and the angle between the dominant direction and the texture trajectory direction is 6°, then the fragment is included in the candidate texture fragment set; if another candidate fragment is 4 pixels long, then it is not included in the set because the length is less than 5 pixels; and if yet another candidate fragment is 8 pixels long but the angle is 15°, then it is not included in the set because the angle is greater than 10°.

[0028] Based on the generation source of candidate texture fragments, their spatial affiliation is directly inherited, and the candidate texture fragments are combined to obtain a texture primitive spatial layout with embedded texture reference structure constraints. In practice, since each candidate texture fragment is generated within a local deconstruction region corresponding to a specific texture trajectory (see above), the candidate texture fragment is directly assigned to the specific texture trajectory that generated it, without having to repeatedly calculate the spatial distance.

[0029] Subsequently, candidate texture fragments belonging to the same texture trajectory are arranged and combined sequentially from the starting point to the ending point according to their spatial order in the dominant direction of the trajectory, forming a specific texture primitive spatial layout. For example, if candidate texture fragment F1 is extracted from a local deconstruction region of texture trajectory A through the steps described above, then F1 directly belongs to trajectory A. In trajectory A, all candidate fragments belonging to trajectory A are arranged according to the dominant direction to form the texture primitive space layout corresponding to trajectory A. It should be understood that the texture primitive spatial layout obtained in the above way not only retains the actual position information of the texture relative to the reference, but is also subject to the hierarchical constraints of the texture reference structure, providing a "actual-reference" comparison basis for subsequent anomaly detection.

[0030] S103: Based on the texture reference structure, perform topological structure prediction on the spatial layout of texture primitives in the weld area image to determine the topological anomaly region that satisfies the texture neighborhood self-correction mechanism. Specifically, the process of determining the topologically anomalous region includes: Based on the spatial topological constraints of the texture datum structure, a texture neighborhood self-correction operation is performed on the texture primitive positions in the texture primitive spatial layout. The execution process of the texture neighborhood self-correction operation includes: For each texture primitive in the texture primitive spatial layout, determine the set of neighboring texture primitives in the same hierarchical structure of the texture primitive spatial layout; In practice, for each texture primitive, the Euclidean distance between the center coordinates of the texture primitive and the center coordinates of all other actual texture primitives in the spatial layout is calculated. After sorting these distances from smallest to largest, the three texture primitives with the smallest distance are selected as the neighborhood texture primitive set. For example, if the center coordinates of a target texture primitive are (250, 350), and the center coordinates of other actual texture primitives in the layout are (252, 352), (248, 349), and (260, 360), then the distances calculated are 2.83, 2.24, and 14.14 pixels, respectively. The texture primitives corresponding to the two smallest distances (2.24 and 2.83 pixels) are selected as the neighborhood texture primitive set.

[0031] Based on the spatial distribution characteristics of texture primitives in the neighborhood texture primitive set, determine the desired spatial location of the target texture primitive; In practice, the desired spatial location of the target texture primitive is determined by calculating the average of the center coordinates of the texture primitives in the neighboring texture primitive set. The calculation formula is as follows: Suppose that there are N texture primitives in the neighborhood texture primitive set, and the center coordinates of the i-th neighborhood texture primitive are... The expected position of the target texture primitive. for: ; Continuing with the example above, if the coordinates of the two neighboring texture primitives are (252, 352) and (248, 349), then the expected position of the target texture primitive is ((252+248) / 2, (352+349) / 2), which is (250, 350.5).

[0032] Calculate the spatial offset of the actual position of the target texture primitive relative to the expected spatial position, in order to identify anomalous texture primitives; In practice, the spatial offset is determined by calculating the Euclidean distance between the actual position and the desired position. The specific calculation formula is as follows: If the actual position coordinates are The desired location coordinates are Then the spatial offset D is: ; For example, if the actual position of the target texture primitive is (250, 350) and the desired position is (250, 350.5), then the spatial offset D is 0.5 pixels.

[0033] Based on the spatial offset of texture primitives relative to their topological neighborhood during the texture neighborhood self-correction operation, abnormal texture primitives whose offset exceeds the topological constraint range are identified. In practice, a specific and clear spatial offset threshold is set, such as 3 pixels. If the spatial offset D of a certain texture primitive is greater than 3 pixels, the texture primitive is identified as an abnormal texture primitive; otherwise, it is a normal texture primitive.

[0034] For example, if the spatial offset of a texture primitive is 2.5 pixels, it is determined to be a normal texture primitive; if the spatial offset of another texture primitive is 4.0 pixels, it is determined to be an abnormal texture primitive.

[0035] Region fusion is performed based on the spatial location of abnormal texture primitives to determine the topologically abnormal regions that satisfy the texture neighborhood self-correction mechanism. In practice, the region fusion method is as follows: First, calculate the Euclidean distance between the center coordinates of every two anomalous texture primitives. If the distance between two anomalous texture primitives is less than or equal to the set fusion distance threshold (for example, 5 pixels), they are classified into the same topological anomalous region. If the distance is greater than 5 pixels, the two anomalous texture primitives belong to different topological anomalous regions.

[0036] For example, the distance between anomalous texture primitive A and anomalous texture primitive B is 4.5 pixels, which is less than or equal to 5 pixels. Therefore, A and B are merged to form the same topological anomalous region. The distance between anomalous texture primitive C and either A or B is 6 pixels, which is greater than 5 pixels. Therefore, anomalous texture primitive C constitutes an independent topological anomalous region.

[0037] It should be noted that the topological anomaly regions obtained through the above method can clearly express the spatial positional anomalies in the texture primitive layout, providing an accurate and reproducible basis for subsequent defect region identification.

[0038] S104: Based on the spatial topological association between the topological anomaly region and the texture reference structure, extract the topological anomaly region that does not satisfy the inherent fusion constraint of the weld as the real defect region and output the position of the real defect region. It should be noted that in this embodiment, the "real defect area" is defined as: a topologically abnormal area whose spatial topological relationship is inconsistent with the unidirectional fusion propagation law of the weld seam depicted by the texture reference structure, rather than an anomaly caused by local texture fluctuations or imaging noise.

[0039] Specifically, the extraction process of the actual defect area includes: Based on the spatial topological association between topological anomaly regions and texture reference structures, a topological mapping relationship from topological anomaly regions to texture reference structures is constructed; The topological mapping relationship is used to describe the corresponding positions and connections of each abnormal texture primitive within the topological anomaly region in the texture reference structure.

[0040] The process of constructing the topological mapping relationship includes: Extract the local texture extension direction of each anomalous texture primitive within the topological anomaly region, and determine the corresponding topological position of the anomalous texture primitive in the texture reference structure; In one specific embodiment, for each anomalous texture primitive within the topological anomaly region, the Euclidean distance between its center coordinates and the center lines of each texture trajectory in the texture reference structure is calculated, and the anomalous texture primitive is assigned to the texture trajectory with the smallest distance; the assignment result serves as the corresponding topological position of the anomalous texture primitive in the texture reference structure.

[0041] For example, if the center coordinates of the abnormal texture primitive are (300, 420), and the coordinates of the nearest points of the center lines of the two texture trajectories in the texture reference structure are (302, 418) and (325, 440) respectively, and the corresponding distances between them are 2.83 pixels and 32.02 pixels respectively, then the abnormal texture primitive belongs to the texture trajectory corresponding to the former.

[0042] Based on the local topological relationship between anomalous texture primitives and the texture reference structure, a texture mapping relationship is established between the topological anomalous region and the texture reference structure. In specific implementation, after determining the texture trajectory to which the abnormal texture primitive belongs, the set of adjacent connected trajectories of the texture trajectory in the texture reference structure is further obtained, and the connection relationship between the abnormal texture primitive and the texture trajectory and its adjacent trajectories is recorded as a texture mapping relationship.

[0043] For example, if the texture trajectory T1 to which the abnormal texture primitive belongs is connected to texture trajectories T2 and T3 respectively in the texture reference structure, then the corresponding texture mapping relationship is denoted as: abnormal texture primitive → T1 → {T2, T3}.

[0044] Topological relationships with cross mappings or reverse mappings in the texture mapping relationship are deleted to form a topological mapping relationship that accurately reflects the topological association between the topologically abnormal region and the texture reference structure space. In this embodiment, "cross mapping" is defined as the same anomalous texture primitive simultaneously corresponding to multiple texture trajectories that do not have a direct connection relationship in the texture reference structure; "reverse mapping" is defined as the case where the angle between the local extension direction of the anomalous texture primitive and the propagation direction of its associated texture trajectory in the texture reference structure is greater than 90°. The specific processing method is as follows: For cross mapping, only the mapping relationship between the abnormal texture primitive and the texture trajectory with the smallest Euclidean distance is retained, and the rest of the mapping relationship is deleted; for reverse mapping, the mapping relationship between the abnormal texture primitive and the corresponding texture trajectory is marked as "reverse abnormal mapping" and retained in the topological mapping relationship.

[0045] Under the constraints of topological mapping, topological anomaly regions that do not satisfy the inherent fusion monotonicity characteristics of welds are screened out; It should be noted that the inherent fusion monotonicity of welds is manifested as a strict unidirectional ordered connection in the texture reference structure (see above), while in real defects it may be manifested as reverse or disordered.

[0046] In practice, for each topologically abnormal region, based on the topological mapping relationship corresponding to the abnormal texture primitives within it, it is determined whether the following situation exists: Scenario 1: The actual connection direction formed between abnormal texture primitives, after being mapped to the texture base structure, is manifested as a reverse connection from the downstream texture trajectory to the upstream texture trajectory (that is, the actual texture forms a return path that does not exist in the base structure). Scenario 2: The texture mapping relationship corresponding to the anomalous texture primitive is marked as "reverse anomalous mapping". If one of the above scenarios exists, the topological anomalous region is determined to be a real defect region; if none of the above scenarios exist, the topological anomalous region is not considered a real defect region.

[0047] The selected topological anomaly regions are taken as the real defect regions, and the locations of the real defect regions are output. In practice, the location of the actual defect area is output in the form of image coordinates. The output method includes one of the following two: First, calculate the minimum bounding rectangle of all abnormal texture primitives within the real defect region, and output the coordinates of the upper left and lower right corners of the bounding rectangle. Secondly, calculate the arithmetic mean of the center coordinates of all abnormal texture primitives within the real defect area, and output this average coordinate as the center position of the real defect area.

[0048] For example, if the coordinates of the top left corner of the smallest bounding rectangle of an abnormal texture primitive within a real defect region are (290, 410) and the coordinates of the bottom right corner are (310, 430), then the coordinates of this rectangle are used as the output position of the real defect region.

[0049] It should be understood that the actual defect area location results obtained through the above methods can be directly used for weld quality judgment, rework marking, or process parameter adjustment, and the spatial location results are stable and reproducible.

[0050] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters, weights, and thresholds in the formulas are set by those skilled in the art according to the actual situation.

[0051] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

[0052] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for intelligent visual defect detection in the production of plastic products, characterized in that, The method includes: Acquire images of the weld seam area of ​​a plastic product, and construct a texture reference structure with sparse topological constraints based on the continuous texture direction formed by the fused material itself in the weld seam area image; including: By tracing continuous texture ridges along the weld extension direction in the weld area image, a set of texture trajectories reflecting the fusion propagation trajectory is obtained; Based on the spatial extension and bifurcation relationships of each texture trajectory in the texture trajectory set, a trajectory association graph describing the connection pattern of texture trajectories is constructed; including: Based on the relative spatial position of texture trajectories in the weld area image, the adjacent candidate relationships between each texture trajectory are determined; By combining the continuity of the extension direction of the texture trajectory in the adjacent candidate relationship, the adjacent candidate relationship is filtered for directional continuity; Adjacent candidate relationships filtered by directional continuity are organized into a trajectory association graph to represent the connection pattern between texture trajectories; The connection relationships with back extension or multiple redundant branches in the trajectory association graph are trimmed, and the connection relationships that match the unidirectional fusion propagation characteristics of the weld are retained to obtain a texture reference structure with sparse topological constraints. Based on the aforementioned texture reference structure, the weld area image is locally deconstructed using texture primitives to obtain a texture primitive spatial layout embedded with the constraints of the texture reference structure; including: Based on the spatial distribution of texture trajectories in the texture reference structure, the local deconstruction region corresponding to the texture trajectory is determined in the weld area image; Within each local deconstruction region, candidate texture segments are segmented based on the collaborative features of texture brightness variation and texture direction variation; Based on the generation source of candidate texture fragments, their spatial affiliation is directly inherited, and the candidate texture fragments are combined to obtain a texture primitive spatial layout with embedded texture reference structure constraints. Based on the texture reference structure, the topological structure of the spatial layout of texture primitives in the weld area image is predicted to identify the topologically abnormal regions that satisfy the texture neighborhood self-correction mechanism. Based on the spatial topological association between the topological anomaly region and the texture reference structure, the topological anomaly region that does not satisfy the inherent fusion constraint of the weld is extracted as the real defect region and the position of the real defect region is output.

2. The intelligent visual defect detection method for plastic product manufacturing according to claim 1, characterized in that, The segmentation process of the candidate texture fragment includes: Within the local deconstruction region, a line-by-line lateral scan is performed along the dominant direction defined by the texture reference structure to extract the actual texture response sequence; Based on the position where the response pattern changes in the texture response sequence, the texture response sequence is segmented to form multiple candidate texture fragments; Candidate texture fragments that satisfy the continuous extension feature of weld texture are identified as a set of candidate texture fragments, which are then used to construct the subsequent texture primitive space layout.

3. The intelligent visual defect detection method for plastic product manufacturing according to claim 2, characterized in that, The process of determining the topological anomaly region includes: Based on the spatial topological constraints of the texture datum structure, a texture neighborhood self-correction operation is performed on the texture primitive positions in the texture primitive spatial layout. Based on the spatial offset of texture primitives relative to their topological neighborhood during the texture neighborhood self-correction operation, abnormal texture primitives whose offset exceeds the topological constraint range are identified. Region fusion is performed based on the spatial location of anomalous texture primitives to determine topological anomalous regions that satisfy the texture neighborhood self-correction mechanism.

4. The intelligent visual defect detection method for plastic product manufacturing according to claim 3, characterized in that, The execution process of the texture neighborhood self-correction operation includes: For each texture primitive in the texture primitive spatial layout, determine the set of neighboring texture primitives in the same hierarchical structure of the texture primitive spatial layout; Based on the spatial distribution characteristics of texture primitives in the neighborhood texture primitive set, determine the expected spatial location of the target texture primitive; Calculate the spatial offset of the actual position of the target texture primitive relative to the expected spatial position, in order to identify anomalous texture primitives.

5. The intelligent visual defect detection method for plastic product manufacturing according to claim 4, characterized in that, The process of extracting the actual defect region includes: Based on the spatial topological association between topological anomaly regions and texture reference structures, a topological mapping relationship from topological anomaly regions to texture reference structures is constructed; Under the constraints of topological mapping, topological anomaly regions that do not satisfy the inherent fusion monotonicity characteristics of welds are screened out; The selected topological anomaly regions are taken as the real defect regions, and the locations of the real defect regions are output.

6. The intelligent visual defect detection method for plastic product manufacturing according to claim 5, characterized in that, The process of constructing the topological mapping relationship includes: Extract the local texture extension direction of each anomalous texture primitive within the topological anomaly region, and determine the corresponding topological position of the anomalous texture primitive in the texture reference structure; Based on the local topological relationship between anomalous texture primitives and the texture reference structure, a texture mapping relationship is established between the topological anomalous region and the texture reference structure. Topological relationships with cross mappings or reverse mappings in the texture mapping relationship are deleted to form a topological mapping relationship that accurately reflects the topological association between the topologically abnormal region and the texture reference structure space.

Citation Information

Patent Citations

  • CN115953366A

  • CN120953275A