An online grading and removing system for sub-packaging quality based on dynamic timing detection data
The online grading and rejection system for packaging quality, which uses dynamic time-series detection data, solves the problem of misjudgment of container contents in existing technologies, and achieves accurate classification and sorting of materials in containers, reducing misjudgment rate and product loss.
Patent Information
- Application Number
- CN202611323681.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-28
- Publication Date
- 2026-11-24
AI Technical Summary
Existing visual inspection methods have difficulty distinguishing between actual underfilling or overfilling in transparent or semi-transparent containers and foam obstruction or transient liquid surface swaying. Furthermore, they are prone to misjudgment under conditions such as equipment obstruction, reflection, and motion blur, leading to inaccurate product classification.
An online grading and rejection system for dispensing quality based on dynamic time-series detection data is adopted. The system continuously acquires container images through first and second industrial cameras, divides the detection area, filters valid image sequences, separates the material body boundary, foam boundary and material bundle boundary, tracks the material bundle retraction and residual drip formation process, generates filling deviation, liquid level fluctuation and foam residue index, determines dispensing quality risk according to scenario classification, and controls the diversion mechanism to perform online sorting.
It improves the reliability of visual inspection results, can distinguish between abnormal filling and transient abnormalities, reduces the excessive rejection of recoverable products, limits the inflow of sealed contamination and reworkable invalid products, and forms a closed loop of inspection, classification, processing and rejection.
Smart Images

