A defect detection system for inner packaging

By using multi-angle supplemental lighting and Euclidean distance calculation, the defective areas of the inner packaging are accurately identified, solving the problems of imaging blur and error in traditional inspection systems, and realizing high-precision defect detection and dynamic linkage control.

CN121033064BActive Publication Date: 2026-01-30HANGZHOU KANGHONG IND & TRADE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511580215.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-31
Publication Date
2026-01-30
Estimated Expiration
2045-10-31

AI Technical Summary

Technical Problem

Traditional inner packaging inspection systems suffer from blurred imaging due to insufficient lighting or reflection interference in local areas, leading to the loss of boundary pixels or recognition errors. This makes it impossible to accurately locate assembly abnormalities, and the lack of effective defect level classification and linkage control reduces inspection accuracy and control feedback efficiency.

Method used

The lighting control module acquires real-time status information of components, constructs a multi-angle supplementary lighting sequence, calculates Euclidean distance vectors using the boundary recognition module, filters abnormal areas using the defect aggregation module, calculates defect levels using the level mapping module, and generates dynamic control commands through the response linkage module to achieve accurate defect identification and dynamic response.

Benefits of technology

It improves the accuracy of inner packaging inspection and the timeliness of control decisions, enhances the granularity of defect detection classification, realizes dynamic linkage response control of the inner packaging process, and improves the accuracy of inspection and the level of production quality control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121033064B_ABST
    Figure CN121033064B_ABST
Patent Text Reader

Abstract

This invention relates to the field of defect detection technology, specifically to a defect detection system for inner packaging components. The system includes an illumination control module, a boundary recognition module, a defect clustering module, a level mapping module, and a response linkage module. This invention establishes boundary offset distribution information by analyzing the convergence degree of the boundary contour morphology and the Euclidean vector distribution. This accurately captures minute offsets or abnormal locations, enabling the clustering and spatial clustering of defect boundaries. Abnormal clusters are filtered using distance and quantity distribution parameters, and defect levels are mapped using structural hierarchy and functional risk factors. Differential chemical position response operations are triggered based on the level assessment. This improves image quality while ensuring component recognition accuracy, enhances the spatial representation capability of defect clustering, strengthens the granularity of defect detection classification in multi-component assembly, and achieves dynamic linkage response control during the inner packaging process, thereby improving the overall accuracy of defect recognition and the timeliness of control decisions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of defect detection technology, and in particular to a defect detection system for inner packaging. Background Technology

[0002] The field of defect detection technology primarily focuses on the automated identification and classification of appearance flaws, structural anomalies, or functional defects that may occur in products at various stages of manufacturing, assembly, and packaging, through image processing, machine vision, and intelligent recognition algorithms. This field comprehensively utilizes technologies such as optical imaging, deep learning models, template matching, edge detection, 3D reconstruction, and pixel-level segmentation to replace manual inspection. It aims to achieve efficient, stable identification and accurate location of various types of defects on workpiece surfaces, including cracks, scratches, foreign objects, deformation, misassembly, omissions, and dimensional deviations, thereby improving inspection speed and consistency, ensuring product quality, and optimizing production processes. This technology is widely used in various industrial scenarios such as electronics manufacturing, food packaging, pharmaceutical assembly, automotive parts, and semiconductor processing.

[0003] The inner packaging defect detection system is an automated system for identifying and judging defects in the internal components of product packaging. It primarily identifies issues such as missing parts, incorrect parts, damage, and misalignment within the packaging. The system acquires internal image data using industrial cameras and combines this with a deep learning target recognition model and geometric calibration methods to automatically analyze the internal assembly status and mark anomalies. Its core purpose is to ensure packaging integrity and assembly accuracy, making it particularly suitable for industrial scenarios requiring the assembly of multiple sub-components into packaging boxes or containers, such as pharmaceutical packaging, consumer electronics assembly, and daily chemical product boxing, thereby improving production quality control and packaging pass rates.

[0004] Traditional inspection systems suffer from blurred images due to insufficient lighting or reflection interference in local areas, especially when the boundaries of inner packaging components overlap or the surface materials are complex. This can easily lead to the loss of boundary pixels or recognition errors, making it impossible to refine the specific location and extent of assembly anomalies. For example, when multiple components are misaligned within the same packaging unit, traditional systems only mark the overall anomaly and cannot provide focused judgment indicators. They also lack evaluation models that are related to the structural criticality and functional impact, resulting in coarse defect level classification and an inability to effectively link with the packaging process, thus reducing the inspection accuracy and control feedback efficiency in actual industrial scenarios. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the existing technology and propose an inner packaging defect detection system.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: an inner packaging defect detection system, the system comprising:

[0007] The illumination control module acquires real-time status information of each product component in the packaging container, calculates the product of the surface reflectivity value and the angle change value, compares the product result with the occlusion photosensitive threshold, and triggers multiple supplementary lighting devices with different numbers in the light source matrix to obtain a multi-angle supplementary lighting sequence.

[0008] The boundary recognition module calls the multi-angle supplementary lighting sequence, calculates the Euclidean distance vector between the geometric center reference points set in the packaging structure within the boundary point, and classifies the vector set according to the direction difference and distance variability to identify whether it constitutes a closed image shape and obtain boundary offset distribution information;

[0009] Based on the boundary offset distribution information, the defect clustering module obtains the Euclidean distance between the centroid and the geometric center point of the product component set in the packaging structure, filters clusters whose clustering index exceeds the interval threshold, and obtains a list of concentrated abnormal areas of the component.

[0010] The grade mapping module calls the list of abnormal areas in the component set, extracts the structural hierarchy identifier, functional classification label, and defect type label of the associated product components in each abnormal area, calculates the defect anomaly assessment value, and generates multi-component grade classification results by combining the preset defect grade judgment interval table.

[0011] The present invention is improved in that the multi-angle supplementary lighting sequence includes an excitation angle combination, an illumination intensity setting, and a trigger timing scheme; the boundary offset distribution information specifically includes an edge centripetal difference layer, a boundary direction variation layer, and an offset stability judgment label; the component concentrated abnormal area list includes a cluster number index, a spatial centroid position, and a clustering intensity identifier; and the multi-component level classification result specifically refers to the component level label, level mapping number, and risk coefficient weight value.

[0012] The present invention is improved in that the illumination control module includes:

[0013] The coordinate acquisition submodule acquires real-time status information of each product component in the packaging container. The real-time status information includes spatial coordinates, component surface reflectivity, minimum gap distance between components, and change value of the angle of light source direction. The change value of the angle of light source direction is matched with the surface reflectivity of the component item by item to construct the reflection angle response matrix of each product component and generate the angle response matrix dataset.

[0014] The occlusion determination submodule, based on the angle response matrix dataset, calls the product of the reflection value and the included angle value of each product component, calculates the difference with the occlusion photosensitive threshold, aggregates the difference according to the spatial number of the product component and calculates the mean, and selects the data sequence number that continuously exceeds the upper limit of the occlusion determination interval as the occlusion mark number set, calculates the occlusion offset intensity corresponding to the product component, calls the component number set whose offset intensity value exceeds the offset threshold, and obtains the occlusion trigger number list.

[0015] The supplementary lighting excitation submodule locates the spatial area of ​​the product component corresponding to each occlusion trigger number in the packaging container according to the occlusion trigger number list, calls the supplementary lighting device bound to the area number in the light source matrix, sets differentiated light source excitation angle parameters and timing excitation interval values, and combines the multi-angle light source parameters to perform lighting excitation to obtain a multi-angle supplementary lighting sequence.

[0016] The present invention is improved in that the boundary recognition module includes:

[0017] The reconstruction imaging submodule calls the multi-angle supplementary lighting sequence to perform beam-splitting sequence imaging on each product component in the inner packaging structure. The imaging results are arranged according to the excitation order of the light source to construct an imaging atlas. The stability of the overlapping area is judged according to the pixel intensity distribution in the atlas, and the information of the stable range of imaging brightness is obtained.

[0018] The pixel extraction submodule filters the edge regions in each frame of the image whose brightness distribution satisfies the stable range based on the imaging brightness stability range information, extracts the set of two-dimensional coordinate values ​​of each pixel in the edge region, calculates the Euclidean distance between the boundary point and the geometric center reference point in the inner packaging structure, and obtains the boundary center offset vector set.

[0019] The contour classification submodule calls the boundary center offset vector set, merges and groups the direction angle and length of each vector, calculates the standard deviation of the angle difference and the length variance between vectors in each group, determines whether the contour of the product component constitutes a closed structure based on the distribution trend of the group, and outputs the degree of contour variation to obtain boundary offset distribution information.

[0020] The present invention is improved in that the defect aggregation module includes:

[0021] Based on the boundary offset distribution information, the coordinate collection submodule classifies the defect boundary coordinate points of each product component according to the packaging unit number, extracts the three-dimensional spatial position values ​​of each defect point set after classification, and constructs the coordinates into a unified format dataset to obtain the defect three-dimensional coordinate set.

[0022] The spatial clustering submodule calls the set of three-dimensional coordinates of the defects, calculates the Euclidean distance between each defect point and the other points, clusters and merges the distance data, extracts the nearest neighbor distance and the number of points in each cluster, and uses the mean coordinates of the points in the cluster as the centroid of the cluster. It performs difference calculation on the Euclidean distance between the center point of the cluster and the geometric center point of the product component in the packaging structure, calculates the spatial offset intensity of each cluster, and performs numbering, labeling and aggregation filtering on the offset intensity of each cluster to obtain spatial clustering feature information.

[0023] The clustering and filtering submodule calculates the numerical difference between the spatial offset intensity of each cluster and the corresponding structural assembly tolerance benchmark value based on the spatial clustering feature information. It filters the cluster numbers and corresponding spatial coordinate ranges of clustering indices that exceed the upper limit of the tolerance range, establishes a spatial identifier index under the corresponding packaging unit, and obtains a list of component clustering abnormal areas.

[0024] The present invention is improved in that the level mapping module includes:

[0025] The tag extraction submodule obtains the list of abnormal areas in the component set, extracts the structural hierarchy identifier, functional classification tag and defect type tag corresponding to the product component in each abnormal area, performs classification and coding processing on the three types of tag data, establishes a unified index mapping table, and obtains the component tag code set.

[0026] The weight calculation submodule assigns structural level weights to structural level identifiers, functional criticality weights to functional classification labels, and defect type risk weights to defect type labels based on the component label coding set, and calculates and obtains the defect anomaly assessment value corresponding to each product component.

[0027] The interval determination submodule calls the defect anomaly evaluation value and compares it one by one with the upper limit value of each interval in the preset defect level determination interval table. The component numbers that fall into the same level interval are grouped into a set of level classification indexes, and the evaluation value and interval code are attached to generate multi-component level classification results.

[0028] The present invention has an improvement, wherein the system further includes:

[0029] Based on the multi-component level classification results, the response linkage module identifies the action items defined in the response control strategy mapping table to which the current level belongs. When the level identifier is in the high-risk level range, it performs operations such as stopping the workstation status, suspending the task scheduling unit, and switching the material packaging path, thereby generating a defect level linkage control instruction set.

[0030] The defect level linkage control instruction set specifically includes stop instruction codes, review suspension signals, and workstation switching command codes.

[0031] The present invention is improved in that the response linkage module includes:

[0032] The grade retrieval submodule retrieves the packaging unit number and workstation control number corresponding to each grade based on the multi-component grade classification results. It then groups the number items according to the grade level, calls the packaging workstation registration table to compare with the group list, filters the workstations that are in operation, and establishes a workstation grade mapping structure set to obtain workstation grade mapping information.

[0033] The strategy matching submodule calls the workstation level mapping information, matches the response control strategy mapping table according to the level code of each group of level mapping items, extracts the action item label and execution condition threshold attached to the corresponding level code in the control table, judges the value range of each current workstation level code and action execution condition, filters the set of workstation numbers that meet the triggering conditions, and obtains the triggering workstation action index set.

[0034] The instruction generation submodule classifies and indexes the action items corresponding to each workstation number according to the trigger workstation action index set, encapsulates the corresponding stop instruction, task suspension instruction and path switching instruction into structured control fields, assembles the instruction set structure through the control fields, and establishes a defect level linkage control instruction set.

[0035] Compared with the prior art, the advantages and positive effects of the present invention are as follows:

[0036] In this invention, by collecting component spatial coordinates and surface reflectivity data, and constructing a gradient model based on changes in light source direction, active differentiated supplementary lighting for specific areas under illumination conditions is achieved. Multi-angle illumination is used to improve the reconstruction accuracy of boundary pixels in the image. By leveraging the convergence degree of boundary contour morphology and Euclidean vector distribution, boundary offset distribution information is established to accurately capture minute offsets or abnormal positions, enabling the aggregation and spatial clustering of defect boundaries. Abnormal clusters are filtered using distance and quantity distribution parameters, and defect levels are mapped using structural hierarchy and functional risk factors. Differential chemical position response operations are triggered based on level assessment. This improves image quality while ensuring component recognition accuracy, enhances the spatial representation capability of defect clustering, strengthens the granularity of defect detection in multi-component assembly, and achieves dynamic linkage response control during the inner packaging process, thereby improving the overall accuracy of defect recognition and the timeliness of control decisions. Attached Figure Description

[0037] Figure 1 This is a system flowchart of the present invention;

[0038] Figure 2 This is a flowchart of the illumination control module of the present invention;