Figure CN123160945A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial visual inspection and automatic sorting technology, specifically to an online grading and rejection system for packaging quality based on dynamic time-series inspection data. Background Technology
[0002] Existing continuous filling production lines for liquids, emulsions, and pastes typically transport transparent or semi-transparent bottles, cups, and flexible containers with transparent viewing sections sequentially to the filling station. Materials are then dispensed using metering valves or filling nozzles. Subsequent stations inspect the filling volume, container cleanliness, and appearance. As production rates increase, manual sampling becomes insufficient to consistently cover every filling container. Industrial vision inspection is increasingly being used to capture images of the container interior, actual liquid level, foam, filling nozzles, material bundles, container openings, and the container's outer wall. Based on the detected characteristics, a flow control mechanism is used to transport products to normal channels, re-inspection channels, rework channels, or rejection channels, thereby achieving automatic classification and sorting of continuously transported items.
[0003] Existing visual inspection methods typically select a single image after filling and judge pass / fail based on visible liquid level, container mouth stains, or residual drips on the outer wall. This makes it difficult to distinguish between actual underfilling or overfilling and differences caused by foam obstruction or transient liquid surface fluctuations. It also makes it difficult to track the material bundle retraction, filament breakage, residual drip formation, and cross-cycle dripping processes after filling stops. When the image is affected by equipment obstruction, container reflection, motion blur, or trajectory mismatch, the single frame result may also be incorrectly matched with the specific filling container. Existing solutions usually make a unified judgment on multiple inspection results, lacking scenario correction for stable flow, foam, filament, and complex states. They also do not perform delayed re-inspection, refilling, back-drawing, defoaming cleaning, container mouth cleaning, or direct rejection according to the type of abnormality and the possibility of recovery. This easily leads to problems such as serious single defects being weakened by other normal results, recoverable products being over-rejected, or contaminated products not being sorted in a timely manner. Summary of the Invention
[0004] The purpose of this invention is to provide an online grading and rejection system for packaging quality based on dynamic time-series detection data, so as to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: An online grading and rejection system for packaging quality based on dynamic time-series detection data includes: The image acquisition and region segmentation module is used to continuously acquire images of the packaging process of the packaging container through the first industrial camera and the second industrial camera, associate the image frames with the corresponding packaging container to form a packaging cycle, and perform the segmentation of the packaging detection area. The timing filtering module is used to filter valid packaging image frames based on the visibility of the packaging detection area, the continuity of the packaging container's trajectory, and the clarity of the image edges, forming a valid packaging image sequence. The visual analysis module for dispensing status is used to separate the material body boundary, foam boundary and material bundle boundary from the effective dispensing image sequence, obtain the actual liquid surface position, and generate the filling deviation index, liquid surface fluctuation index and foam residue index. The material breakage pollution tracking module is used to track the process of material bundle retraction, wire breakage, residual drop formation and residual drop movement, and to generate a material breakage pollution risk index based on the wire status, residual drop area and residual drop landing point; The scenario classification module is used to determine the packaging scenario based on changes in foam, changes in hanging threads, and the formation of residual drips. The quality grading and online rejection module is used to correct the filling deviation index, liquid level fluctuation index, foam residue index, and material breakage contamination risk index according to the filling scenario. It determines the maximum scenario correction risk item from the correction results, generates the filling quality risk index, and classifies the filling containers into direct release level, delayed re-inspection level, rework level, or direct rejection level. Based on the quality level and the maximum scenario correction risk item, it controls the diversion mechanism to send the filling containers into the corresponding processing channel and updates the final quality level after rework or delayed re-inspection.
[0006] Compared with the prior art, the beneficial effects of the present invention are: This invention continuously acquires dynamic time-series images of the interior of the dispensing container, the filling nozzle, the material bundle, the container opening, and the outer wall of the container using a first industrial camera and a second industrial camera. The image frames are associated with specific dispensing containers, and effective dispensing image sequences are selected based on the visibility of the area, the continuity of the trajectory, and the clarity of the image. This can reduce the impact of occlusion, reflection, motion blur, and mismatch between adjacent containers on the visual detection results, and improve the reliability of the image data used for online classification.
[0007] This invention separates the material body boundary, foam boundary, and material bundle boundary to obtain the filling deviation, liquid level fluctuation, and foam residue status, and continuously tracks material bundle retraction, wire breakage, residual drip formation, and contamination landing point. It can distinguish between actual filling abnormalities, transient recoverable abnormalities, cleanable contamination, and high-risk contamination that affects sealing or downstream adjacent containers. Furthermore, it determines the filling scenario based on foam and wire changes, and uses scenario correction and the principle of maximum risk to generate filling quality risk results, avoiding the average weakening of serious single defects by other low-risk detection results.
[0008] This invention also determines processing authority through quality level, and matches normal conveying, buffer re-inspection, static defoaming, quantitative replenishment, quantitative back-drawing, defoaming cleaning, container mouth cleaning, isolation or rejection channels through the main risk types. After rework or delayed re-inspection, visual inspection and quality level are re-performed, so that the visual inspection results directly correspond to the online sorting action of the diversion mechanism, forming a closed loop of detection, classification, processing, re-inspection and rejection. While reducing the excessive rejection of recoverable products, it limits the continued flow of sealed contamination, cross-cycle coefficient and rework invalid products into subsequent processes. Attached Figure Description
[0009] Figure 1 This is a schematic diagram of the overall technical process of the present invention; Figure 2 This is a schematic diagram of the execution flow of the image acquisition and region segmentation module of the present invention; Figure 3 This is a schematic diagram of the execution flow of the timing filtering module of the present invention; Figure 4 This is a schematic diagram of the execution flow of the visual analysis module for the packaging status of the present invention; Figure 5 This is a schematic diagram of the execution flow of the material shortage and contamination tracking module of the present invention; Figure 6 This is a schematic diagram of the execution flow of the scene classification module of the present invention; Figure 7 This is a schematic diagram of the execution flow of the quality grading and online rejection module of the present invention. Detailed Implementation
[0010] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0011] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0012] Example 1: Appendix Figure 1 Multiple dispensing containers at different filling times together represent the temporal relationship between image frames and specific dispensing containers. Dual industrial cameras are set to face the container interior, actual liquid surface, foam, container outer wall, filling nozzle, material bundle, and container opening respectively, corresponding to continuously acquiring images of the dispensing process and dividing the dispensing detection area.
[0013] Appendix Figure 1The material body boundary, liquid surface outline, and foam boundary inside the container correspond to the actual liquid surface position identification, filling deviation, liquid surface fluctuation, and foam residue analysis performed by the visual analysis module for the dispensing state; the material bundle retraction, wire breakage, residual drop formation, and residual drop movement state below the filling nozzle correspond to the wire state, residual drop area, and residual drop landing point tracking performed by the material breakage and contamination tracking module.
[0014] Please see Figures 1 to 7 The present invention provides a technical solution: To clarify the technical solution, parameter sources, and execution relationships of this invention, the specific implementation methods of this invention will be described below in conjunction with the actual operation process of a continuous dispensing production line. This invention is used to dispense low-viscosity liquids, easily foaming liquids, high-viscosity emulsions, and pastes into transparent or semi-transparent bottles, cups, and flexible containers with transparent observation sections that have a visible dispensing area. Furthermore, it performs online classification, diversion, and rejection of the dispensing containers based on continuous visual inspection results.
[0015] This embodiment reads the product formula parameter file of the production line and selects a 250mL transparent polyester bottle as a data example. The product formula parameter file records that the height of the dispensing container is 140mm, the effective internal height of the container is 120mm, and the production cycle recorded by the conveyor controller is 120 dispensing containers per minute. The first industrial camera is installed on the side of the filling station to capture the main material, actual liquid level, and foam in the internal area of the container. A backlight is provided on the opposite side of the first industrial camera. The second industrial camera is installed diagonally above the filling nozzle to capture the filling nozzle outlet, material bundle, filaments, residual drips, container mouth, and the upper part of the container's outer wall. A ring light is provided on the outside of the lens of the second industrial camera.
[0016] A photoelectric triggering device is installed at the entrance of the conveyor line, and a conveyor encoder is installed on the conveyor mechanism. The system associates the photoelectric triggering results, the conveyor encoder results, and the outline of the packaging container in the continuous image.
[0017] The visual re-inspection station is equipped with a first re-inspection camera and a second re-inspection camera. The imaging direction, backlighting method, and size calibration method of the first re-inspection camera are the same as those of the first industrial camera. The imaging direction, ring lighting method, and container opening area calibration method of the second re-inspection camera are the same as those of the second industrial camera.
[0018] Record the repackaging container number as , will be with the Each dispensing container is denoted by a dispensing cycle number. The image frame number is recorded as Record the repackaging scene number as The visual detection index type is denoted as ,and ,in, Indicates the filling volume. Indicates liquid level fluctuation. Indicates foam. This indicates a material shortage contamination. The above index will not be used to represent other objects throughout the text.
[0019] The constant used to limit the lower limit of the denominator is denoted as the zero-prevention constant. The system selected samples with visual detection indices between 0 and 0.02 before processing and recalculated using 0.0001, 0.001, and 0.01 as the lower limit of the denominator, respectively. When using 0.0001, the rounding error of the minimum index was significantly amplified. When using 0.01, the true decrease ratio was continuously suppressed. When using 0.001, the calculation result remained stable during repeated imports and recalculations and did not change the normal index result retained to the thousands place. Therefore, the verified value of 0.001 was used as the zero-prevention constant. The preferred value.
[0020] Example 2: The system includes an image acquisition and region segmentation module, a time-series filtering module, a visual analysis module for packaging status, a material breakage and contamination tracking module, a scene classification module, and a quality grading and online rejection module.
[0021] The image acquisition and region division module is used to collect continuous images of each dispensing container from the time it enters the filling station until the filling stops. The image frames are associated with the dispensing container numbers, and the dispensing detection areas are divided for detecting liquid surface, foam, hanging threads, residual drips and contamination points.
[0022] The timing filtering module is used to filter valid packaging image sequences based on the visibility of the packaging detection area required in the current processing stage, the continuity of the packaging container trajectory, and the clarity of the image edges.
[0023] The visual analysis module for dispensing status is used to separate the material body boundary, foam boundary, and material bundle boundary, and generate the filling deviation index, liquid level fluctuation index, and foam residue index.
[0024] The material breakage contamination tracking module is used to track material bundle retraction, wire breakage, residual drip formation, and residual drip landing point, and generate a material breakage contamination risk index.
[0025] The scenario classification module is used to divide the packaging process into steady flow packaging scenario, foam-dominated packaging scenario, wire-dominated packaging scenario, or foam-wire composite packaging scenario.
[0026] The quality grading and online rejection module is used to determine the packaging quality level based on the aforementioned visual inspection index and packaging scenario, and to control the diversion mechanism to send the packaging containers into the corresponding processing channel.
[0027] S101. When the photoelectric triggering device detects that the dispensing container has entered the image acquisition range, the system assigns a dispensing container number to the dispensing container. The system controls the first and second industrial cameras to begin acquiring images of the packaging process, and writes the packaging container number to each frame of the image. Image frame number Data acquisition time and encoder location are missing; repackaging container number is also missing. Image frames that do not correspond to the position of the conveyor encoder are not used for product quality determination.
[0028] S102, The system predicts the position of the conveyor encoder based on the position of the first... The center position of each sub-container in the current image frame, and the extraction of the first sub-container near the predicted position. The outer contour of each packaging container. When the outer contours of the packaging containers in adjacent image frames remain continuously overlapping, and the center position of the packaging containers continuously changes along the conveying direction, the corresponding image frame is assigned to the packaging container number. The system will... The image frames consisting of the following segments—from the moment a dispensing container enters the filling station, begins receiving material, continues receiving material, stops receiving material, and leaves the material breakage observation range—are numbered as follows: The repackaging cycle.
[0029] S103, the system starts from the number... During the filling cycle, valid filling image sequences are selected, and the material body boundary, foam boundary, and material bundle boundary are separated from the valid filling image sequences. The system obtains the actual liquid level position based on the upper boundary of the material body, obtains the liquid level fluctuation state based on the continuous change of the actual liquid level position after filling stops, and obtains the foam residue state based on the area, duration of the foam region, and area decrease state, generating the filling deviation index, liquid level fluctuation index, and foam residue index.
[0030] S104. The system uses the image frame showing the continuous retraction of the material bundle as the starting point for material breakage observation, continuously identifying the processes of material bundle necking, filament extension, filament breakage, residual drip formation at the filling nozzle, and drip movement. Based on the drip trajectory, the system determines whether the residual drip has entered the container's internal area, outer wall area, outer edge of the container opening, sealing contact area, or downstream adjacent container area, generating a material breakage contamination risk index. The system further determines the filling scenario based on visual changes in foam and filament.
[0031] S105. The system sends the filling deviation index, liquid level fluctuation index, foam residue index, material shortage contamination risk index, and filling scenario to the quality grading and online rejection module. The quality grading and online rejection module generates a filling quality risk index, classifying the filling containers into direct release level, delayed re-inspection level, rework level, or direct rejection level, and controls the diversion mechanism to send the filling containers into the normal conveying channel, buffer re-inspection channel, static defoaming channel, quantitative replenishment channel, quantitative back-drawing channel, defoaming cleaning channel, container mouth cleaning channel, isolation channel, or rejection channel.
[0032] This embodiment sequentially links dynamic visual acquisition, effective image screening, dispensing status analysis, material breakage and contamination tracking, scene classification, and online diversion, so that each visual inspection result corresponds to a specific dispensing container.
[0033] Example 3: This embodiment illustrates the process of synchronous acquisition of images during the packaging process, association of packaging containers, division of packaging detection areas, and screening of effective packaging image sequences.
[0034] S201. Camera parameters are obtained in the order of "first determining the time sampling requirements, then conducting exposure tests". When the production cycle is 120 dispensing containers per minute, the average passing interval between adjacent dispensing containers is approximately 0.5 seconds. The system performs continuous sampling verification at frequencies of 50, 75, 100, and 125 times per second. When the sampling frequency is 50 or 75 times per second, only a small number of image frames are retained during some wire disconnection processes. When using 125 times per second, the amount of data increases significantly, but the scene classification results do not continue to improve. When using 100 times per second, a frame interval of 10 ms can be formed, and approximately 40 frames of images can be obtained within a stable observation period of 0.40 seconds. Therefore, 100 times per second is determined as the trigger frequency in this embodiment. Exposure times of 0.5ms, 1ms, 1.5ms, 2ms, and 2.5ms were tested on the first industrial camera. At 0.5ms, the edge signal of the dark area of the material body was insufficient; at 2.5ms, the conveyor motion formed a visible trailing image. The range of 1ms to 2ms simultaneously met the requirements for continuous liquid surface edge and signal-to-noise ratio in the dark area. Therefore, this test range was selected as the preferred exposure time for the first industrial camera. The second industrial camera was tested using the same method for candidate exposure times of 0.25ms to 2ms. The range of 0.5ms to 1.5ms was able to simultaneously preserve the drip outline and the edge of the filling nozzle exit, and therefore was selected as the preferred exposure time for the second industrial camera.
[0035] The output resolution is determined based on the smallest droplet size to be identified and the camera's field of view. The second industrial camera needs to identify droplets with a diameter of approximately 0.8 mm within a horizontal field of view of approximately 180 mm. At a horizontal resolution of 1920 pixels, a single smallest droplet can cover approximately 8 pixels, supporting the extraction of connected regions and trajectory centers. At 1280 pixels, the smallest droplet only covers approximately 5 pixels, and the edges are prone to breakage due to reflections. To maintain consistency in container numbering and region templates between the two images, the first industrial camera uses the same 1920 pixel × 1200 pixel output resolution. Therefore, a unified trigger controller is set to trigger 100 times per second, and the output resolution of both industrial cameras is set to 1920 pixels × 1200 pixels.
[0036] S202. The system obtains the predicted movement distance of the dispensing container in the conveying direction based on the pulse changes of the conveying encoder between adjacent trigger times, and moves the center position of the dispensing container in the previous image frame by the predicted movement distance along the conveying direction to obtain the predicted center position in the current image frame. The system extracts the closed outer contour of the dispensing container around the predicted center position, and excludes the edges of the filling equipment and adjacent dispensing containers based on the position, area, and aspect ratio of the outer contour of the dispensing container.
[0037] The outer contour of the dispensing container is obtained using background subtraction and contour extraction. The system establishes a background template using a backlit image without the dispensing container, performs an absolute difference between the current image and the background template, and then uses the Otsu thresholding method to obtain candidate container regions. The system performs closing operations on the candidate container regions using 3-pixel × 3-pixel, 5-pixel × 5-pixel, and 7-pixel × 7-pixel rectangular structural elements. In a set of contour calibration images, the 3-pixel × 3-pixel structural element can connect small 1-2 pixel gaps in the transparent container contour without merging adjacent reflective edges. The 5-pixel × 5-pixel and 7-pixel × 7-pixel structural elements cause some container opening edges to connect with the filling equipment edges. Therefore, the 3-pixel × 3-pixel rectangular structural element is selected as the preferred structural element.
[0038] The system extracts the closed contour after the closing operation. The contour area and aspect ratio range of the repackaging container are obtained from images of normal repackaging containers of the same specifications. Specifically, the contour area and aspect ratio of no less than 100 normal repackaging containers are sorted from smallest to largest, and the range between the 5th and 95th percentiles are written into the product formula parameter file. The system selects the closed contour around the prediction center of the conveyor encoder, where both the contour area and aspect ratio are within the corresponding range, as the outer contour of the current repackaging container.
[0039] When the feed stream boundary begins to intersect with the interior region of the container, the system determines the first... The first dispensing container begins receiving material. When the material bundle boundary begins to continuously retract, the system determines the... The first dispensing container enters the material shortage monitoring stage. The system will... The image frames consisting of all images from the moment the dispensing container enters the image acquisition range until it leaves the material breakage observation range are numbered as follows: The repackaging cycle.
[0040] S203, the system will... Each dispensing container and its corresponding filling nozzle are divided into a filling nozzle observation area, a material bundle observation area, an internal container area, an outer edge area of the container opening, a sealing contact area, an outer wall area of the container, and a downstream adjacent container area. The dispensing inspection areas and their visual inspection purposes set in this embodiment are shown in Table 1.
[0041] Table 1: Packaging Inspection Areas and Visual Inspection Applications The system statistically analyzed the maximum lateral offset of the residual droplet center relative to the nozzle outlet profile from no fewer than 100 normal dispensing cycles. In one set of calibration results, the 95th percentile offset was 0.82 times the nozzle outlet diameter. To cover remaining installation deviations and minor vibrations, a safety margin of approximately 0.5 times the outlet diameter was added to the 0.82 times margin, resulting in an expansion requirement of approximately 1.32 times. After rounding up to a 0.5 times step size for easy use of area templates, the expansion distance of the nozzle observation area was determined to be 1.5 times the nozzle outlet diameter. For the material bundle observation area, the maximum lateral extension on both sides of the hanging wire was statistically analyzed using the same calibration sample. The combined width of the central material bundle and the margin on both sides was approximately 2.7 times the outlet diameter. After rounding up, the area width was determined to be 3 times the nozzle outlet diameter.
[0042] The internal area of the container excludes the high-curvature areas at the bottom and shoulder of the container to reduce false edges caused by refraction from the curved surface of the transparent container. The outer edge area of the container opening and the sealing contact area are marked separately and do not overlap to prevent the same residual droplet from corresponding to two contamination landing points simultaneously. The downstream adjacent container area corresponds to only one dispensing container after the current dispensing container and is bound to the corresponding dispensing container number.
[0043] S204, the system will... The first dispensing container in the... The outer contour in the frame image, and the first The ratio of the intersection area and the union area of the outer contours of the packaging containers in the frame image after translation by the conveyor encoder is denoted as the contour overlap ratio. Outline overlap ratio This is the area ratio. The system will use the first... The Euclidean distance between the actual identified center position of the dispensing container in the frame image and the predicted center position of the conveyor encoder is denoted as the trajectory prediction position deviation. The unit is pixels. The number is... The first image frame in the packaging cycle serves only as the trajectory reference frame; the contour overlap ratio is calculated starting from the second image frame. and trajectory prediction position deviation .
[0044] The 90th percentile value corresponding to the trajectory prediction position deviation of normally transported samples is recorded as the trajectory deviation reference value. The unit is pixels. The system collects no fewer than 200 samples of qualified packaging containers that are normally transported, and sorts the trajectory prediction position deviations from smallest to largest. In the calibration results of a set of 1920 pixel × 1200 pixel images, the 90th percentile is 7.6 pixels. 7.6 pixels is rounded down to the nearest integer pixel as 8 pixels. Therefore, the trajectory deviation reference value is... The preferred setting is 8 pixels, and it meets the following requirements. .
[0045] The first The first dispensing container in the... The trajectory continuity evaluation result in the frame image is denoted as the trajectory continuity coefficient. Trajectory continuity coefficient The specific calculation formula is as follows: ; Outline overlap ratio The higher the value, the greater the deviation in trajectory prediction position. The smaller the value, the greater the continuity coefficient of the trajectory. The closer it is to 1.
[0046] The system determines the edge range for clear evaluation based on the current processing stage. During the filling stage, the inner edge of the container and the edge of the material stream are selected; during the material cut-off stage, the edge of the filling nozzle outlet, the edge of the material stream, and the edge of the container opening are selected; and during the stable observation stage, the candidate edges of the actual liquid level and the edge of the container opening are selected.
[0047] The system for the first The first dispensing container in the... Laplacian filtering is applied to the selected edge region of the frame image to obtain the Laplacian response value of each pixel within the selected edge region. Then, the variance of all Laplacian response values is calculated, and the result is recorded as the current Laplacian response variance. The unit is grayscale squared. Current Laplace response variance. The larger the value, the more pronounced the grayscale variation between adjacent pixels within the selected edge range. Current Laplacian response variance The smaller the value, the more likely the current image is out of focus, has motion blur, or lacks local contrast.
[0048] The 20th percentile value of the Laplacian response variance of the qualified calibration image is recorded as the sharpness reference value. The unit is grayscale squares. The system acquires no fewer than 200 qualified calibration images covering different imaging positions of the liquid surface, material jet, filling nozzle outlet, and container opening. The Laplacian response variance of each image is calculated using the same method as the current image, and then sorted in ascending order. In a set of calibration results in this embodiment, the 20th percentile is 792 grayscale squares; therefore, a clear reference value is used. The value is set to 792 grayscale squares. This value is an example value under the imaging device, image resolution, lighting conditions, and edge extraction range of this embodiment. In actual applications, it will be recalculated based on the qualified calibration image of the corresponding production line.
[0049] The first The first dispensing container in the... The sharpness evaluation result of a frame image is denoted as the image sharpness index. Image sharpness index The specific calculation formula is as follows: ; In the formula, the current Laplace response variance With clear reference values The units are all grayscale squares. Current Laplace response variance. Not lower than the clear reference value At that time, image sharpness index Set to 1. Current Laplace response variance Below the clear reference value At that time, image sharpness index With the current Laplace response variance It decreases as the quantity decreases.
[0050] S205. The system selects the necessary dispensing and detection areas according to the current processing stage. During the filling stage, it selects the container interior area and the material bundle observation area. During the material cut-off stage, it selects the filling nozzle observation area, the material bundle observation area, the container mouth outer edge area, and the sealing contact area. During the stable observation stage, it selects the container interior area, the container mouth outer edge area, and the sealing contact area.
[0051] Unmasked pixels are determined jointly by a static device mask and a dynamic container mask. The static device mask is generated from continuously acquired images of the filling equipment when there are no dispensing containers, and is used to mark the mounting bracket and the main body of the filling nozzle. The dynamic container mask is generated from the outer contours of the current dispensing container and adjacent dispensing containers. The system calculates the ratio of the number of pixels not obscured by the filling equipment and adjacent dispensing containers in the selected dispensing detection area to the total number of pixels in the corresponding area, and records the minimum value of the ratio for each area as the [n]th [pixel]. The first dispensing container in the... Visible proportions of the area in the frame image .
[0052] Increase the visibility of the area Trajectory continuity coefficient Image sharpness index The geometric mean result is denoted as the time series effective coefficient. Timing effective coefficient The specific calculation formula is as follows: ; In the formula, the visible area ratio Trajectory continuity coefficient Image sharpness index All are ratios or coefficients. The effective time series coefficient is the value of any one of the three lower-level parameters when any one of the three lower-level parameters decreases significantly. Simultaneously reduce the parameter to avoid masking another image anomaly.
[0053] The comparison threshold used to select valid packaged image frames is denoted as the temporal effective threshold. The system uses 0.60, 0.65, 0.70, 0.75, and 0.80 as candidate values to filter samples of manually labeled as usable and unusable image frames. In a set of validation results, the candidate value of 0.70 corresponds to the lowest sum of retained unusable images and incorrectly removed valid images; therefore, the temporal effective threshold is selected. The preferred setting is 0.70. This is the effective coefficient for the time series. Not lower than the effective threshold of the timing When the time sequence is valid, the corresponding image frame is determined as the valid image frame. Below the effective threshold of the time series At that time, the actual liquid level, foam, hanging thread, and residual droplet parameters are not calculated using the corresponding image frame.
[0054] S206, The system follows the image frame numbering. The valid dispensing image frames are sorted, and time-continuous valid dispensing image frames are combined into a valid dispensing image sequence. The valid dispensing image sequence must at least cover the filling start stage where the material bundle enters the container's interior area, the stable filling stage where the material bundle continues to exist, the filling stop stage where the material bundle begins to retract, and the material breakage and stabilization stage where the filaments break and the foam changes. If any stage is missing, the corresponding dispensing container is marked as a container to be re-inspected in the visual sequence, and the final quality grade is not directly generated.
[0055] The adjustment range for low-quality images was obtained through step-by-step trial and error. For area occlusion, the system sequentially delayed the image acquisition end position by 10%, 20%, and 30%. A 10% increase in the number of unobstructed frames was insufficient; a 30% increase began to result in image overlap between the current packaging container and downstream adjacent containers; and a 20% increase was sufficient to supplement the required image frames without altering container relationships. Therefore, 20% was the preferred value. For images that were too dark, the system increased the illumination output by 5%, 10%, 15%, and 20%, respectively. A 15% increase restored the image sharpness index of most samples to the range corresponding to the effective temporal threshold. Further increases to 20% began to increase local highlight saturation; therefore, 15% was the preferred value. Based on a 15% increase in illumination, further tests were conducted to increase the exposure time by 5%, 10%, and 15%. A 10% increase compensated for dark area signals without creating new motion blur; therefore, 10% was the preferred value, and both adjustments were performed only once.
[0056] When the area is visible When the parameter is the smallest of the three lower-level parameters, the end position of subsequent image acquisition is delayed by 20% along the conveying direction. When the trajectory continuity coefficient... When the parameters are minimized, the outer contour of the packaging container is re-extracted centered on the position predicted by the conveyor encoder. If the contour cannot be recovered after three consecutive image frames, the corresponding packaging container is marked as a container to be re-inspected in the visual sequence. When the image sharpness index... When the parameters are set to minimum, the corresponding lighting output will be increased by 15% and the exposure time will be increased by 10% for subsequent dispensing containers. This adjustment will only be performed once.
[0057] In a set of running examples, the outline overlap ratio of the 18th dispensing container in the 236th frame image. The deviation of the trajectory prediction position is 0.95. The value is 1.8 pixels, and the trajectory deviation reference value is... 8 pixels, trajectory continuity coefficient Approximately 0.759. Current Laplace response variance. 720 grayscale square, clear reference value The image sharpness index is 792 gray squares. Approximately 0.909. Area visibility ratio. The effective coefficient for timing is 0.96. The value is approximately 0.872, which is higher than the effective threshold for timing. Therefore, the 236th frame is determined to be a valid sub-frame.
[0058] This embodiment establishes container-level image association by using the outline of the dispensing container and the results of the conveying encoder, and defines seven types of dispensing detection areas separately, which can reduce the impact of adjacent dispensing containers, filling equipment obstruction, and reflections from transparent containers on subsequent calculations. This is achieved through time-series effective coefficients. Excluding low-quality image frames with occlusion, trajectory interruption, and image blur can reduce misjudgment of load volume and contamination landing point caused by low-quality visual data.
[0059] Example 4: This embodiment illustrates the separation methods of the material bulk boundary, foam boundary, and material bundle boundary, as well as the filler deviation index. Liquid surface fluctuation index and foam residue index The generation method.
[0060] S301. The system uses the backlight reference image acquired when there is no dispensing container to perform background correction on the image of the first industrial camera, and generates an internal mask for the container based on the inner wall contour to exclude the high curvature areas of the container bottom and shoulder. The system obtains the material body area, foam area, and material bundle area based on the connection relationship with the container bottom, the texture of the foam pores, and the connection relationship with the filling nozzle outlet, respectively, and maps the material bundle area to the container opening cross-section range of the first industrial camera to exclude the actual liquid surface candidate edges covered by the material bundle area. To enable the above areas to be repeatedly extracted, the specific image processing procedure is as follows.
[0061] The material body region, foam region, and material bundle region are extracted according to a repeatable image processing workflow. For the material body region, the system uses the Otsu thresholding method to obtain foreground pixels in the container interior region after background correction, retains the largest connected region connected to the bottom of the container, and performs a closing operation using a 3-pixel × 3-pixel rectangular structuring element to fill small gaps of 1 to 2 pixels without merging adjacent edges.
[0062] For foam regions, the system extracts candidate pixels with brightness higher than the local background average above the upper boundary of the material body. A 3-pixel × 3-pixel rectangular structuring element is used to perform an opening operation to remove isolated reflective points. The system is validated with at least one, two, and three connected dark hole regions as candidate conditions. When there is at least one connected dark hole region, some single reflective voids are misidentified as foam. When there are at least three connected dark hole regions, some sparse foam is missed. When there are at least two connected dark hole regions, most isolated reflections are eliminated while sparse foam is retained. Therefore, the system retains candidate regions with at least two internal connected dark hole regions that overlap in position across three consecutive valid packaging image frames as foam regions.
[0063] For the feed bundle region, the system employs edge detection and connected component analysis within the feed bundle observation area to retain candidate connected regions that contact the filling nozzle outlet at the top. The system uses 10°, 15°, and 20° as upper limits for the candidate principal axis deflection angle. 15° can cover the slight deflection of the normal feed bundle and is unlikely to be introduced into the container sidewall edge; therefore, the angle between the principal axis direction of the candidate connected region and the vertical direction of the image is limited to no more than 15°. The system uses 1.5 times, 2 times, and 2.5 times the average width of the feed bundle during the stable filling stage as upper limits for the candidate width. 1.5 times would truncate the wider, retracted feed bundle at the initial stage of filling cessation; 2.5 times is prone to being introduced into the container opening edge; and 2 times can retain feed bundle variations and limit non-feed bundle edges. Therefore, the upper limit for width is set to twice the average width of the feed bundle during the stable filling stage.
[0064] S302. The lateral sampling range of the liquid surface is determined by calibrating the container image. The system compares the deviation between the known horizontal liquid surface and the visual edge across the entire width of the container, finding that the deviation near the left and right inner walls increases with the container curvature. In one set of calibration results, there is a persistent refractive deviation in approximately 18% on the left and 19% on the right. To facilitate the use of a uniform template across different batches of containers, the system rounds up the exclusion range on both sides to 20%, thus retaining the smooth imaging area in the middle (60%).
[0065] The system acquires the upper boundary pixels of the material body within the middle 60% range of the container's internal width, excluding the left and right 20% ranges closest to the container's inner wall. The system then... The first dispensing container in the... The median of the vertical coordinates of the pixels at the upper boundary of the material body in the frame image is denoted as the ordinate of the actual liquid surface pixels. The unit is pixels.
[0066] The actual liquid surface pixel ordinate A piecewise linear calibration is used between the physical height and the actual liquid level. During equipment installation, materials of known volumes are sequentially added to calibration containers of the same specifications until the liquid level covers the product's permissible height range. The pixel ordinates corresponding to each known liquid level height are recorded, forming a pixel position-liquid level height calibration table. When the actual liquid level pixel ordinates... When the value falls between two adjacent calibration points, piecewise linear interpolation is used to obtain the first calibration point. The first dispensing container in the... The current actual liquid level position in the frame image is denoted as... The unit is mm. For irregularly shaped containers whose cross-sectional area varies with height, the volume-liquid level calibration table in the corresponding product formula parameter file is used, and constant cross-sectional area conversion is not adopted.
[0067] When the acquisition frame rate is 100 frames per second, the system uses the current actual liquid level position from the last 5, 10, and 15 frames of the stable observation period, respectively. The median value of the liquid level at the end is calculated. Five-frame results are easily affected by single foam bursts or reflections; 15-frame results include liquid level fluctuations that haven't fully decayed; and 10-frame results, corresponding to approximately 0.10 seconds, balance anomaly suppression and representativeness of the end state. Therefore, the system selects the current actual liquid level position from the last 10 valid image frames of the stable observation period. And the median is denoted as the th. The actual liquid level in each dispensing container The unit is mm.
[0068] S303. Record the lower limit of the qualified liquid level position specified in the current product packaging process standard as the lower limit of the liquid level position. The upper limit of the qualified liquid level position is recorded as the upper limit of the liquid level position. All units are in mm and satisfy the following conditions: The actual liquid level position The normalized deviation relative to the acceptable liquid level range is denoted as the fill deviation index. Content deviation index The specific calculation formula is as follows: ; Actual liquid level When within the acceptable range, the filling deviation index Set to 0. Actual liquid level. After exceeding the acceptable range, the filling deviation index It increases with the distance exceeded.
[0069] S304. The stable observation period is obtained by statistically analyzing the decay time of normal liquid surface oscillation. During equipment calibration, after the liquid surface of a normally filled sample has stopped oscillating significantly, the system selects 10 consecutive valid dispensing image frames and calculates the current actual liquid surface position within each of the 10 consecutive frame windows. The difference between the maximum and minimum values is used as the reference value for liquid level stability range, and the 90th percentile of the difference corresponding to at least 200 normal filling samples is recorded as the reference value. The unit is mm. For each normally filled sample after filling stops, the system moves 10 consecutive frames in chronological order. The system determines the liquid level range if the actual liquid level position range within the current 10 consecutive frames and the immediately following 10 consecutive frames is not higher than the reference value for liquid level stability range. When the liquid level fluctuations reach a stable range, the start time of the current 10 consecutive frame windows is recorded as the time when the stable range is reached. In a set of statistical results, 90% of the normal samples met the above conditions within 0.36 seconds after filling stopped. The stable observation period was set with a control step size of 0.05 seconds. The 0.36 seconds was adjusted upward to 0.40 seconds. At 100 frames per second, approximately 40 frames of observation data can be obtained, and this period is shorter than the average passing interval of 0.5 seconds between adjacent dispensing containers. Therefore, 0.40 seconds after filling stopped is set as the stable observation period.
[0070] The first Time-series effective coefficient of each dispensing container during a stable observation period Not lower than the effective threshold of the timing The set of image frame numbers is denoted as the effective stable frame set. This will effectively stabilize the set of frames. The number of image frames contained therein is denoted as the number of effective stable frames. The system recalculated the normalized standard deviation of the liquid surface position using 10, 20, and 30 frames of effective images, respectively. The results from 10 frames were significantly affected by edge offsets in a single frame, while the results from repeated calculations of 20 frames or more tended to be stable. Therefore, when the number of effective stable frames... When there are fewer than 20 frames, the liquid level fluctuation index is not calculated, and the corresponding dispensing container is marked as a container to be re-inspected in the visual sequence.
[0071] The effective internal height of the container, as recorded in the product formula parameter document and confirmed by dimensional calibration, is recorded as... The unit is mm. This indicates the current actual liquid level position. Effective height inside the container The ratio is denoted as the normalized liquid level position. The effective stable frame set All normalized liquid level positions The arithmetic mean is denoted as the normalized average liquid level position. .
[0072] The 90th percentile value of the normalized standard deviation of the liquid level position for normal-filled samples is recorded as the reference value for liquid level fluctuation. In this embodiment, the 90th percentile of the calibration data is 0.0116. The parameter file is saved in thousands place, and 0.0116 is rounded down to the nearest thousands place, resulting in 0.012. Therefore, the liquid level fluctuation reference value is... The preferred setting is 0.012.
[0073] The first The liquid level dispersion evaluation result of each dispensing container during the stable observation period is denoted as the liquid level fluctuation index. Liquid surface fluctuation index The specific calculation formula is as follows: ; In the formula, the current actual liquid level position Effective height inside the container All units are mm, normalized liquid level position Average normalized liquid level position and liquid level fluctuation reference value All are ratios. The more pronounced the up-and-down movement of the liquid surface, the higher the liquid surface fluctuation index. The closer it is to 1.
[0074] S305: The system calculates the average foam area at the end of the stable observation period using 3, 5, and 10 frames respectively. 10 frames correspond to approximately 0.10 seconds, which reduces the impact of a single foam burst on the final area. Therefore, the last 10 effective image frames are used to calculate the foam area ratio. The system further compares the local average windows of 3, 5, and 10 frames. 5 frames can suppress abrupt changes in a single frame and do not significantly smooth out the foam increase / decrease trend. Therefore, the first 5 frames are compared with the last 5 frames to compare foam area changes.
[0075] The average ratio of the number of pixels in the foam region to the number of pixels in the container interior region in the last 10 valid packaging image frames during the stable observation period is denoted as the foam region area ratio. The system selects from the set of valid stable frames. The last 20 image frames were selected chronologically, and the ratio of the number of image frames in the last 20 frames that identified foam regions to 20 was recorded as the foam persistence frame ratio. .
[0076] The difference between the average foam area of the first 5 effective packaging image frames and the average foam area of the last 5 effective packaging image frames during the stable observation period, divided by the average foam area of the first 5 effective packaging image frames, is recorded as the foam area decrease ratio. And reduce the proportion of foam area The range is limited to 0 to 1. When the average foam area of the current 5 valid packaged image frames is 0, and the average foam area of the next 5 valid packaged image frames is greater than 0, the foam area reduction ratio will be adjusted. Set to 0. When both the current and next average foam areas are 0, decrease the foam area by a certain percentage. Take 1.
[0077] The proportion of the foam area Foam duration frame ratio and the proportion of bubbles that have not decreased sufficiently The maximum value in the value is denoted as the foam residue index. Foam Residual Index The specific calculation formula is as follows: ; The formula adopts the maximum value principle, which can prevent any obvious anomaly such as large foam area, long duration, or slow decline from being weakened by the average of other lower parameters.
[0078] S306. The allowable supplementary width at the upper boundary of the material body is verified by manually marking the boundary. The system performs linear supplementation on samples with interruption widths of 10%, 20%, 25%, and 30% of the detected width in the middle of the container, and compares the results with the artificial liquid surface position. In one set of verification results, when the interruption width does not exceed 20%, the error of the supplemented liquid surface position remains within the normal calibration error range. When the interruption width reaches 25%, the error increases significantly due to the large area of foam obstruction or the curvature of the actual liquid surface. Therefore, the system determines 20% within the verification boundary as the upper limit for local supplementation.
[0079] The system will use the fill deviation index Liquid surface fluctuation index and foam residue index With repackaging container number Correlation. When the upper boundary of the material body is obscured by the material bundle region, the current actual liquid level position is not updated using the current image frame. When the upper boundary of the material body is partially interrupted, straight-line replenishment is performed only when the interruption width does not exceed 20% of the detection width in the middle of the container, based on the boundaries on both sides of the interruption location. If the interruption exceeds this range, the current image frame is not used to calculate the current actual liquid level position. .
[0080] In a set of operational examples, the lower limit of the liquid level position The upper limit of the liquid level is 72mm. The actual liquid level in the 25th dispensing container is 76mm. It is 74.5mm, and the filling deviation index is... The normalized standard deviation of the liquid level in the 25th dispensing container is 0.0058, and the liquid level fluctuation index is 0. Approximately 0.483. (Percentage of foam area) The bubble duration frame ratio is 0.08. The percentage decrease in foam area was 0.20. The residual foam index is 0.82. The value is 0.20. This indicates that the volume of the 25th dispensing container is within the acceptable range; the liquid level fluctuates somewhat, but there is minimal foam residue.
[0081] This embodiment, by extracting the continuous material body area from the bottom of the container upwards and combining the foam pore texture and the longitudinal connection relationship of the material bundles to separate the material body boundary, foam boundary, and material bundle boundary, can avoid misidentifying the top surface of the foam or the outgoing material bundle as the actual liquid surface. (Filling deviation index) Liquid surface fluctuation index and foam residue index These instruments respectively characterize abnormal actual fill volume, transient liquid level changes, and foam residue, providing independent visual inspection criteria for subsequent scenario classification and product quality grading.
[0082] Example 5: This embodiment illustrates the method for determining the filling stop start frame, the continuous visual tracking method for filament and residual dripping, and the material breakage contamination risk index. Foam scenario coefficient and the coefficient of hanging wire scene The generation method.
[0083] S401. The number of consecutive confirmations for the filling stop start frame is obtained by comparing the false trigger rate and detection delay. The system uses 1, 3, and 5 consecutive frames to confirm the decrease in material bundle length and width, respectively. When using 1 frame, material bundle swaying and single-frame segmentation gaps easily cause false triggers. When using 5 frames, at 100 frames per second, the confirmation time increases by approximately 50ms, and some early-stage filament formation is missed. When using 3 frames, single-frame and double-frame jitter can be eliminated, and the confirmation time is approximately 30ms. Therefore, after completing three sets of comparisons, the system uses three consecutive valid filling image frames for confirmation.
[0084] The system continuously extracts the material bundle region within the material bundle observation area, acquiring the longitudinal length, average width, and connection status of the material bundle to the filling nozzle outlet. When the longitudinal length and average width of the material bundle continuously decrease in three consecutive valid filling image frames, and the upper end of the material bundle remains connected to the filling nozzle outlet, the first image frame of the three image frames is determined as the filling stop start frame. Using three consecutive valid filling image frames for confirmation can eliminate single-frame misjudgments caused by short-term material bundle oscillation or local gaps.
[0085] S402. The system starts tracking the material bundle region from the filling stop start frame. When the upper end of the material bundle region connects to the filling nozzle outlet and the lower end retracts upward, the corresponding region is identified as a retracted material bundle. When the retracted material bundle forms a long and thin connection structure, and the width of the long and thin connection structure is consistently less than the average width of the material bundle during the stable filling stage, the long and thin connection structure is identified as a hanging thread.
[0086] The difference between the acquisition time of the filling stop start frame and the acquisition time of the image frame where the wire is completely disconnected is recorded as the wire hanging duration. The unit is ms. The 90th percentile value of the wire hanging time duration of the normal material breakage sample is recorded as the wire hanging time reference value. The unit is milliseconds (ms). The system collects no fewer than 200 normal material breakage samples and sorts the wire hanging time from shortest to longest. In one set of calibration results, the 90th percentile is 286 ms. After adding a 10 ms sampling interval as an upper observation margin, it becomes 296 ms. Then, rounding up to 300 ms according to the 10 ms sampling resolution unit, the wire hanging time reference value is... The preferred setting is 300ms.
[0087] The upper limit corresponding to the time when the wire-hanging duration reaches the average passing interval across adjacent packaging containers is recorded as the wire-hanging abnormal upper limit time. The unit is milliseconds (ms). In this embodiment, the average passing interval between adjacent dispensing containers is 0.5 seconds. When the duration of the filament entanglement reaches 500 ms, the filament entanglement may continue until the next dispensing container enters the filling associated range. Therefore, the upper limit time for filament entanglement abnormality is set. The preferred setting is 500ms, and it meets the following requirements. .
[0088] Duration of hanging wire Exceeding the reference value for wire hanging time The normalized result is denoted as the proportion of persistent abnormal wire hanging. The proportion of strands hanging abnormally continues. Calculate according to the following formula, and this formula is not numbered separately: ; When the hanging wire duration Not higher than the reference value for wire hanging time At that time, the proportion of wire hanging remained abnormal. Set to 0. When the wire hanging time... Reaching the upper limit of the wire hanging abnormality time At that time, the proportion of wire hanging remained abnormal. The value is set to 1. This calculation avoids directly calculating the highest risk for wire hanging in the upper range of normal material breakage samples.
[0089] The ratio of the maximum length of the hanging wire to the distance from the nozzle outlet to the center of the container opening is recorded as the maximum extension ratio of the hanging wire. And the maximum extension ratio of the hanging wire Limited to 0 to 1.
[0090] S403. The number of tracks retained after droplet occlusion is obtained by comparing the association accuracy. The system allows droplets to reappear in the subsequent 1, 2, and 3 frames respectively. When only 1 frame is allowed, short-term occlusion at the filling nozzle edge will cause interruption of the true track. When 3 frames are allowed, the number of instantaneous high-brightness spots incorrectly connected to the original track increases. When 2 frames are allowed, it is possible to verify whether the droplet reappears in the predicted direction within about 20ms, and the number of incorrect associations is low. Therefore, the system uses the subsequent two valid packaging image frames for verification.
[0091] After the wire is completely disconnected, the system identifies an independent connected region adjacent to the filling nozzle outlet within the filling nozzle observation area. This region continuously increases in area and its center gradually moves away from the outlet. This independent connected region is identified as the residual droplet. The system establishes the residual droplet trajectory based on the center position, area change, and movement direction of the residual droplet in adjacent valid filling image frames. When the residual droplet is briefly obscured by the filling nozzle, the system predicts the position of the residual droplet in the next image frame based on the current movement direction. The residual droplet trajectory is retained only if the residual droplet is re-identified in the next two valid filling image frames.
[0092] The droplet trajectory is correlated using constant velocity prediction and a neighborhood threshold. The system predicts the center position of the next image frame based on the droplet center displacement in the two most recent valid packaged image frames. The system uses 1.0, 1.5, and 2.0 times the maximum displacement of a normal droplet in a single frame as candidate search radii, respectively. A search radius of 1.0 times the droplet's displacement can easily cause trajectory interruption when the droplet accelerates slightly or when there is a deviation in image center extraction. A search radius of 2.0 times the droplet's displacement increases the number of neighboring high points that are incorrectly correlated. A search radius of 1.5 times the droplet's displacement can cover normal displacement variations and limit the number of incorrect candidates. Therefore, within a search neighborhood centered on the predicted position and with a radius equal to 1.5 times the maximum displacement of a normal droplet in a single frame, candidate connected regions with the smallest center distance and consistent area change direction are selected.
[0093] When the center of the droplet first enters any landing area mask, that area is recorded as the droplet's landing point. When the droplet disappears at the region boundary, the region it entered is determined by combining the last valid center position and the predicted position in the next frame. Candidate trajectories that do not reappear within two frame verification periods are terminated and not used for landing point determination.
[0094] The ratio of the largest residual droplet pixel area in the residual droplet trajectory to the pixel area at the filling nozzle exit is denoted as the maximum residual droplet area ratio. And the maximum area ratio of the residual droplets Limited to 0 to 1.
[0095] S404. The system determines the droplet landing area coefficient according to the processing difficulty corresponding to the droplet landing point. If no residual droplets form, no additional treatment is required; simply adjust the landing area coefficient. When residual droplets enter the internal area of the container, they mainly affect the filling volume and are evaluated separately by the filling volume deviation index. The landing area coefficient is also considered. When 0.10 drops of residual liquid enter the outer wall area of the container, it can usually be restored through general cleaning, reducing the droplet area coefficient. When a 0.35% residual droplet enters the outer edge of the container opening, it needs to enter the key cleaning area but usually does not directly enter the highest risk area. The landing area coefficient is then calculated. When a 0.60% residual droplet enters the sealing contact area, it may affect the sealing reliability and constitute a mandatory rejection condition. Therefore, the droplet area coefficient should be adjusted. Take 1.00.
[0096] The binary parameter for whether residual droplets enter the downstream adjacent container region is denoted as the cross-period coefficient. When residual droplets enter the downstream adjacent container region, the cross-period coefficient... Take 1. When not yet entered, the cross-cycle coefficient... Take 0.
[0097] The abnormal proportion of hanging wire Maximum area ratio of residual droplets Landing point area coefficient and cross-period coefficient The product complement is denoted as the material shortage pollution risk index. Pollution risk index due to material shortage The specific calculation formula is as follows: ; When any lower-order parameter increases, the risk index of material shortage pollution decreases. Monotonically increasing. Landing area coefficient. or cross-cycle coefficient When the value is 1, the risk index of material shortage pollution is... Take 1 directly.
[0098] S405. The filtering window for the foam area sequence was obtained by comparing the preservation of trends and the elimination of single-frame spikes. The system compared 3-frame, 5-frame, and 7-frame median filtering windows respectively. The 3-frame window can remove single-frame foam bursting or reflection spikes, but only covers about 30ms at 100 frames per second. The 5-frame and 7-frame windows cause significant delays in the transition between foam increase and decrease within the stable observation period. Therefore, the system adopts a 3-frame median filtering window.
[0099] The system has a set of effective stable frames. The corresponding foam region area sequence is subjected to 3-frame median filtering, and the filtering results are arranged in chronological order according to the image frame numbers. Starting from the second valid assembly image frame after arrangement, the current valid assembly image frame is paired with the previous valid assembly image frame to form a foam area comparison frame pair. The number of image frames that can form foam area comparison frame pairs is recorded as the number of foam comparison frames. And satisfy Image frames whose filtered foam region area is not lower than that of the previous valid packaged image frame are defined as image frames where the foam area has not decreased. The number of image frames where the foam area has not decreased is compared with the number of foam comparison frames. The ratio is recorded as the proportion of frames that did not decrease due to foam. When no foam region is identified during a stable observation period, the proportion of frames where foam has not decreased will be adjusted. Take 0.
[0100] Foam Residual Index Compared to the proportion of frames that did not decrease due to foam The product complement is denoted as the foam scene coefficient. Foam scenario coefficient The specific calculation formula is as follows: ; In the formula, the residual foam index Reflecting the residual state of foam at the end of a stable observation period, the proportion of frames where foam did not decrease. It reflects the temporal state of whether the foam area remains or increases.
[0101] S406, Maintaining an abnormally high proportion of wire hanging threads Maximum elongation ratio of the hanging wire and the maximum area ratio of residual droplets The product complement is denoted as the wire-hanging scene coefficient. Wire hanging scene coefficient The specific calculation formula is as follows: ; In the formula, the proportion of continuous abnormal wire hanging is... This reflects the degree of abnormality after the wire is attached for longer than the normal reference time, and the maximum elongation ratio of the attached wire. Reflects the extent of the hanging wire's spatial extension and the maximum area ratio of the residual drip. It reflects the state of material accumulation after the material supply is cut off.
[0102] S407. The threshold used to determine the dominant feature of foam is denoted as the foam scene threshold. The threshold used to determine the dominant feature of wire hanging is denoted as the wire hanging scenario threshold. The system selected no fewer than 300 samples covering four types of packaging scenarios, and set candidate thresholds ranging from 0.40 to 0.70 in 0.05 increments. In a set of validation results, the overall scenario classification consistency rate was high for candidate value 0.55, and no missed cases were found in the foam-attached composite packaging scenario. Therefore, the foam scenario threshold was set accordingly. Threshold for wire hanging scenarios The preferred value is 0.55.
[0103] When the bubble scenario coefficient And the coefficient of the hanging wire scenario When this is determined to be a steady-flow dispensing scenario, the foam scenario coefficient is... And the coefficient of the hanging wire scenario When the foam-dominated packaging scenario is identified, the foam scenario coefficient is determined to be... And the coefficient of the hanging wire scenario When this is determined to be a scenario where the floss-based packaging is dominant, and the foam scenario coefficient is... And the coefficient of the hanging wire scenario At that time, it was determined to be a foam-coated composite packaging scenario.
[0104] In a set of running examples, the duration of the filament snagging on the 31st dispensing container. The reference value for wire hanging time is 420ms. The maximum time for wire tangling abnormality is 300ms. The duration is 500ms, therefore the proportion of abnormal wire hanging is... It is 0.60. Maximum elongation ratio of the wire. The maximum area ratio of residual droplets is 0.45. The landing area coefficient is 0.22. Take 0.60, cross-cycle coefficient Set to 0, pollution risk index due to material shortage The residual foam index is 0.8752. The percentage of frames where the bubble did not decrease was 0.18. The coefficient for the bubble scenario is 0.10. The coefficient for the wire-hanging scenario is 0.262. The value is approximately 0.828, therefore the dispensing process corresponding to the 31st dispensing container is determined to be a wire-driven dispensing scenario.
[0105] Example 6: This example illustrates the scenario correction factor and the packaging quality risk index. The four-level packaging quality results, scenario adaptation and diversion strategies, and the grade update process after rework or delayed re-inspection.
[0106] S501, Packaging Scene The following is used to correct the fill deviation index. The coefficient is denoted as the loading quantity scenario correction coefficient. This will be used to correct the liquid level fluctuation index. The coefficient is denoted as the liquid surface scene correction coefficient. This will be used to correct the foam residue index. The coefficient is denoted as the foam scenario correction coefficient. This will be used to correct the pollution risk index caused by material shortages. The coefficient is denoted as the pollution scenario correction coefficient. .
[0107] The system divides at least 300 manually labeled repackaged containers into a parameter calibration set and an independent verification set, with a ratio of 70% to 30%. The candidate range for the scenario correction coefficient is set to 0.80 to 1.25, and candidate combinations are generated at 0.05 intervals. The parameter calibration set is used to search for candidate combinations, while the independent verification set is used to confirm the number of missed direct rejections and the number of incorrectly rejected recoverable products. The system first excludes combinations with missed direct rejections in the independent verification set, and then selects the combination with the highest number of automatic classification results consistent with the manual labeling results from the remaining combinations as the preferred combination.
[0108] The packaging scenario, classification conditions, and scenario correction coefficients set in this embodiment are shown in Table 2. The values in the table are a set of exemplary preferred values for this embodiment. The actual production line should be recalibrated according to the corresponding product, imaging equipment, and process sample.
[0109] Table 2: Repackaging Scenarios, Classification Conditions, and Scenarios Correction Coefficients In steady-flow dispensing scenarios, the contribution of filling volume and liquid level risk is increased; in foam-dominated dispensing scenarios, the contribution of foam risk is increased; in wire-dominated dispensing scenarios, the contribution of material breakage contamination risk is increased; and in foam-wire composite dispensing scenarios, the contribution of both foam and material breakage contamination risk is increased.
[0110] S502, The system obtains the first determined step S407. The dispensing scenario corresponding to each dispensing container. Furthermore, based on the pre-defined correspondence between the packaging scenarios and the scenario correction coefficients in step S501, the packaging quantity scenario correction coefficient is obtained. Correction coefficient for liquid surface scene Foam scenario correction factor Correction coefficient for pollution scenarios The system further obtains the fill deviation index generated in step S303. The liquid surface fluctuation index generated in step S304 The residual foam index generated in step S305 and the material breakage contamination risk index generated in step S404 .
[0111] Correction factor for loading volume scenario Deviation index of fill volume The product is recorded as the risk item for the loading scenario correction. Adjust the correction factor for the liquid surface scene. With liquid level fluctuation index The product is denoted as the liquid surface scene correction risk item. Adjust the foam scene correction factor. With foam residue index The product is recorded as the risk item for the bubble scenario correction. Correction factor for pollution scenarios With the risk index of pollution from material shortage The product is recorded as the pollution scenario correction risk item. .
[0112] The result of limiting the maximum value of the four scenario-corrected risk items to within 1 is denoted as the packaging quality risk index. Packaging quality risk index The specific calculation formula is as follows: ; The above formula employs the principle of maximum risk item to prevent a significant anomaly that could affect the accuracy of filling, sealing reliability, or container cleanliness from being mitigated by the average of other lower risk items. The system simultaneously records the maximum scenario-corrected risk item and its corresponding primary risk type. When two or more scenario-corrected risk items have the same maximum value, the corresponding risk type is collectively identified as the primary risk type.
[0113] S503, The comparison threshold between the direct release level and the delayed re-inspection level is denoted as the first quality classification threshold. The comparison threshold between the delayed re-inspection level and the rework level is denoted as the second quality grading threshold. The comparison threshold between the rework grade and the direct rejection grade is denoted as the third quality grading threshold. The system manually labels no fewer than 300 calibration samples according to four quality levels and calculates the repackaging quality risk index for each level. In a set of calibration results, the three statistical boundaries were approximately 0.287, 0.548, and 0.742, respectively. Since the candidate thresholds were validated at 0.05 intervals, the three statistical boundaries were mapped to the closest candidate values of 0.30, 0.55, and 0.75, respectively. Therefore, the first quality grading threshold was set... Second quality grading threshold and the third quality grading threshold The preferred values are 0.30, 0.55, and 0.75, respectively.
[0114] To determine whether the range of liquid level fluctuations and the area of the foam region are decreasing, the system starts from the set of effective stable frames. The last 20 valid dispensing image frames are selected chronologically. The first 10 valid dispensing image frames are designated as the front comparison window, and the last 10 valid dispensing image frames are designated as the back comparison window. The current actual liquid level position within the front comparison window is then recorded. The difference between the maximum and minimum values is denoted as the range of the liquid level position at the front window. The current actual liquid level position within the comparison window will be displayed. The difference between the maximum and minimum values is denoted as the range of the liquid level position in the back window. All units are in mm. The average ratio of the number of pixels in the foam area to the number of pixels inside the container within the previous comparison window is denoted as the average foam area ratio of the previous window. The average ratio of the number of pixels in the foam region to the number of pixels inside the container region within the subsequent comparison window is recorded as the average foam area ratio of the subsequent window. .when At that time, it was determined that the range of liquid level fluctuations was decreasing. At that time, it is determined that the area of the foam region is decreasing. If the parameter corresponding to the subsequent comparison window is not lower than the parameter corresponding to the previous comparison window, it is uncertain whether it is decreasing.
[0115] When the packaging quality risk index The residual droplets did not enter the sealed contact area, and the cross-period coefficient was... If the value is 0 and the material bundle does not overflow the container opening, the corresponding dispensing container will be classified as a direct release class.
[0116] when At that time, the system determines whether to classify the scenario as a delayed re-inspection level based on the maximum scenario correction risk item and the changes in the comparison window before and after. When the liquid surface scenario correction risk item... When correcting risk items separately for the largest scenario, the following must be met: When the bubble scenario modifies the risk items. When correcting risk items separately for the largest scenario, the following must be met: When the liquid surface scene is corrected, the risk item is adjusted. and bubble scenario correction risk items When jointly correcting risk items for the largest scenario, the following conditions must be met simultaneously. and If the corresponding conditions are met, the repackaged container is classified as a delayed re-inspection level. If the corresponding conditions are not met, the subsequent processing path is determined according to the rework processing rules.
[0117] The permissible replenishment range and permissible re-vacuuming range are determined by the successful rework range. When the underfill deviation does not exceed 1.5 times the width of the acceptable liquid level range, segmented replenishment can stably bring it back to the acceptable range. When it exceeds 1.5 times, foaming and secondary liquid accumulation increase significantly. When the overfill deviation does not exceed 1.0 times the width of the acceptable liquid level range, the contamination risk after re-vacuuming is controllable. When it exceeds 1.0 times, the residue on the suction components increases significantly. Therefore, 1.5 times and 1.0 times are taken as the permissible replenishment range and permissible re-vacuuming range, respectively.
[0118] when ,or However, the risk factor for the largest scenario correction is the risk factor for the dosage scenario correction. Or, the risk item for correcting pollution scenarios. If residual droplets enter the outer wall area or the outer edge area of the container opening but do not enter the sealing contact area, the corresponding dispensing container will be classified as a rework grade.
[0119] when Or residual droplets enter the sealed contact area, or the cross-period coefficient If the thread is not disconnected when the dispensing container leaves the filling station, or if the actual liquid level is incorrect... When the refilling or re-extraction exceeds the permissible range, the corresponding refilling container will be classified as an immediate rejection. High-risk mandatory conditions take precedence over the refilling quality risk index. The threshold range.
[0120] S504. The system generates an online triage strategy in the following order: "determine processing authority based on quality level, determine processing channel based on main risk type, and adjust processing parameters for repackaging scenarios." (Repackaging scenario) Since there is no separate limitation on the processing channel, the dispensing containers in the steady flow dispensing scenario, foam-dominated dispensing scenario, wire-dominated dispensing scenario, and foam-wire composite dispensing scenario can all enter the corresponding processing channel according to their actual main risk type, avoiding the situation where there is no processing branch when the dispensing scenario and the main risk type intersect.
[0121] Refill containers classified as direct release type enter the normal conveying channel. Refill containers classified as direct rejection type enter the rejection channel directly. When the cross-cycle coefficient... When option 1 is selected, the current packaging container enters the rejection channel, and the downstream adjacent packaging container enters the isolation channel. The second re-inspection camera adopts the container port area reading mode, which increases the number of isolation re-inspection image frames by 100%. The above direct rejection condition takes precedence over the subsequent delayed re-inspection and rework processing rules.
[0122] For delayed re-inspection grade dispensing containers, when the liquid level scenario is corrected for risk items. When correcting risk items for the maximum scenario alone, the dispensing container is sent to the buffer re-inspection channel. The buffer re-inspection time is obtained by statistically analyzing the remaining decay time of normal liquid level fluctuations. In one set of statistical results, the 90th percentile is 1.82s. The buffer channel controller sets the dwell time in 0.5s increments, adjusting 1.82s upwards to 2.0s. Therefore, the optimal base dwell time is set to 2s. The system corrects risk items according to the liquid level scenario. Grouping, when When this happens, the stay time will be increased by 10% from the base stay time. At the same time, the dwell time is increased by 20% from the base dwell time. The first re-inspection camera adopts the container interior area reading mode, which increases the effective sampling frame count by about 25%.
[0123] For delayed re-inspection level repackaging containers, when the risk item for the foam scenario is corrected. Adjust risk items separately for the maximum scenario or the liquid surface scenario. Risk items related to bubble scenario correction When jointly correcting risk items for the maximum scenario, the dispensing containers are sent into the settling and defoaming channel. The settling and defoaming time is obtained by statistically analyzing the area descent time of recoverable foam samples. In one set of statistical results, the 90th percentile is 2.74s. The settling and defoaming channel is set with a dwell time in 0.5s increments, adjusting 2.74s upwards to 3.0s. Therefore, the optimal base settling time is 3s. The system corrects risk items according to the foam scenario. Grouping, when When this is the case, the settling time will be increased by 20% from the base settling time. At the same time, the settling time is increased by 40% from the basic settling time. The first re-inspection camera adopts the container internal area reading mode, which increases the number of effective sampling frames by about 50% and extends the stable observation period by 30%.
[0124] The buffer re-inspection channel and the settling and defoaming channel are configured with parallel buffer positions according to the production cycle. With 120 dispensing containers per minute corresponding to an average throughput interval of 0.5 seconds, at least five buffer positions are set when the basic dwell time is 2 seconds, with four positions used to cover the dwell time and one position used for entry / exit switching. When the basic settling time is 3 seconds, at least seven buffer positions are set, with six positions used to cover the settling time and one position used for entry / exit switching. These parallel buffer positions maintain the continuous operation of the main conveyor line.
[0125] For rework-grade repackaging containers, the risk item should be adjusted based on the filling volume scenario. When it is one of the main risk types, it depends on the actual liquid level position. Lower limit of liquid level Upper limit of liquid level The system determines the quantitative replenishment or quantitative evacuation based on the relationship between the container volume and liquid level calibration table. It estimates the shortfall or overfill volume. After the metering valve closes, approximately 6% to 9% residual flow remains; therefore, the initial replenishment volume is set to 90% of the estimated shortfall. Approximately 15% to 18% liquid residue and liquid level following error exist in the evacuation line; therefore, the initial evacuation volume is set to 80% of the estimated overfill. After replenishment or evacuation, if further correction is needed after 0.5 seconds of settling, 70% of the remaining estimated volume is processed in the same rework cycle. Both the metering valve and the evacuation pump are weighed and calibrated. The controller converts the estimated volume into execution time based on the output per unit opening time.
[0126] When correcting risk items in liquid surface scenarios If this is one of the main risk types for rework processing, and there are no abnormalities in filling volume or contamination requiring priority handling, the dispensing container will be sent to the buffer re-inspection channel, and the risk item will be adjusted according to the liquid level scenario. The upper limit processing parameters are executed at that time, and this processing is counted as a rework process. If the quality level still does not decrease below the second quality classification threshold after processing, the final grade is determined according to step S508.
[0127] When the bubble scenario corrects the risk items When rework is considered a major risk type, if the foam is only located inside the container, the dispensing container is sent to the defoaming channel with a 40% increase in the settling time. If the foam enters the outer edge of the container opening but not the sealed contact area, it is first settling for 2 seconds before entering the defoaming cleaning channel for negative pressure suction. The defoaming cleaning channel uses a negative pressure suction nozzle that matches the outer contour of the container opening. The working distance between the negative pressure suction nozzle and the outer edge of the container opening is set to 2mm to 4mm, preferably 3mm in this embodiment. The negative pressure working range is set to -15kPa to -20kPa, preferably -18kPa in this embodiment. The negative pressure suction time is preferably 0.8s. The conveying speed is reduced by 30% compared to the normal conveying speed. When the foam enters the sealed contact area, it directly enters the rejection channel.
[0128] When the pollution scenario modifies the risk items When the risk is one of the main types, the system determines the cleaning location based on the droplet's landing point. When the droplet enters the outer wall area of the container, the dispensing container enters the outer wall cleaning position in the container opening cleaning channel, the conveying speed is reduced by 30%, and one gentle wipe and one negative pressure suction are performed. When the droplet enters the outer edge area of the container opening but does not enter the sealing contact area, the dispensing container enters the outer edge cleaning position in the container opening cleaning channel, the conveying speed is reduced by 40%, and two negative pressure suctions are performed, with a 0.5s interval between the two suctions. The preferred suction time for the first suction is 0.6s, and the preferred suction time for the second suction is 0.4s. The system uses 0.60, 0.65, and 0.70 as candidate extended trigger values for the contamination scenario correction risk item. In a set of cleaning tests, 0.65 can reduce the amount of product with visible residue remaining after standard suction without significantly increasing channel occupancy. Therefore, when... At this time, the initial negative pressure suction time is increased by 20%. When residual droplets enter the sealed contact area, they directly enter the rejection channel.
[0129] When two or more scenario correction risk items collectively constitute the largest scenario correction risk item, the system executes the sequential sub-steps in the order of fill volume processing, liquid level or foam stabilization processing, and contamination cleaning. (Fill volume scenario correction risk item) When this is one of the main risk types, complete the quantitative replenishment or quantitative back-vacuuming first. Correct risk items for liquid level scenarios. Or, adjust risk items for bubble scenarios. If it is one of the main risk types, then proceed to the buffer re-inspection channel or the static defoaming channel according to the aforementioned rules. (Contamination scenario correction risk item) When this is one of the main risk types, cleaning of the container outer wall or the outer edge of the container opening should be performed last. These sequential sub-steps are collectively recorded as a single composite rework process, and re-entry into the reloading, re-extraction, or cleaning channel is not permitted after the composite rework process has been completed.
[0130] When foam residue and contamination at the container opening's outer edge constitute the main risks, and the corresponding packaging scenario involves a combination of foam and filament packaging, the container should be allowed to stand for defoaming before entering the container opening cleaning channel. The standing time is increased by 20% compared to the single foam processing time. Both the first and second re-inspection cameras maintain 100 frames per second, and the re-inspection observation period is doubled, increasing the number of re-inspection image frames by approximately 100%. The total processing dwell time is increased by 60% compared to the single foam processing time. The presence of foam or residual droplets in the sealed contact area, and the cross-cycle coefficient, are considered risks. Take 1 or repackage quality risk index Not lower than the third quality grading threshold If the condition is not corrected, it will be directly rejected.
[0131] S505, the number of rework cycles and the number of delayed settling cycles are determined by the marginal recovery results of the repeatedly processed samples. The system compares samples that have undergone one, two, and three processing cycles. Products requiring rework after one refill, re-aspiration, or cleaning show a significantly increased proportion of secondary contamination and container misalignment; therefore, the number of rework cycles is limited to one. For samples with liquid level fluctuations and foam, a second settling cycle can still allow some products to continue to recover, but the third settling cycle results in very little additional recovery and significantly increases channel occupancy; therefore, the number of delayed settling cycles is limited to two.
[0132] The system will handle pre-packaging scenarios. , Filling deviation index Liquid surface fluctuation index Foam Residual Index Material shortage pollution risk index Packaging quality risk index Main risk types, current processing channels, number of rework attempts, number of delayed settling attempts, and container numbers. Binding. A single dispensing container may undergo rework only once. A single rework may include two small-volume replenishments, two small-volume backflows, or two negative pressure suctions within the same processing channel. When two or more risk types constitute a major risk, dispensing volume processing, liquid level or foam stabilization processing, and contamination cleaning may be performed in the order specified in step S504; these sequential sub-steps are collectively counted as one composite rework. A single dispensing container may undergo a maximum of two delayed settling periods. The second delayed settling period is only applicable to dispensing containers where, according to the pre-comparison window and post-comparison window determination rules in step S503, the liquid level fluctuation range or foam area is still decreasing.
[0133] S506. After rework or delayed re-inspection, the system uses the first and second re-inspection cameras to re-acquire images of the dispensing containers and obtains a sequence of valid dispensing images after re-inspection according to the time-series effective coefficient screening method in Example 2. All processing channels re-acquire the actual liquid level position after re-inspection using the first re-inspection camera. The median of the current actual liquid level position corresponding to the last 10 valid dispensing image frames during the stable observation period is recorded as the actual liquid level position after re-inspection. The unit is mm.
[0134] Following the same method from steps S303 to S305, the system recalculates the re-inspection packing deviation index using the effective packing image sequence after re-inspection. Liquid level fluctuation index after re-inspection and the residual foam index after re-inspection When the number of effective stable frames after re-inspection is less than 20, the liquid surface fluctuation index after re-inspection will be affected. Or retesting the residual foam index If the corresponding steps cannot be followed for calculation, the visual detection index after re-inspection that cannot be recalculated will be taken as the visual detection index before processing, and the corresponding index decrease ratio will be taken as 0 in step S507 to avoid false risk reduction due to insufficient re-inspection images.
[0135] To mitigate the risk of contamination after re-inspection, the system re-extracts residual contamination areas from the container's outer wall, container opening's outer edge, and sealing contact area in the second re-inspection camera image. The ratio of the largest residual contamination pixel area to the filling nozzle outlet pixel area in the re-inspection image is recorded as the residual contamination area ratio after re-inspection. Furthermore, the proportion of residual contamination area after re-inspection will be determined. Limited to 0 to 1, the landing area coefficient corresponding to the location of the residual contamination area after re-inspection is recorded as the landing area coefficient after re-inspection. If no residual contamination area is identified, and All values are set to 0. Since the wire-hanging process has already ended, the percentage of wire-hanging abnormalities after re-inspection will be recorded. Taking 0, cross-period pollution belongs to an irreversible historical correlation state, and the cross-period coefficient after re-examination will be... Take the cross-cycle coefficient before processing The proportion of wires with persistent abnormalities after re-inspection will be... The proportion of residual contamination area after re-inspection Landing point area coefficient after re-inspection and the cross-cycle coefficient after re-inspection Calculate according to the product complement relationship in step S404, and record the calculation result as the post-re-inspection material shortage pollution risk index. : ; For processing channels that have not undergone contamination cleaning, the system will still re-identify the residual contamination status based on the aforementioned re-inspection images. If the re-inspection image cannot completely cover the outer wall area of the container, the outer edge area of the container opening, and the sealing contact area, the contamination risk index after re-inspection will be adjusted. Take the pollution risk index of material interruption before treatment And the corresponding index decrease ratio is taken as 0 in step S507.
[0136] The system retains the pre-processing packaging scenario. Corresponding dosage scenario correction factor Correction coefficient for liquid surface scene Foam scenario correction factor Correction coefficient for pollution scenarios The re-inspection will be the content deviation index. Liquid level fluctuation index after re-inspection Re-inspection of foam residue index and the risk index of material interruption after re-inspection Correct each scenario according to step S502. Record the four scenario correction risk items obtained after the re-inspection as the re-inspection fill quantity scenario correction risk items. Risk items for correcting liquid level scene after re-inspection Risk items for re-inspection of foam scene correction Risk items for re-inspection of contaminated scenarios The result of limiting the maximum value of the four post-re-inspection scenario correction risk items to within 1 is recorded as the post-re-inspection packaging quality risk index. .
[0137] This replacement ensures that all processing channels have the actual liquid level position after re-inspection and four complete visual inspection indices, eliminating the need for the S508 to distinguish whether a particular channel is inspecting the liquid level.
[0138] S507, The visual detection index before processing is uniformly denoted as... The corresponding visual inspection index after re-inspection is recorded as ,in, Visual detection index before processing Compared to the visual inspection index after re-examination The percentage decrease is denoted as the exponential decrease percentage. The percentage of index decline The specific calculation formula is as follows: ; When the visual inspection index is re-examined Not lower than the pre-processing visual detection index At that time, the index will decrease by a certain percentage. Take 0.
[0139] The set of visual detection index types that each processing channel can directly improve is denoted as the candidate restoration parameter set. The buffer re-inspection channel corresponds to... The static defoaming channel corresponds to... The quantitative replenishment channel and the quantitative retrieval channel correspond to... Defoaming cleaning channel corresponding to The container opening cleaning channel corresponds to... The foam and contamination combined treatment performed according to step S504 corresponds to... The composite rework process, which includes quantity processing, performed according to step S504, further adds to the aforementioned set. .
[0140] Will be related to visual inspection index type The corresponding pre-processing scenario correction risk items are uniformly recorded as: ,in, , , and Corresponding to , , and From the candidate recovery parameter set Select the scenario correction risk item before processing Not lower than the first quality grading threshold The visual detection index type will be selected, and the results will be recorded as the target recovery parameter set. When the candidate recovery parameter set There are no scene correction risk items that reach the first quality grading threshold. When specifying the parameter type, the candidate recovery parameter set will be used. The parameter type corresponding to the maximum scenario correction risk item is recorded in the target recovery parameter set. .
[0141] Target recovery parameter set The number of visual detection index types included is denoted as the number of target parameters. . Restore the target parameter set The percentage of decline in each index The geometric mean result is denoted as the re-examination recovery coefficient. Re-inspection recovery coefficient The specific calculation formula is as follows: ; When the target recovery parameter set When only one type of visual inspection index is included, the re-inspection recovery coefficient This equals the percentage decrease of the corresponding exponential. When the target recovery parameter set... When multiple visual inspection index types are included, only when the anomalies of each target all decrease will the re-inspection recovery coefficient be [value missing]. Only then will it improve.
[0142] The comparison threshold used to determine whether rework or delayed re-inspection is effective is denoted as the re-inspection recovery threshold. The system manually reviewed no fewer than 200 repackaged containers that had undergone rework or delayed re-inspection. In a set of calibration results, the upper boundary for processing invalid samples was approximately 0.18, the lower boundary for processing valid samples was approximately 0.29, and the boundary between the two distributions was approximately 0.235. Since candidate thresholds were validated at 0.05 intervals, 0.235 was mapped to the closest candidate value of 0.25, thus the re-inspection recovery threshold was set. The preferred setting is 0.25.
[0143] S508, When re-inspecting the recovery coefficient Not lower than the re-inspection recovery threshold Re-inspection and repackaging quality risk index Below the first quality grading threshold The actual liquid level position obtained after re-inspection in step S506 Lower limit of liquid level and upper limit of liquid level Between these two periods, the second inspection camera failed to detect residual contamination in the sealed contact area, and the cross-cycle coefficient after the re-inspection was [missing information]. When the value is 0, the corresponding packaging container is adjusted to the direct release level and sent into the normal conveying channel.
[0144] The second delayed settling time was obtained from the statistics of the remaining recovery time after the first settling time. In a set of statistical results, the 90th percentile of the required time was approximately 0.77 times the first settling time. The processing channel was set with a time ratio of 10% increments, and the 0.77 was adjusted upwards to 0.80. Therefore, the second settling time was set to 80% of the first settling time.
[0145] When the recovery coefficient of re-inspection Not lower than the re-inspection recovery threshold Re-inspection and repackaging quality risk index At the first quality grading threshold Second quality grading threshold Between these, the largest scene correction risk item after re-inspection is the liquid surface scene correction risk item. Or, adjust risk items for bubble scenarios. If only one delayed settling period is completed, a second settling period is allowed, and the final quality grade must be determined after the second settling period.
[0146] After completing one rework process, the actual liquid level position after re-inspection. The contamination status may have been restored, but after re-inspection, the maximum scenario correction risk item has changed to the liquid surface scenario correction risk item. Or, adjust risk items for bubble scenarios. If the sample is not in good condition, it may be allowed to undergo a buffer re-inspection or stand for defoaming, without requiring a second rework.
[0147] Quality risk index after rework, re-inspection and repackaging Still not lower than the second quality grading threshold After completing the second delayed standing period and subsequent re-inspection, the repackaging quality risk index was determined. Still not lower than the first quality grading threshold Upon re-inspection, contamination was detected in the sealed contact area, with an inter-cycle coefficient. Set the value to 1 and retest the coefficient of recovery. Below the re-inspection recovery threshold Furthermore, the risk index of repackaging quality after re-inspection If the quality has not been reduced, or if a rework has been completed but refilling, re-extraction, or cleaning is still required, the corresponding dispensing container should be adjusted to the direct rejection level and sent into the rejection channel.
[0148] The typical visual inspection parameters, scene classification results, and quality classification results for the packaging containers set in this embodiment are shown in Table 3.
[0149] Table 3: Visual Inspection Parameters and Classification Results for Typical Dispensing Containers This embodiment utilizes scenario correction coefficients and the principle of maximum risk to prevent severe single defects from being weakened by the averaging of multiple low-risk parameters. The four-level packaging quality results correspond one-to-one with normal transport, delayed re-inspection, rework, isolation, and direct rejection channels, reflecting the technical objective of classifying and sorting items based on visually detected characteristics. Adjusting dwell time, image frame rate, transport speed, replenishment ratio, retraction ratio, and negative pressure suction time based on the visual inspection index allows the processing intensity to match abnormal conditions. Re-inspection recovery coefficient. It is used to evaluate abnormal changes in the target before and after processing, and limits one rework and two delayed settling periods, which can avoid the same dispensing container being repeatedly circulated between processing channels.
[0150] It should be noted that all calculation formulas in this application employ regression analysis, including but not limited to machine learning algorithms, to deeply analyze the collected parameters and identify their natural trends and interrelationships. Specialized software, such as Python's Scikit-learn library or the R language, is used to automatically generate mathematical models that match the data. Then, cross-validation and other methods are used to objectively evaluate the model performance, and continuous feedback and optimization are combined to ensure that the created formulas truly reflect the inherent laws of the data, thereby guaranteeing their effectiveness and accuracy. In all calculation formulas in this application, the parameters in each formula undergo dimensionless processing within a consistent range to ensure that different physical quantities are compared on the same scale; dimensionless processing techniques include, but are not limited to, min-max-normalization and Z-score standardization. The algorithm of this invention is implemented as a Python script. Before executing the core logic, the program first executes a data loading module (e.g., using the widely used pandas library in Python) configured to read the aforementioned spreadsheet file and load its contents into the program's working memory (e.g., a DataFrame data structure). Subsequent algorithm steps will directly query and retrieve the required configuration parameters from this in-memory data structure.
[0151] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. An online grading and rejection system for packaging quality based on dynamic time-series detection data, characterized in that, include: The image acquisition and region segmentation module is used to continuously acquire images of the packaging process of the packaging container through the first industrial camera and the second industrial camera, associate the image frames with the corresponding packaging container to form a packaging cycle, and perform the segmentation of the packaging detection area. The timing filtering module is used to filter valid packaging image frames based on the visibility of the packaging detection area, the continuity of the packaging container's trajectory, and the clarity of the image edges, forming a valid packaging image sequence. The visual analysis module for dispensing status is used to separate the material body boundary, foam boundary and material bundle boundary from the effective dispensing image sequence, obtain the actual liquid surface position, and generate the filling deviation index, liquid surface fluctuation index and foam residue index. The material breakage pollution tracking module is used to track the process of material bundle retraction, wire breakage, residual drop formation and residual drop movement, and generates a material breakage pollution risk index based on the proportion of continuous abnormal wire, the proportion of maximum residual drop area, the landing point area coefficient and the cross-cycle coefficient. The scene classification module is used to generate foam scene coefficients based on foam residue index and the proportion of frames where foam has not decreased, generate filament-hanging scene coefficients based on the proportion of continuous abnormal filament-hanging, the maximum extension proportion of filament-hanging, and the maximum area proportion of residual drips, and determine the packaging scene based on the foam scene coefficients and filament-hanging scene coefficients. The quality grading and online rejection module is used to correct the filling deviation index, liquid level fluctuation index, foam residue index, and material breakage contamination risk index according to the filling scenario. It determines the maximum scenario correction risk item and its corresponding main risk type from the correction results, generates the filling quality risk index, and classifies the filling containers into direct release level, delayed re-inspection level, rework level, or direct rejection level. It also controls the diversion mechanism to send the filling containers into the corresponding processing channel according to the quality level and main risk type, and updates the final quality level after rework or delayed re-inspection.
2. The online grading and rejection system for packaging quality based on dynamic time-series detection data according to claim 1, characterized in that, The image acquisition and region segmentation module is used to assign a sub-container number when the sub-container enters the image acquisition range, predict the position of the sub-container according to the conveying encoder, and associate the corresponding image frame with the same sub-container when the outer contour of the sub-container in adjacent image frames remains continuously overlapping and the center position of the sub-container changes continuously along the conveying direction. The dispensing and inspection area includes the filling nozzle observation area, the material bundle observation area, the container interior area, the container opening outer edge area, the sealing contact area, the container outer wall area, and the downstream adjacent container area, which are used to identify the main material, the actual liquid level, foam, continuous material bundle, material bundle retraction, filaments, residual drips, and contamination landing points, respectively.
3. The online grading and rejection system for packaging quality based on dynamic time-series detection data according to claim 1, characterized in that, The timing filtering module is used to generate a trajectory continuity coefficient based on the overlap between the current outer contour of the packaging container and the outer contour of the packaging container after displacement translation by the conveyor encoder in the previous image frame, as well as the positional deviation between the actual identified center position of the packaging container and the predicted center position of the conveyor encoder. An image sharpness index is generated based on the Laplacian response variance of the selected edge range in the current processing stage and the sharpness reference value; Calculate the proportion of unoccluded pixels in the detection area required for the current processing stage, take the minimum value as the region visibility proportion, generate the temporal effective coefficient based on the region visibility proportion, trajectory continuity coefficient and image clarity index, and determine the image frame whose temporal effective coefficient reaches the temporal effective threshold as the effective packaging image frame.
4. The online grading and rejection system for packaging quality based on dynamic time-series detection data according to claim 1, characterized in that, The visual analysis module for dispensing status is used to retain the material body area connected to the bottom of the container in the internal area of the container, retain at least two candidate areas with no fewer than two internal dark hole connected areas and whose positions overlap in three consecutive valid dispensing image frames as foam areas, and retain candidate connected areas with the upper end contacting the filling nozzle outlet, the angle between the main axis direction and the vertical direction of the image not greater than 15 degrees and the width not exceeding twice the average width of the material bundle in the stable filling stage as material bundle areas. The upper boundary of the material body is obtained in the middle of the internal region of the container, and the actual liquid level position is obtained according to the calibration relationship between the pixel position and the liquid level height. The filling deviation index is generated based on the relationship between the actual liquid level position and the qualified liquid level range. The liquid level fluctuation index is generated based on the standard deviation of the normalized liquid level position and the liquid level fluctuation reference value during the stable observation period. The foam residue index is generated based on the proportion of foam area, the proportion of foam duration frames, and the proportion of foam area decrease.
5. The online grading and rejection system for packaging quality based on dynamic time-series detection data according to claim 1, characterized in that, The material breakage and contamination tracking module is used to determine the filling stop start frame when the longitudinal length and average width of the material bundle decrease continuously in three consecutive valid filling image frames, and the upper end of the material bundle is still connected to the filling nozzle outlet. Starting from the filling stop start frame, retracted material bundles and filaments are identified. The proportion of abnormal filament duration is obtained based on the degree to which the filament duration exceeds the filament duration reference value. The proportion of maximum filament extension is obtained based on the maximum filament length. After the hanging wire is disconnected, the residual droplet is tracked, and the maximum area ratio of the residual droplet is obtained based on the trajectory of the residual droplet. It is also determined whether the residual droplet entered the internal area of the container, the outer wall area of the container, the outer edge area of the container opening, the sealing contact area, or the downstream adjacent container area. The material breakage contamination risk index is generated based on the proportion of continuous abnormal filament hanging, the proportion of the maximum area of residual dripping, the landing point area coefficient, and the cross-cycle coefficient.
6. The online grading and rejection system for packaging quality based on dynamic time-series detection data according to claim 5, characterized in that, The scene classification module is used to generate foam scene coefficients based on the foam residue index and the proportion of frames where foam has not decreased, and to generate filament hanging scene coefficients based on the proportion of continuous abnormal filament hanging, the maximum extension proportion of filament hanging, and the maximum area proportion of residual dripping. When the foam scenario coefficient does not reach the foam scenario threshold and the wire-hanging scenario coefficient does not reach the wire-hanging scenario threshold, it is determined to be a steady-flow packaging scenario; when the foam scenario coefficient reaches the foam scenario threshold and the wire-hanging scenario coefficient does not reach the wire-hanging scenario threshold, it is determined to be a foam-dominated packaging scenario; when the foam scenario coefficient does not reach the foam scenario threshold and the wire-hanging scenario coefficient reaches the wire-hanging scenario threshold, it is determined to be a wire-hanging-dominated packaging scenario; when the foam scenario coefficient reaches the foam scenario threshold and the wire-hanging scenario coefficient reaches the wire-hanging scenario threshold, it is determined to be a foam-and-wire-combined packaging scenario.
7. The online grading and rejection system for packaging quality based on dynamic time-series detection data according to claim 1, characterized in that, The quality grading and online rejection module is used to match the filling quantity scenario correction coefficient, liquid level scenario correction coefficient, foam scenario correction coefficient and contamination scenario correction coefficient according to the filling scenario, and correct the filling quantity deviation index, liquid level fluctuation index, foam residue index and material breakage contamination risk index respectively to obtain the corresponding scenario correction risk item. The maximum value is selected from the risk items of each scenario correction to generate the packaging quality risk index, and the abnormal filling volume, liquid level fluctuation, foam residue or material breakage contamination corresponding to the maximum scenario correction risk item are identified as the main risk types.
8. The online grading and rejection system for packaging quality based on dynamic time-series detection data according to claim 7, characterized in that, The quality grading and online rejection module is used to determine the quality level based on the first quality grading threshold, the second quality grading threshold, and the third quality grading threshold. When the repackaging quality risk index is lower than the first quality classification threshold, no foam or residual drips appear in the sealed contact area, the cross-cycle coefficient is zero, and the material bundle does not cross the container opening to form splash, it is determined to be the direct release level. When the repackaging quality risk index is between the first quality grading threshold and the second quality grading threshold, the main risk type is liquid surface fluctuation or foam residue, and the range of liquid surface fluctuation or the area of foam region is decreasing, it is determined to be a delayed re-inspection level. When the repackaging quality risk index is between the second and third quality grading thresholds, or when the main risk type is abnormal filling or material breakage contamination and the repackaging quality risk index is not lower than the first quality grading threshold, it is determined to be a rework treatment level. When the repackaging quality risk index reaches the third quality grading threshold, or when foam or residual drips appear in the sealed contact area, or when the cross-cycle coefficient is set to one, or when the hanging thread is not disconnected when the repackaging container leaves the filling station, or when the actual liquid level exceeds the allowable refilling range or allowable backflow range, it is determined to be in the direct rejection category.
9. The online grading and rejection system for packaging quality based on dynamic time-series detection data according to claim 8, characterized in that, The quality grading and online rejection module determines the processing authority according to the quality level, determines the processing channel according to the main risk type, and adjusts the processing parameters according to the repackaging scenario; Direct-release grade dispensing containers enter the normal transport channel; delayed re-inspection grade dispensing containers where liquid level fluctuation is the main risk type enter the buffer re-inspection channel; and delayed re-inspection grade dispensing containers where foam residue is the main risk type enter the static defoaming channel. For rework-grade dispensing containers where abnormal filling volume is the primary risk type, they are directed to either the quantitative replenishment channel or the quantitative backfilling channel, depending on whether they are underfilled or overfilled. If foam residue is the primary risk type, and foam enters the outer edge area of the container opening but not the sealing contact area, it is first allowed to stand before entering the defoaming and cleaning channel. If material breakage and contamination are the primary risk type, when residual droplets enter the outer wall area of the container, they are directed to the container outer wall cleaning position in the container opening cleaning channel; when residual droplets enter the outer edge area of the container opening but not the sealing contact area, they are directed to the outer edge cleaning position in the container opening cleaning channel. When foam or residual droplets enter the sealing contact area, they are directed to the rejection channel. When two or more risk types constitute the main risk type, the sequential sub-steps are executed in the order of filling volume treatment, liquid level or foam stabilization treatment, and contamination cleaning. When a cross-cycle coefficient occurs, the current filling container enters the rejection channel, and the downstream adjacent filling container enters the isolation channel; filling containers that meet other direct rejection conditions enter the rejection channel.
10. The online grading and rejection system for packaging quality based on dynamic time-series detection data according to claim 9, characterized in that, The quality grading and online rejection module is used to re-acquire images of the dispensing containers through the first and second re-inspection cameras after rework or delayed re-inspection, screen the effective dispensing image sequence after re-inspection, and re-acquire the actual liquid level position after re-inspection, the filling deviation index after re-inspection, the liquid level fluctuation index after re-inspection, the foam residue index after re-inspection, and the material breakage and contamination risk index after re-inspection. The re-inspection quality risk index is generated by using the scene correction coefficient corresponding to the pre-processing packaging scene. The target recovery parameter set is determined based on the type of visual inspection index that can be improved by each processing channel and the pre-processing scene correction risk item. The re-inspection recovery coefficient is generated based on the index decrease ratio of the visual inspection index before and after processing within the target recovery parameter set. The final quality grade is updated based on the re-inspection recovery coefficient, the re-inspection quality risk index, the actual liquid level after re-inspection, whether the second re-inspection camera identifies residual contamination in the sealed contact area, and the cross-cycle coefficient after re-inspection. The same re-packaging container can be reworked once and subjected to two delayed standing periods. Re-packaging containers that still do not meet the release conditions after the allowed number of processing times enter the rejection channel.