[0039] Figure 3 This is a flowchart of the boundary recognition module of the present invention;

[0040] Figure 4 This is a flowchart of the defect aggregation module of the present invention;

[0041] Figure 5 This is a flowchart of the level mapping module of the present invention;

[0042] Figure 6 This is a flowchart of the response linkage module of the present invention. Detailed Implementation

[0043] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0044] In the description of this invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, in the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0045] Please see Figure 1 The present invention provides a technical solution: an inner packaging defect detection system, the system including a light control module, a boundary recognition module, a defect aggregation module, a level mapping module and a response linkage module;

[0046] The illumination control module acquires real-time status information of each product component in the packaging container. The real-time status information includes spatial coordinates, surface reflectivity of the component, minimum gap distance between components, and change value of the angle between the light source direction. Based on the gradient formed by the change of the coordinate point and the angle between the light source direction, the surface reflectivity value and the angle change value are multiplied to calculate the product. The product result is compared with the occlusion photosensitive threshold. When the ratio continuously exceeds the upper limit of the threshold sequence, multiple supplementary lighting devices with different numbers in the light source matrix are triggered to perform differentiated timing excitation on the corresponding area to obtain a multi-angle supplementary lighting sequence.

[0047] Minimum gap distance refers to the nearest edge distance between any two product components in three-dimensional space within the packaging structure, usually calculated using Euclidean distance; surface reflectance is the reflectance ratio of light intensity, which is a physical property of the material; the occlusion photosensitive threshold can be experimentally set as the threshold point where the probability of failure to recognize the boundary of the image shadow area produced by the illuminance being lower than a certain specified level is greater than the set threshold.

[0048] The boundary recognition module calls a multi-angle supplementary lighting sequence to perform multi-source reconstruction imaging of each product component in the inner packaging structure. It extracts the set of boundary pixel coordinates from the imaging data, calculates the Euclidean distance vector between the boundary points and the set of geometric center reference points in the inner packaging structure, and classifies the vector set according to the direction difference and distance variability. It identifies whether the boundary convergence constitutes a closed image shape, determines the contour stability offset range, and obtains the boundary offset distribution information.

[0049] The geometric center reference point can be calculated by obtaining the center coordinates of the three-dimensional contour boundary of the packaging container, and is often defined by the average center point of the packaging length, width and height; the contour stability offset range is the combined value of the length variance and the included angle variance between multiple boundary centripetal vectors, which is used to judge the consistency of edge offset.

[0050] Based on boundary offset distribution information, the defect aggregation module collects the defect boundary coordinates of product components, obtains the three-dimensional coordinate data of defect points in each packaging unit, calculates the Euclidean distance between defect points, constructs a spatial clustering matrix, and counts the nearest neighbor distance, number of points in each cluster, and centroid coordinates of each cluster. It also obtains the Euclidean distance between the centroid and the geometric center of the product component set in the packaging structure, compares it with the structural assembly tolerance value, and filters clusters whose aggregation index exceeds the interval threshold to obtain a list of concentrated abnormal areas of components.

[0051] The spatial clustering matrix is ​​a cluster partitioning table based on Euclidean distance, suitable for intermediate states of K-means or DBSCAN clustering; the structural assembly tolerance value is the allowable structural error given in the product design documents, and is generally provided by the assembly engineering department.

[0052] The grade mapping module calls the list of abnormal areas in the component set, extracts the structural hierarchy identifier, functional classification label, and defect type label of the associated product components in each abnormal area, assigns a structural hierarchy weight coefficient, a functional criticality weight coefficient, and a defect type risk coefficient to the three labels respectively, calculates the defect anomaly assessment value, compares it with the preset defect grade judgment interval table, and generates multi-component grade classification results.

[0053] The structural hierarchy weight coefficient is used to reflect the positional priority of components in the assembly structure. For example, the weight of the bottom load-bearing component is greater than that of the top covering component. The functional criticality weight coefficient is quantified based on the critical role of the component in the integrity of the packaging and can be extracted from the design BOM. The defect type risk coefficient is defined based on the functional impact score of various defects (such as misassembly and damage) and is generally set by the quality control standard. The defect level judgment interval table is usually a multi-segment score interval that is mapped to a level label.

[0054] Based on the multi-component level classification results, the response linkage module retrieves the packaging unit number and workstation control number corresponding to the mapping level, identifies the action items defined in the response control strategy mapping table to which the current level belongs, and executes operations such as stopping the workstation status, suspending the task scheduling unit, and switching the material packaging path to generate a defect level linkage control instruction set.

[0055] The response control strategy mapping table is a preset action response decision matrix that records the mapping rules between levels and action types; the encapsulated path switching operation refers to switching the current material from the main line to the bypass or maintenance line by modifying the production line PLC control signal;

[0056] The multi-angle supplementary lighting sequence includes excitation angle combination, lighting intensity setting and trigger timing scheme. The boundary offset distribution information specifically includes edge centripetal difference layer, boundary direction variation layer and offset stability judgment label. The list of concentrated abnormal areas of components includes cluster number index, spatial centroid position and aggregation intensity identifier. The multi-component level classification results specifically refer to component level mark, level mapping number and risk coefficient weight value. The defect level linkage control instruction set specifically includes stop instruction code, review suspension signal and workstation switching command code.

[0057] Please see Figure 2 The lighting control module includes:

[0058] The coordinate acquisition submodule acquires real-time status information of each product component in the packaging container. The real-time status information includes spatial coordinates, component surface reflectivity, minimum gap distance between components, and change value of the angle of light source direction. The change value of the angle of light source direction is matched with the surface reflectivity of the component item by item to construct the reflection angle response matrix of each product component and generate the angle response matrix dataset.

[0059] The three-dimensional spatial coordinates, surface reflectivity, minimum gap distance between components, and angle variation with the light source direction are obtained for each product component in the packaging container. Product components numbered A1, A2, and A3 are placed in different workstation areas. Coordinate sensors are used to acquire their spatial position data, which are then numbered to create a coordinate data table. Under three light source angles of 30°, 45°, and 60°, a photoelectric acquisition module is used to obtain reflectivity measurements and convert them to normalized values. For example, if the reflectivity of component A1 in direction 1 is 0.72, and the corresponding angle is 0.82, then its product... The value is 0.5904. At the same time, the minimum gap distance between it and the adjacent parts is measured to be 28mm. The diagonal of the packaging container is 200mm. Then the normalized gap distance is 0.14. The light source offset is 10mm. The light source arrangement width is 200mm. The corresponding Δx is 0.05. In this way, the reflection-angle response pairs of each part at each angle are constructed, and the corresponding response matrix is ​​established, as shown in Table 1. Finally, the normalized reflectivity of all parts at all angle directions is matched with the angle change value to generate multiple sets of matrix datasets, thereby establishing the angle response matrix dataset.

[0060] Table 1. Component Reflection and Obstruction Data under Multiple Light Source Directions

[0061] Product Part Number Light source direction number j Surface reflectivity Rij The normalized value of the included angle change θij Minimum gap distance dij (normalized) Offset distance Δx (normalized) A1 1 0.72 0.82 0.14 0.05 A2 1 0.55 0.61 0.18 0.05 A3 1 0.68 0.76 0.12 0.05

[0062] Table 1 lists the normalized parameter input values ​​for product components of types A1, A2, and A3 under the first light source direction.

[0063] The occlusion determination submodule, based on the angle response matrix dataset, calls the product of the reflection value and the included angle value of each product component, calculates the difference with the occlusion photosensitive threshold, aggregates the differences according to the spatial number of the product component, calculates the average, and selects data sequence numbers that continuously exceed the upper limit of the occlusion determination interval as the occlusion marker number set, using the formula:

[0064] ;

[0065] The calculation obtains the occlusion offset intensity corresponding to the product component, and calls the set of component numbers whose offset intensity values ​​exceed the offset threshold to obtain the occlusion trigger number list;

[0066] Among them, P i R represents the occlusion offset intensity of the i-th product component, used to measure the light occlusion effect. ij Let θ be the normalized surface reflectance value of the i-th product component under the j-th light source direction. ij T is the normalized value of the angle variation of the i-th product component under the j-th light source direction. s The normalized value for the occlusion sensitivity threshold is set to the median of the baseline range affecting component photosensitivity abnormalities, d. ijThe normalized value of the minimum gap distance of the i-th product component in the j-th direction is obtained by dividing the original spatial distance by the length of the longest diagonal of the packaging structure. Δx is the normalized value of the offset distance of the light source direction, which is the ratio of the actual offset distance to the total width of the light source arrangement.

[0067] Based on the acquired angle response matrix dataset, the reflectivity of component A1 in direction 1 is extracted to be 0.72, with an included angle of 0.82. An occlusion sensitivity threshold T is set. s The value is 0.5. This value is established based on the fact that when the brightness is below 10% of the grayscale threshold in the measured image distribution of the packaging line, the system's misjudgment rate exceeds 30%. This value belongs to the critical point of image feature occlusion under the reflection-angle combination. Usually, the median value of the product of reflectivity and angle for all components is taken as a reference. The median value of the statistical sample is 0.498, so it is set to 0.5. The corresponding occlusion formula is:

[0068] ;

[0069] In the formula, the molecule part This represents the absolute value of the deviation of the reflection-angle combination from the occlusion reference under each light source direction. The larger this term is, the more severe the occlusion. The denominator is... Used to normalize the spatial impact of occlusion, among which To suppress the exaggerated impact of gap reduction on offset, Δx compensates for the stretching of the fill light blind zone caused by the change in the light source's own angle. A offset intensity index for quantifying the degree of occlusion is formed through ratio calculation, ultimately yielding P. i This is a dimensionless normalized value.

[0070] Substitute the data from A1 into the calculation:

[0071] ;

[0072] Similarly, the result of A2 calculation is:

[0073] ;

[0074] A3 calculates to:

[0075] ;

[0076] The upper limit of the occlusion judgment interval is set to 0.18. This value is based on the probability of recognition failure caused by the missing outline of some structures when the system is at the critical point of the false judgment rate. The fluctuation range of this value is obtained by testing a large number of detection image samples and fluctuates between 0.17 and 0.19. The current average value of the system during the stable period is 0.18, which serves as the occlusion trigger boundary under this working condition. Therefore, A2 and A1 both exceed this upper limit and are included in the occlusion number set.

[0077] The results show that by constructing a displacement intensity index that combines the product of angle change and reflectivity and performs spatial distance normalization correction, it is possible to effectively screen out the component regions that affect image acquisition under the current occlusion state, quantify their relative severity in the occlusion space, and thus provide a clear target identifier for subsequent supplementary lighting actions.

[0078] The supplementary lighting excitation submodule locates the spatial area of ​​the product component corresponding to each occlusion trigger number in the packaging container based on the occlusion trigger number list, calls the supplementary lighting device bound to the area number in the light source matrix, sets differentiated light source excitation angle parameters and timing excitation interval values, and combines the multi-angle light source parameters to perform lighting excitation, thereby obtaining a multi-angle supplementary lighting sequence.

[0079] Based on the generated list of occlusion trigger numbers, the occlusion numbers of product components numbered A1 and A2 are identified, and their spatial coordinates are located in the edge area of ​​the packaging container. The corresponding area number is matched with the number set in the light source matrix control module, and the corresponding supplementary light is set to an excitation angle sequence of 30°, 45°, and 60°. Based on the packaging conveyor line speed of 0.8m / s and the unit spacing of 0.4m, the excitation interval of the supplementary light device is set to 0.5 seconds. The supplementary light is excited three times within this time, each time using a different angle and controlling the luminous flux between 200 and 300 Lux to ensure uniform exposure. Each excitation command is configured with a timestamp, area number, excitation power, and target component binding code, and a unified command data packet is generated. Finally, the above excitation sequence, angle configuration, and brightness range are integrated and recorded as a lighting action sequence. At the same time, its time control parameter group is established and pushed to the lighting execution unit to obtain a multi-angle supplementary lighting sequence for occlusion compensation.

[0080] Please see Figure 3 The boundary recognition module includes:

[0081] The reconstruction imaging submodule calls the multi-angle supplementary lighting sequence to perform beam-splitting sequence imaging on each product component in the inner packaging structure. The imaging results are arranged according to the excitation order of the light source to construct an imaging atlas. The stability of the overlapping area is judged according to the pixel intensity distribution in the atlas, and the information of the stable range of imaging brightness is obtained.

[0082] In the reconstructed imaging submodule, the light source parameters required for calling the multi-angle supplementary lighting sequence must include the light source number, illumination angle, and lighting sequence. The light source number corresponds one-to-one with the component number in the packaging structure. The illumination angle range is 0° to 180°, with typical selected angles being 0°, 45°, 90°, 135°, and 180°. Images are sequentially excited and acquired at each angle to form a five-frame illumination sequence. Image acquisition uses a CMOS image sensor with a resolution of 1920×1080, an image frame rate of 30fps, and a data acquisition period of 0.5s. Each frame is arranged in the order of illumination angle to form an image set matrix. Each frame in the image set matrix corresponds to an excitation angle number. Subsequently, all pixels in the image set are scanned, with 10×10 pixels as a detection unit. The mean and standard deviation of pixel intensity for each detection unit in the five frames are calculated. If the standard deviation is less than the set brightness stability judgment threshold... Then, this area is determined to be a region with stable imaging brightness. The grayscale level is set to 10, derived from the maximum standard deviation of the grayscale fluctuation in the image background under static lighting. For example, if the pixel values ​​of five frames in a certain detection area are {130, 132, 128, 129, 131}, then its mean is 130, and the standard deviation is approximately 1.41, which is less than the threshold of 10. Therefore, it meets the criteria for a stable interval, and the stable interval information of the imaging brightness is finally obtained. The threshold value is used to determine the stable interval. The settings referenced experimental data on image background brightness. Static fill light samples were taken 50 times for the same scene. The maximum standard deviation was 12 and the minimum was 8. The median was set to 10 to cover the normal deviation range.

[0083] The pixel extraction submodule filters edge regions whose brightness distribution satisfies the stable range based on the imaging brightness stability range information, extracts the two-dimensional coordinate value set of each pixel in the edge region, calculates the Euclidean distance between the boundary point and the geometric center reference point in the inner packaging structure, and obtains the boundary center offset vector set.

[0084] In the pixel extraction submodule, based on the previously obtained stable imaging brightness range information, all detection regions in each frame image are filtered, and pixels with a standard deviation exceeding a certain threshold are removed. In the selected area, regions with stable brightness fluctuations are preserved. The edge recognition process is then used to extract boundary pixels. Edge recognition is based on image gradient methods, setting a gradient intensity threshold of 30 gray-level differences. The process determines whether the gray-level gradient of a boundary pixel exceeds this threshold. For example, if the gray-level difference between pixel (135, 215) and its surrounding pixels is greater than 30, it is identified as a boundary point, forming a set of edge coordinate points. The geometric center reference point of the packaging structure is set as The Euclidean distance from the edge points to the center point is calculated using the following formula:

[0085] ;

[0086] Taking point (120, 220) as an example, the distance is

[0087] Pixel, repeat the process to obtain the distance values ​​of all boundary points, forming a boundary center offset vector set.

[0088] Table 2: Euclidean Distance Between Edge Points and Center Points

[0089] Edge point coordinates Center point coordinates Euclidean distance (pixels) (120,220) (135,215) 15.81 (145,230) (135,215) 18.03 (150,210) (135,215) 15.81 (125,205) (135,215) 14.14

[0090] As shown in Table 2, the distance values ​​between all edge points and the center point are in the range of 14 to 18 pixels, which constitute the basic vector length input value, facilitating subsequent contour structure calculation.

[0091] The contour classification submodule calls the boundary center offset vector set, merges and groups the direction angle and length of each vector, calculates the standard deviation of the angle difference and the length variance between the vectors in each group, determines whether the contour of the product component constitutes a closed structure based on the distribution trend of the group, and outputs the degree of contour variation to obtain boundary offset distribution information.

[0092] In the contour classification submodule, the aforementioned boundary center offset vector set is called, using the reference point... Construct a vector starting from the point of origin Calculate the direction angle of each vector. And record its length. All vectors were divided into eight groups of 45° intervals based on their direction angles. Then, the direction angle differences and length differences between all vectors in the same group were compared pairwise, and the standard deviation of the direction angle differences was calculated for each pair. Standard deviation of length difference When the group meets the following conditions and When dealing with pixels, the vector group is determined to be structurally convergent and has a tendency to form a closed boundary. If this trend is observed in all directional segments and a complete path exists surrounding the central region, then a closed structure is confirmed; otherwise, structural variation is determined. Finally, the boundary offset distribution information is output based on the variance change trend of each directional segment. and The settings are based on the measurement results of 20 sets of normal product component boundary structure samples. The standard deviation of the orientation angle is usually below 12° and the standard deviation of the length does not exceed 4.5 pixels. The standard settings are 15° and 5 pixels respectively to fully cover the natural offset range.

[0093] Explanation of the formula calculation logic:

[0094] In the process of contour classification, the standard deviation of the orientation angle The calculation is used to measure the consistency of a set of vectors in spatial directions, reflecting whether there is a tendency for convergence at the boundary, while the length standard deviation... The stability of the boundary distance distribution is characterized, and the two are used together to determine whether the structure is completely closed. When the vector directions are similar and the length changes little, it means that a regular closed boundary is formed. Otherwise, it means that the boundary is deformed or there is a local anomaly. The boundary offset distribution information is then output to reflect the trend of component boundary changes and contour variations in the packaging structure. This result will be directly used as the input basis for subsequent aggregation recognition and offset clustering modules.

[0095] Please see Figure 4 The defect aggregation module includes:

[0096] The coordinate collection submodule classifies the defect boundary coordinates of each product component according to the packaging unit number based on the boundary offset distribution information. It extracts the three-dimensional spatial position values ​​of each defect point after classification and constructs the coordinates into a unified format dataset to obtain the defect three-dimensional coordinate set.

[0097] In the coordinate aggregation submodule, based on the boundary offset distribution information obtained in the previous stage, the defect boundary coordinate set corresponding to each product component is first extracted according to the packaging unit number. Each data point in the boundary coordinate set is represented by two-dimensional coordinates (x, y). Combining the imaging light source number and imaging depth data corresponding to the point, the two-dimensional coordinates are mapped to three-dimensional coordinates. The depth information is obtained by parallax ranging method. The original resolution is 1920×1080, and the depth accuracy per pixel is 0.1mm. After conversion, three-dimensional coordinates (x, y, z) are formed, where the z value is obtained by conversion from the camera calibration matrix. The maximum depth range is 500mm, and the ratio value in the interval [0,1] is normalized to millimeter units. Then, all the aggregated coordinate points are grouped according to their respective packaging unit numbers, and the defect three-dimensional point set in each group is output. The data format is uniformly three-column array, and the order is coordinate number, normalized x, y, z three-dimensional coordinate values. This format facilitates subsequent cluster analysis operations, and finally the defect three-dimensional coordinate set is obtained.

[0098] The spatial clustering submodule calls the set of 3D coordinates of defects, calculates the Euclidean distance between each defect point and the remaining points, clusters and merges the distance data, extracts the nearest neighbor distance and the number of points within each cluster, and uses the mean coordinates of the points within the cluster as the cluster centroid. It then calculates the difference between the Euclidean distance between the cluster center and the geometric center of the product component in the packaging structure, using the following formula:

[0099] ;

[0100] The spatial offset intensity of each cluster is obtained through calculation. The offset intensity of each cluster is numbered, labeled, and aggregated for filtering to obtain spatial clustering feature information.

[0101] Among them, G k The m represents the spatial offset strength of the k-th cluster. k x represents the number of defect points in the k-th cluster. k,f y k,f z k,f Let x be the normalized value of the f-th defect point in the k-th cluster in three-dimensional coordinates. k,c y k,c z k,c These are the normalized values ​​of the three-dimensional centroid coordinates of the k-th cluster, r. k D is the normalized value of the maximum distance between defect points within the k-th cluster. k This is the normalized value for the assembly spacing of the product components in the k-th packaging unit;

[0102] In the spatial clustering submodule, the aforementioned set of 3D defect coordinates is called, and the 3D Euclidean distance from each point to the other points is calculated sequentially, based on a set threshold. Perform clustering and merging operations to form multiple clusters. The clustering process outputs the set of point numbers contained in each cluster. Let m be the number of points in the k-th cluster. k =5 points, and their coordinates are shown below.

[0103] Table 3. Three-dimensional coordinate data of clusters

[0104] Point number <![CDATA[x k,f ]]> <![CDATA[y k,f ]]> <![CDATA[z k,f ]]> P1 0.48 0.22 0.38 P2 0.52 0.25 0.40 P3 0.50 0.24 0.39 P4 0.49 0.23 0.37 P5 0.51 0.21 0.41

[0105] The centroid coordinates (x, y) are obtained by averaging the three-dimensional coordinates of all points in Table 3. k,c ,y k,c ,z k,c Given points P1 and P2, we have (0.45-0.5) + (0.22-0.23) + (0.38-0.39) = 0.02 + 0.01 + 0.01 = 0.04. Substituting these values ​​into the following formula, we get P1 = (0.45-0.5) + (0.22-0.23) + (0.38-0.39) = 0.02 + 0.01 + 0.01 = 0.04.

[0106] ;

[0107] Let r be the maximum distance within a cluster. k =0.07, the normalized value of the product component assembly spacing is D k =0.10, substitute into the term for finding the root. Then, summing the differences of the five points gives 0.04 + 0.04 + 0.02 + 0.04 + 0.04 = 0.18. Substituting this into the equation, we get:

[0108] ;

[0109] The final calculation yields a cluster spatial offset strength of 0.0873 for the kth cluster, which measures the degree to which a defect point deviates from the center in three-dimensional space.

[0110] Formula logic explanation:

[0111] This formula calculates the absolute sum of the three-dimensional offsets of each point in the cluster relative to the centroid using coordinate differences, and adjusts for the magnitude of the square root of the cluster distribution scale to reflect the density of the point group. The denominator contains... Characterizing the clustering structure scale, standardizing the spatial distribution differences between different clusters, making the results independent of the number of points or cluster size, and improving the overall structure to enhance the clustering index G k It can reflect abnormally dense trends, which is convenient for subsequent risk screening.

[0112] Parameter setting instructions:

[0113] Where r k The value is derived from the maximum Euclidean distance between any two points in the current cluster. Taking the midpoints P2 and P5 in the sample as an example, the distance is calculated as follows:

[0114] ;

[0115] The maximum value obtained from multiple combinations is 0.07, let's call it r. k The assembly spacing D k The normalized value set in the structural design is 0.1, which is normalized to 1.5 mm based on the minimum design tolerance of 1.5 mm and the maximum structural width of 15 mm. This value remains unchanged.

[0116] The clustering and filtering submodule calculates the numerical difference between the spatial offset intensity of each cluster and the corresponding structural assembly tolerance benchmark value based on the spatial clustering feature information. It filters the clustering index that exceeds the upper limit of the tolerance value range and the corresponding spatial coordinate range, establishes the spatial identification index under the corresponding packaging unit, and obtains a list of component clustering abnormal areas.

[0117] In the clustering and filtering submodule, the aforementioned clustering spatial offset intensity value G is called. k =0.0873, and compared with the structural assembly tolerance benchmark value corresponding to the packaging unit to which this cluster belongs. Let the assembly tolerance benchmark value be set as . This value is set with reference to the maximum allowable offset error between adjacent components on the structural drawings, and the normalized range is in the interval [0.05, 0.1]. The median value of 0.08 is used as the tolerance benchmark, and the difference calculation is performed:

[0118] ;

[0119] If the difference is greater than the threshold of 0.005, the cluster is determined to be an anomalous cluster, its cluster number and the three-dimensional spatial range it covers are marked to form an anomalous spatial index, and finally a list of anomalous regions in the component set is constructed. This list will be used for subsequent structural stability assessment and response control strategy triggering.

[0120] Please see Figure 5 The level mapping module includes:

[0121] The tag extraction submodule obtains a list of abnormal areas in the component set, extracts the structural hierarchy identifier, functional classification label and defect type label corresponding to the product component in each abnormal area, performs classification and coding processing on the three types of label data, establishes a unified index mapping table, and obtains the component label code set.

[0122] Obtain a list of concentrated abnormal areas for components. Search for the corresponding product component number in each abnormal area. Then, retrieve the structural level identifier, functional category label, and defect type label corresponding to that number from the product structure file. The structural level identifier is distinguished by nesting depth. The functional category label is assigned values ​​based on the functional areas of the process flow. The defect type label originates from the defect identification results of the previous inspection stage. Each type of label is uniformly numbered according to the total number of categories. For example, structural levels are mapped from 0 to 5 to code values ​​0 to 5. Functional labels such as "pressure bearing," "connection," and "transmission" are assigned codes 1, 2, and 3 respectively. Defect types such as "crack," "wear," and "offset" are assigned codes 101, 102, and 103 respectively. To facilitate subsequent calculations and processing, a three-dimensional structure is used to establish a unified index mapping table, as shown in the table below:

[0123] Table 4 Component Label Index Mapping Table

[0124] Product Number Structure hierarchy coding Functional label coding Defect label coding A001 3 2 101 A002 4 1 102 A003 2 3 103

[0125] As shown in Table 4, after the coding is unified, the labels of each component can directly participate in the weight calculation and subsequent operations to obtain the component label coding set.

[0126] The weight calculation submodule assigns structural hierarchy weights to structural hierarchy identifiers, functional criticality weights to functional classification labels, and defect type risk weights to defect type labels based on the component label coding set, using the following formula:

[0127] ;

[0128] The calculation yields the defect and anomaly assessment value for each product component.

[0129] Where L represents the defect anomaly assessment value, W s W represents the structural hierarchy weight coefficient. q W is the functional criticality weighting coefficient. t V is the defect type risk weighting coefficient.s V q V t These are the structural level coding value, functional classification coding value, and defect type coding value, respectively. Z is the structural risk coefficient under the component structure layout, which represents the normalized value of the probability that the structural area where the target component is located will be affected or suffer related damage.

[0130] Based on the component label coding set, each code is assigned a structural hierarchy weight W corresponding to its structural hierarchy, functional label, and defect type label. s Functional criticality weight W q Defect type risk weight W t For example, regarding structural hierarchy, the deeper the nesting, the wider the impact; the weight range is set to... The criticality of a function is set based on the probability of function failure, and the range is... The risk weight for defect type is set based on the historical defect evolution damage ratio statistics, and the range is... In addition, a structural risk coefficient Z is introduced based on the assessment of associated damage to the product structure, and its value range is as follows: Based on this, perform the following exponential modulation formula calculation:

[0131] ;

[0132] In this formula, the first term calculates the fluctuation intensity of the difference between the structural label item and the structural risk item; the second term assesses the stability weight of the functional label; and the third term reflects the impact magnitude of the defect label. The average of these three terms forms the defect anomaly assessment value. For example, the weight and code of a certain component are W... s =0.7、V s =4、W q =0.8、V q =2、W t =1.1、V t =101, Z=1.2, substituting them, we get:

[0133] ;

[0134] The final defect anomaly assessment value of the component was 4.51, which can be directly processed by the downstream interval judgment module.

[0135] The advantage of this formula lies in the introduction of a logarithmic modulation term. By superimposing absolute values ​​and square roots, the nonlinear differences between structural influence items and defect items are dynamically adjusted, and the risk contribution is transformed into an evaluation quantity within a unified dimension, thereby improving the sensitivity and robustness of the overall judgment.

[0136] The interval determination submodule calls the defect anomaly evaluation value and compares it one by one with the upper limit value of each interval in the preset defect level determination interval table. The part numbers that fall into the same level interval are grouped into a set of level classification indexes, and the evaluation value and interval code are attached to generate multi-part level classification results.

[0137] The system calls upon the aforementioned defect anomaly assessment values ​​and sequentially reads the preset defect level judgment interval table. This interval division references statistical results from numerous defect damage level experiments, setting the following standard intervals: Level 1 [0,2), Level 2 [2,4), Level 3 [4,6), Level 4 [6,8), Level 5 [8,+∞). The defect anomaly assessment value of each product component is compared with the upper limit of each interval, and its corresponding level interval is determined. Components are grouped into the same level classification index based on their component numbers. The assessment value and judgment interval code are then combined to form a complete classification entry. For example, if the previous component's assessment value is 4.51, falling within the Level 3 interval, it is classified as Level 3. Finally, a multi-component level classification result is generated. This result will be used as an input item for subsequent control strategy linkage modules.

[0138] Please see Figure 6 The response and linkage module includes:

[0139] The grade retrieval submodule retrieves the packaging unit number and workstation control number corresponding to each grade based on the multi-component grade classification results. It groups the number items according to the grade level, calls the packaging workstation registration table to compare with the group list, filters the workstations that are in operation, and establishes a workstation grade mapping structure set to obtain the workstation grade mapping information.

[0140] Based on the multi-component classification results, the component number set under each level group is read one by one. The packaging unit number and assembly station number fields corresponding to the components are called according to the product assembly binding relationship to form a level-to-level mapping list. Then, the level fields are sorted in ascending order and aggregated into groups. Subsequently, the packaging station registration table is called, and the station number fields contained in each group are compared. Records with the "station running status" field set to "running" are filtered. Finally, a data structure is formed in the mapping table structure, mapping each level group to its contained station numbers in the running status, constructing the station level mapping information. Its basic fields are shown in the table below:

[0141] Table 5 Example of Workstation Registration Form Structure

[0142] Workstation Number Packaging unit number Current status Workstation type Last status update time W010 U001 Running Main assembly 2025-07-1610:12 W011 U002 idle Attached assembly 2025-07-1609:45 W012 U001 Running Testing station 2025-07-1610:08

[0143] As shown in Table 5, only workstation numbers with the status field value of "running" are filtered and then matched to the grade mapping set to achieve cross-retrieval of grade grouping and workstation status.

[0144] The strategy matching submodule calls the workstation level mapping information, matches the response control strategy mapping table according to the level code of each group of level mapping items, extracts the action item label and execution condition threshold attached to the corresponding level code in the control table, judges the value range of each workstation level code and action execution condition, filters the set of workstation numbers that meet the triggering conditions, and obtains the triggering workstation action index set.

[0145] The aforementioned workstation level mapping information is invoked. A mapping relationship is established between the value of each group of level code fields and the level code field in the control strategy mapping table. The "Action Label" and "Execution Condition Threshold" fields in the table are read item by item, group by group. The execution value range of the current workstation level code is judged, with the following condition: if the workstation level code is within the activation threshold range of the specified action item in the strategy table, it is determined to be triggered. The corresponding workstation number is then filtered to construct a triggered workstation action index set. For example, if the strategy mapping table sets levels 3 to 5 as the path switching trigger range, levels 2 to 4 as the task suspension range, and levels 5 and above as the stop trigger range, then the workstation number W010 with the current workstation level code of 3 simultaneously meets the first two conditions and is added to the corresponding triggered workstation action index list. To enhance the rationality of the conditions, the "Execution Condition Threshold" is set according to the following reference standards:

[0146] Level-based stop trigger threshold: Level ≥ 5;

[0147] Level-based task suspension trigger threshold: Level [2,4];

[0148] Level path switching trigger threshold: Level [3,5];

[0149] The logic is set based on the empirical statistical range of the response frequency of the control strategy's impact level, and the median value of the component defect impact weight range is used as the benchmark.

[0150] The instruction generation submodule classifies and indexes the action items corresponding to each workstation number based on the trigger workstation action index set, encapsulates the corresponding stop instructions, task suspension instructions and path switching instructions into structured control fields, assembles the instruction set structure through the control fields, and establishes a defect level linkage control instruction set.

[0151] Based on the trigger station action index set, the actions corresponding to each station number are grouped and categorized according to their trigger type. Each type of action is assigned an independent control field code value, with the stop instruction field set to "C01", task suspension to "C02", and path switching to "C03". A structured data table containing station number, action label field, and control code field is constructed in field order. Each record in this table is then converted into a binary control instruction format. For example, if station number W010 triggers "task suspension", the control field "W010-C02" is generated. Finally, all control fields are combined to generate a defect level linkage control instruction set. This instruction set contains the following field format:

[0152] Workstation number (6 digits) + control field (3 digits) + check digit (1 digit);

[0153] The total field length is fixed at 10 bits to ensure the consistency of the control execution synchronization structure.

[0154] This establishes a response link between level identification and structural control execution, and encapsulates control commands at the end to trigger actions.

[0155] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. An inner package defect detection system characterized by, The system comprises: The illumination control module obtains real-time state information of each product component in the packaging container, multiplies the surface reflectivity value and the angle change value, compares the product with the shielding photosensitive threshold, triggers a plurality of light supplement devices numbered differently in the light source matrix, and obtains a multi-angle light supplement illumination sequence; The boundary recognition module calls the multi-angle light supplement illumination sequence, calculates the Euclidean distance vector between the geometric center reference points set in the packaging structure, classifies the vector set according to the direction difference and the distance variation, identifies whether it constitutes a closed image form, and obtains boundary offset distribution information; The defect aggregation module obtains the Euclidean distance between the centroid and the geometric center point of the product component set in the packaging structure based on the boundary offset distribution information, screens the clustering cluster whose aggregation index exceeds the interval threshold, and obtains a component concentrated abnormal area list; The defect aggregation module comprises: The coordinate collection submodule classifies the defect boundary coordinate points of each product component according to the packaging unit number based on the boundary offset distribution information, extracts the three-dimensional space position value of each item in the classified defect point set, constructs the coordinates into a unified format data set, and obtains a defect three-dimensional coordinate set; The spatial clustering submodule calls the defect three-dimensional coordinate set, calculates the Euclidean distance between the defect point and the remaining points with each defect point as the center, clusters and merges the distance data, extracts the nearest neighbor distance and the number of points in each cluster, takes the mean value of the cluster point coordinates as the cluster centroid, and performs difference calculation on the Euclidean distance between the cluster center point and the geometric center point of the product component in the packaging structure, obtains the aggregation space offset intensity corresponding to each cluster, and marks and aggregates each cluster offset intensity to obtain spatial aggregation feature information; The aggregation screening submodule performs numerical difference calculation on the aggregation space offset intensity of each cluster and the corresponding structure assembly tolerance reference value according to the spatial aggregation feature information, screens the cluster number and the corresponding spatial coordinate range whose aggregation index exceeds the upper limit of the tolerance value interval, establishes a spatial identification index under the corresponding packaging unit, and obtains a component concentrated abnormal area list; The grade mapping module calls the component concentrated abnormal area list, extracts the structure level identifier, functional classification label and defect type label of the associated product component in each abnormal area, calculates the defect abnormal evaluation value, combines the preset defect grade determination interval table, and generates a multi-component grade classification result.

2. The inner package defect detection system of claim 1, wherein The multi-angle light supplement illumination sequence includes excitation angle combination, illumination intensity setting and trigger timing scheme, the boundary offset distribution information specifically refers to edge centripetal difference layer, boundary direction variation layer and offset stability judgment label, the component concentrated abnormal area list includes cluster number index, spatial barycenter position and aggregation intensity identifier, and the multi-component grade classification result specifically refers to component grade mark, grade mapping number and risk coefficient weight value.

3. The inner package defect detection system of claim 2, wherein The illumination control module comprises: The coordinate acquisition submodule acquires real-time state information of each product component in the packaging container, and the real-time state information includes spatial coordinates, component surface reflectivity, minimum gap distance between components, and light source direction angle change value. The light source direction angle change value is corresponded with the component surface reflectivity item by item, a reflection angle response matrix of each product component is constructed, and an angle response matrix dataset is generated; The shielding judgment submodule calls the product of the reflection value and the angle value of each group of product components based on the angle response matrix dataset, performs difference calculation on the product of the reflection value and the angle value and a shielding photosensitive threshold value, aggregates and averages the difference value according to the product component space number, and screens data sequence numbers continuously exceeding the upper limit of the shielding judgment interval as a shielding marker number set to obtain a shielding offset strength corresponding to the product component, calls a component number set whose offset strength value exceeds an offset threshold value, and obtains a shielding trigger number list; The light supplement excitation submodule locates a spatial area of each shielding number corresponding product component in the packaging container according to the shielding trigger number list, calls a light supplement device bound with the area number in a light source matrix, sets a differential light source excitation angle parameter and a time sequence excitation interval value, combines the multi-angle light source parameters to perform illumination excitation, and obtains a multi-angle light supplement illumination sequence.

4. The inner package defect detection system of claim 3, wherein The boundary recognition module includes: The reconstruction imaging submodule calls the multi-angle light supplement illumination sequence, performs spectroscopic angle sequence imaging on each product component in the inner packaging structure, arranges the imaging results according to the light source excitation order to construct an imaging atlas, judges the stability of the overlapping area according to the pixel intensity distribution in the atlas, and obtains imaging brightness stability interval information; The pixel extraction submodule screens an edge area in each frame of image whose brightness distribution meets the stability interval according to the imaging brightness stability interval information, extracts a two-dimensional coordinate value set of each pixel point in the edge area, calculates the Euclidean distance between the boundary point and the geometric center reference point in the inner packaging structure, and obtains a boundary center offset vector set; The contour classification submodule calls the boundary center offset vector set, merges and groups each vector direction angle and vector length, calculates the standard deviation of the included angle difference value and the length variance in each group, judges whether the product component contour constitutes a closed structure according to the attribution group distribution trend, and outputs the contour variation degree to obtain boundary offset distribution information.

5. The inner package defect detection system of claim 4, wherein The level mapping module includes: The label extraction submodule obtains an abnormal area list in the component set, extracts a structure level identifier, a function classification label and a defect type label corresponding to an associated product component in each abnormal area, classifies and encodes the three types of label data, establishes a unified index mapping table, and obtains a component label code set; The weight calculation submodule assigns a structure level weight to the structure level identifier, a function key weight to the function classification label, and a defect type risk weight to the defect type label according to the component label code set, and calculates a defect abnormality evaluation value corresponding to each product component. The interval determination sub-module compares the defect anomaly evaluation value with each upper limit value in the preset defect level determination interval table one by one, classifies the component numbers falling into the same level interval into a group of level classification indexes, and appends the evaluation value and the interval code to generate a multi-component level classification result.

6. The inner package defect detection system of claim 5, wherein, The system further comprises: The response linkage module identifies the action item defined in the response control strategy mapping table to which the current level belongs according to the multi-component level classification result, and performs the stop operation on the station state, the task scheduling unit suspension processing and the material packaging path switching operation to generate a defect level linkage control instruction set when the level identification is in a high-risk level interval. The defect level linkage control instruction set specifically comprises a stop instruction code, a review suspension signal and a station switching command code.

7. The inner package defect detection system of claim 6, wherein The response linkage module comprises: The level retrieval sub-module retrieves the packaging unit number and the station control number corresponding to each level based on the multi-component level classification result, groups the number items according to the level level, calls the packaging station registration table to contrast the grouping list, filters the stations in the running state, and establishes a station level mapping structure set to obtain station level mapping information. The strategy matching sub-module calls the station level mapping information, matches the response control strategy mapping table according to the level code of each group of level mapping items, extracts the action item label and the execution condition threshold loaded under the corresponding level code in the control table, and performs value interval judgment on the current each station level code and the action execution condition, filters the station number set satisfying the trigger condition, and obtains the trigger station action index set. The instruction generation sub-module classifies and indexes the action items corresponding to each station number according to the trigger station action index set, encapsulates the corresponding stop instruction, task suspension instruction and path switching instruction into a structured control field, assembles the instruction set structure through the control field, and establishes the defect level linkage control instruction set.

Citation Information

Patent Citations

  • Surface defect detection method based on fine-grained prototype online learning

    CN117576434A

  • Industrial equipment anomaly detection method and system based on machine vision

    CN120339254A