Automatic finished product defoaming cooperative control method and system based on machine vision
By acquiring surface images and data from previous workstations on the packaging box production line, a bubble state matrix is generated and defoaming parameters are matched. This solves the problem of the defoaming process's adaptability to fluctuations in incoming material characteristics, achieves more refined defoaming control, and reduces the risk of bubble residue.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN ART PAPER & PLASTIC PACKAGING CO LTD
- Filing Date
- 2026-05-09
- Publication Date
- 2026-07-24
AI Technical Summary
The defoaming process in existing packaging box production lines is difficult to adapt to fluctuations in the characteristics of incoming materials, leading to an increased risk of residual bubbles. Furthermore, the lack of a data collaboration mechanism between the preceding station and the defoaming station makes it impossible to proactively adjust operating parameters.
By acquiring the surface image of the defoaming station, the deviation of the gray board edge position of the preceding station, and the fit data of the folded edge of the frame forming station, spatial alignment and feature extraction are performed to generate a bubble state matrix. The corresponding defoaming pressure and time adjustment values are then matched to achieve closed-loop control.
It improves the defoaming operation's adaptability to different incoming material conditions, reduces the risk of residual bubbles, and enhances the automation and intelligence level of the production line.
Smart Images

Figure CN122143411B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of machine vision image processing technology and control technology, specifically to a machine vision-based automatic finished product defoaming collaborative control method and system applied to a packaging box production line. Background Technology
[0002] In the production of packaging boxes, the defoaming process is a crucial step to ensure a tight bond between the face paper and the backing board, improving the appearance quality of the finished product. Currently, intelligent digital production lines have integrated visual positioning and automatic bubble-removal functions. They typically use a vision system to identify the product's location and then control a bubble-removal mechanism to apply pressure to the box surface according to preset pressure and duration to eliminate air bubbles between the face paper and the backing board. This open-loop control mode based on visual positioning achieves a certain degree of automation in the defoaming process.
[0003] However, existing control methods mainly rely on fixed process parameters for defoaming, making it difficult to adapt to fluctuations in the characteristics of incoming materials. Differences exist between batches of face paper texture, adhesive coating uniformity, and the precision of grey board framing; these factors all affect the distribution location and difficulty of bubble removal. For example, when the face paper texture is complex, the visual system may easily misinterpret the texture pattern as bubbles; when the grey board joints are not tightly bonded, persistent bubbles are prone to appear in this area, and pressure with fixed parameters may not effectively eliminate these bubbles, or may cause new indentations on the face paper.
[0004] Furthermore, existing technologies lack an effective data collaboration mechanism between the defoaming station and preceding stations. Information such as the edge position deviation of the gray board obtained by the vision positioning station and the fit of the folded edge detected by the frame forming station are typically only used for quality judgment at their respective stations and are not linked to the pressure control of the defoaming station. This results in process deviations from preceding stations being directly transmitted to the defoaming station during continuous production. The defoaming station cannot proactively adjust its operating parameters based on these deviations, thus increasing the risk of residual bubbles to some extent.
[0005] Therefore, there is an urgent need for a solution that can be applied to the automated defoaming and collaborative control of finished products in packaging box production lines. Summary of the Invention
[0006] This application provides an automated defoaming collaborative control method and system for finished products based on machine vision, which at least addresses the problems existing in the prior art.
[0007] A first aspect of this application provides an automated finished product defoaming collaborative control method based on machine vision, applied to a packaging box production line, comprising the following steps: S1: Obtain surface images of the finished packaging box from multiple perspectives at the defoaming station; S2: Detect suspected bubble regions on the surface image and extract the morphological features and grayscale distribution features of the suspected bubble regions; S3: Obtain the gray board edge position deviation recorded in the previous vision positioning station and obtain the folded edge fit data recorded in the previous frame forming station; S4: Align the location distribution of suspected bubble areas with the deviation of gray board edge position and the fit of folded edge in a spatial coordinate system to determine the first type of suspected bubble area located in the gray board splice area and the second type of suspected bubble area located in the gray board surface area. S5: Generate the bubble state matrix of the current finished product packaging box based on morphological features, grayscale distribution features, and the category attributes of the first type of suspected bubble area and the second type of suspected bubble area; S6: Based on the bubble state matrix, match the defoaming head pressure adjustment value and pressure application time adjustment value corresponding to the current bubble state from the preset defoaming process parameter library; S7: Control the actuator of the defoaming station to perform defoaming operation on the current finished product packaging box according to the pressure adjustment value and the pressure application time adjustment value.
[0008] This embodiment spatially aligns the current bubble position with the edge deviation and folded edge fit data of the previous station's gray board. This allows for the differentiation of bubble types located in the splicing seam area and the gray board surface area, providing a basis for subsequent differentiated control. It helps improve the defoaming operation's adaptability to different incoming material conditions and reduces the risk of bubble residue caused by deviations in the previous process.
[0009] In some embodiments of this application, the step of obtaining the gray board edge position deviation recorded by the preceding visual positioning station further includes: obtaining the gray board edge image captured by the preceding visual positioning station during the gray board and face paper bonding process, extracting the coordinates of multiple edge points of the gray board using a sub-pixel edge detection algorithm, calculating the lateral and longitudinal deviations between the coordinates of each edge point and the corresponding standard template position, and generating a gray board position deviation matrix; wherein, the gray board position deviation matrix is used to identify the pixel region where each gray board edge is located in the spatial coordinate system alignment step.
[0010] This application embodiment generates a gray board position deviation matrix and identifies the pixel area where the gray board edge is located in the spatial alignment step. This can accurately locate the positional relationship of the bubble relative to the gray board splicing seam, providing a quantitative basis for determining whether the bubble is caused by the splicing seam problem and improving the accuracy of bubble classification.
[0011] In some embodiments of this application, the step of obtaining the folded edge fitting data recorded at the pre-forming frame station further includes: obtaining line laser scanning data of the area where the folded edge fits against the gray board sidewall after the frame is formed; reconstructing the fitting contour curve of the folded edge based on the line laser scanning data; calculating the gap area and gap depth between the fitting contour curve and the standard fitting contour; and generating a fitting index; wherein the fitting index is used to characterize the tightness of the gray board splice seam area.
[0012] This application embodiment reconstructs the fitting contour of the folded edge by line laser scanning and calculates the gap area and depth, which can quantify the tightness of the gray board splice area and provide a reliable correction coefficient for the subsequent feature weighting correction of the first type of bubble area, which helps to distinguish the difference in defoaming pressure required for bubbles of different causes.
[0013] In some embodiments of this application, the steps for detecting suspected bubble regions in a surface image include: performing multi-scale wavelet transform on the surface image to extract singular points in the high-frequency subband as candidate bubble points; performing morphological closing operations on the candidate bubble points to connect them and form candidate connected regions; calculating the circularity, eccentricity, and contrast features of each candidate connected region, and marking the candidate connected regions that meet the preset threshold as suspected bubble regions.
[0014] The embodiments of this application employ multi-scale wavelet transform combined with morphological processing for bubble detection, which can effectively suppress the interference of paper texture on bubble identification, improve the accuracy of suspected bubble area detection, and reduce invalid debugging operations or parameter misadjustments caused by texture misjudgment.
[0015] In some embodiments of this application, the steps of determining a first type of suspected bubble area located in the gray board splice area and a second type of suspected bubble area located in the gray board surface area include: mapping the center coordinates of the suspected bubble area to the spatial coordinate system where the gray board position deviation matrix is located; if the center coordinates fall within the tolerance zone formed by the edge point coordinates in the gray board position deviation matrix, it is determined to be a first type of suspected bubble area; otherwise, it is determined to be a second type of suspected bubble area.
[0016] This application embodiment classifies and determines the bubble position by mapping the bubble center coordinates to the tolerance zone range of the gray plate position deviation matrix, thereby achieving a precise correlation between the bubble position and the deviation of the preceding process. The classification logic is clear and easy to implement in engineering, laying the foundation for subsequent differential feature processing.
[0017] In some embodiments of this application, the step of generating the bubble state matrix of the current finished product packaging box includes: for the first type of suspected bubble area, the morphological features and gray-scale distribution features are weighted and corrected according to the fit index of its location; for the second type of suspected bubble area, its original morphological features and gray-scale distribution features are retained; the corrected or retained feature parameters are encoded according to the bubble position coordinates to form a multi-dimensional bubble state matrix.
[0018] This application embodiment, by weighting and correcting the features of bubbles in the splicing seam area according to the fit index, enables the bubble state matrix to more realistically reflect the difficulty of eliminating bubbles in different positions, improves the accuracy of subsequent parameter matching, and avoids using a uniform processing standard for all bubbles.
[0019] In some embodiments of this application, a preset defoaming process parameter library stores multiple bubble state matrix templates and pressure adjustment values and pressure application time adjustment values corresponding to each template. The step of matching the defoaming pressure head pressure adjustment value and pressure application time adjustment value corresponding to the current bubble state from the preset defoaming process parameter library according to the bubble state matrix includes: calculating the similarity between the current bubble state matrix and each template, and selecting the pressure adjustment value and pressure application time adjustment value corresponding to the template with the highest similarity as the control parameters for the current defoaming operation.
[0020] This application embodiment uses a similarity matching between the bubble state matrix and templates in a preset process parameter library to quickly obtain pressure and time adjustment values that are adapted to the current bubble distribution characteristics, thereby realizing rapid decision-making on defoaming parameters and improving the response speed of production cycle.
[0021] In some embodiments of this application, the step of controlling the actuator of the defoaming station to perform defoaming operation according to the pressure adjustment value and the pressure application time adjustment value further includes: spatially interpolating the pressure adjustment value corresponding to each bubble area to generate a pressure distribution control surface acting on the entire surface of the finished product packaging box; applying different output pressures to multiple independently controlled pressure units in the defoaming head according to the pressure distribution control surface, and controlling the pressure application time in segments.
[0022] This application embodiment generates a pressure distribution control surface through spatial interpolation and performs segmented control on multiple pressure units of the pressure head, which can achieve differentiated pressure on different areas of the finished packaging box surface, ensuring the defoaming effect in stubborn areas such as splicing seams, while avoiding damage to the gray board surface area due to overpressure.
[0023] In some embodiments of this application, the method further includes: after the defoaming operation is completed, acquiring surface images of the finished packaging box from multiple perspectives to verify the defoaming effect; if the verification result shows that there are residual bubble areas that have not been eliminated, combining the image features of the residual bubble areas, the corresponding gray board edge position deviation, and the folded edge fit data into an anomaly record and storing them in the anomaly database; when the cumulative number of anomaly records for the same specification of product reaches a preset number, triggering an update prompt for the corresponding template parameters in the defoaming process parameter library.
[0024] This application embodiment verifies the defoaming effect and accumulates abnormal records. When the number of abnormalities reaches a certain amount, it triggers an update prompt for the process parameter library, enabling the process parameters to be continuously optimized based on actual production data. This helps to improve the long-term adaptability of the production line to different batches of materials.
[0025] In some embodiments of this application, the method further includes: performing statistical analysis on the bubble state matrix of multiple consecutive finished packaging boxes to generate a bubble distribution trend map; if the bubble distribution trend map shows that the frequency of bubble occurrence in the gray board splicing seam area exceeds a set threshold, then sending positioning reference correction parameters to the preceding visual positioning station to adjust the positioning coordinates of subsequent gray board and face paper bonding.
[0026] This application embodiment statistically analyzes the frequency of bubble occurrence in the splice seam area and reverses the preceding positioning reference before the bubble problem worsens, realizing the transformation from passive bubble removal to active prevention. This helps to reduce the generation of bubbles caused by positioning deviation from the source and reduce the pressure burden on the subsequent bubble removal station.
[0027] In some embodiments of this application, the method further includes: calculating an estimated value of the air permeability coefficient of the current batch of face paper based on the area change trend of suspected second-type bubble areas of multiple consecutive finished packaging boxes; comparing the estimated value of the air permeability coefficient with the standard air permeability coefficient range; and generating an abnormal prompt message for the face paper batch if the value exceeds the range.
[0028] This application embodiment uses the area change trend of bubbles in the gray board surface area to estimate the air permeability of the face paper in reverse. It can monitor the fluctuation of incoming material quality online without adding additional testing equipment, providing data support for production managers to replace abnormal batches of face paper in a timely manner and avoid the occurrence of batch quality problems.
[0029] In some embodiments of this application, the method further includes: when the number of suspected bubble areas detected exceeds a preset number threshold and the proportion of suspected first-type bubble areas exceeds a preset proportion threshold, suspending the operation of the defoaming station and sending a stop detection signal to the preceding frame forming station to trigger an inspection of the wear condition of the frame forming mold.
[0030] This application embodiment, by setting dual judgment conditions of total bubble amount and bubble ratio in splicing seam, can promptly stop the machine and accurately locate the source of the fault to the preceding frame forming station when a batch of equipment failures (such as mold wear) occur. This helps to reduce the generation of scrap and shorten the troubleshooting time, thereby improving the production line operating efficiency.
[0031] A second aspect of this application provides an automated defoaming collaborative control system for finished products based on machine vision. The system includes: an image acquisition module, located at the defoaming station, for acquiring surface images of the finished packaging box from multiple perspectives; a preceding data interface module, for obtaining the gray board edge position deviation from the preceding visual positioning station and the folded edge fit data from the preceding frame forming station; an image processing module, for detecting suspected bubble areas in the surface images and extracting morphological features and grayscale distribution features; a spatial alignment module, for aligning the position distribution of suspected bubble areas with the gray board edge position deviation and the folded edge fit data in a spatial coordinate system, and determining the category attributes of a first type of suspected bubble area and a second type of suspected bubble area; a state matrix generation module, for generating a bubble state matrix based on morphological features, grayscale distribution features, and category attributes; a parameter matching module, with a built-in preset defoaming process parameter library, for matching corresponding pressure adjustment values and pressure application time adjustment values according to the bubble state matrix; and an execution drive module, for controlling the action of the actuator at the defoaming station according to the pressure adjustment values and pressure application time adjustment values. This system is used to implement the aforementioned machine vision-based automated defoaming collaborative control method for finished products.
[0032] In the above embodiments, through the collaborative work of each module, a closed-loop control of the entire process from image acquisition, pre-process data acquisition, bubble classification and recognition to parameter matching and execution drive is realized. The system structure is clear and the functions of each module are closely related, which helps to improve the automation and intelligence level of the defoaming process in the packaging box production line. Attached Figure Description
[0033] Figure 1 A flowchart illustrating an automatic defoaming collaborative control method for finished products based on machine vision, provided in an embodiment of this application; Figure 2 A schematic diagram of an automatic defoaming collaborative control system for finished products based on machine vision, provided as an embodiment of this application; Figure 3 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0034] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0035] To make the purpose, technical solution, and advantages of this application clearer, the following will be described in conjunction with the appendix. Figure 1-3 The following is an explanation using specific examples.
[0036] Please refer to Figure 1 , Figure 1 An embodiment of this application provides an automated finished product defoaming collaborative control method based on machine vision, applied to a packaging box production line, comprising the following steps: S1: Obtain surface images of the finished packaging box from multiple perspectives at the defoaming station; S2: Detect suspected bubble regions on the surface image and extract the morphological features and grayscale distribution features of the suspected bubble regions; S3: Obtain the gray board edge position deviation recorded in the previous vision positioning station and obtain the folded edge fit data recorded in the previous frame forming station; S4: Align the location distribution of suspected bubble areas with the deviation of gray board edge position and the fit of folded edge in a spatial coordinate system to determine the first type of suspected bubble area located in the gray board splice area and the second type of suspected bubble area located in the gray board surface area. S5: Generate the bubble state matrix of the current finished product packaging box based on morphological features, grayscale distribution features, and the category attributes of the first type of suspected bubble area and the second type of suspected bubble area; S6: Based on the bubble state matrix, match the defoaming head pressure adjustment value and pressure application time adjustment value corresponding to the current bubble state from the preset defoaming process parameter library; S7: Control the actuator of the defoaming station to perform defoaming operation on the current finished product packaging box according to the pressure adjustment value and the pressure application time adjustment value.
[0037] Currently, in automated packaging production lines, the defoaming process typically operates as an independent station, with its control logic mostly based on an open-loop model with fixed process parameters. Although some production lines have introduced vision systems for product positioning or surface defect detection, visual information is often only used to determine whether the product is qualified after defoaming, and does not deeply participate in the real-time decision-making process for defoaming parameters. This operating method has certain limitations when facing fluctuations in incoming material characteristics. For example, when the texture density of the face paper changes, or when there are slight dimensional deviations at the splicing points of the gray board frame, defoaming operations using uniform pressure and time parameters may fail to completely eliminate bubbles in some areas, while in other areas, excessive pressure may cause new indentations on the face paper, affecting the consistency of the finished product's appearance quality.
[0038] The above phenomena mainly stem from three aspects. First, the formation of bubbles is diverse. There are linear clusters of bubbles caused by loose seams in the gray board, and planar dispersed bubbles formed by uneven glue application between the face paper and the gray board, or residual air during bonding. Different types of bubbles require different debubbling pressure and time. Second, when detecting bubbles, the vision system is easily interfered with by the texture and pattern of the face paper itself. Relying solely on image grayscale or morphological features is insufficient to accurately distinguish between real bubbles and texture edges, leading to a certain possibility of misjudgment. Third, the lack of data interaction between the debubbling station and the preceding vision positioning and frame forming stations means that process deviations generated in the preceding stations (such as gray board positioning misalignment or loose folded edges) cannot be detected by the debubbling station and used to adjust its parameters, causing the problems to accumulate and amplify in subsequent processes.
[0039] This application proposes an automated defoaming collaborative control method for finished products based on machine vision. The method first acquires surface images of the finished product box and detects suspected bubble areas, extracting their morphological and grayscale features. Based on this, it incorporates the edge position deviation of the gray board recorded at the preceding visual positioning station and the folded edge fit data recorded at the frame forming station. The positions of suspected bubble areas are spatially aligned with this preceding data, thereby identifying bubbles located in the gray board splicing seam area (first type) and bubbles located on the gray board surface area (second type). Subsequently, a bubble state matrix is generated by combining the bubble category attributes and feature parameters, and based on this matrix, corresponding pressure and time adjustment values are matched from a preset process parameter library for defoaming operations. This method, by incorporating preceding station data to classify bubbles, helps distinguish bubbles of different causes and adopt more targeted defoaming parameters, thereby improving the production line's adaptability to process fluctuations to a certain extent and reducing unsatisfactory defoaming effects caused by preceding deviations.
[0040] The terms and features involved in the technical solution of this application can be understood as follows.
[0041] Surface images refer to the raw image data obtained by capturing images of various surfaces of the finished packaging box at the debubbling station using image acquisition equipment (such as industrial cameras). These images can be single images from multiple perspectives or overall surface images after stitching, serving as a visual information basis for subsequent bubble detection. Suspected bubble regions refer to local image blocks identified as potentially containing bubbles after preliminary image analysis. It should be noted that these regions are only candidate objects; whether they are actual bubbles requires further confirmation through subsequent feature extraction and classification steps. Various image processing techniques can be used for suspected bubble region detection in surface images, such as gray-scale threshold-based segmentation methods or texture analysis-based anomaly detection methods. Morphological features and gray-scale distribution features are quantitative indicators used to describe the intrinsic attributes of suspected bubble regions. Morphological features can include geometric parameters such as area, perimeter, roundness, and eccentricity; gray-scale distribution features can include the average gray value, gray-scale variance, and contrast with the surrounding background. These features collectively form the basis for distinguishing bubbles from texture interference and determining the severity of bubbles. The gray board edge position deviation is data obtained from the preceding visual positioning station. It reflects the degree of offset between the actual position and the theoretical standard position of the gray board edge during the bonding process between the face paper and the gray board. This deviation is usually represented by pixel-level or sub-pixel-level coordinate differences, which can generate a two-dimensional deviation matrix to identify the spatial regions of each edge of the gray board in subsequent steps. The folded-in edge fit data is data obtained from the preceding frame forming station. It characterizes the tightness of the fit between the folded-in edge of the face paper and the sidewall of the gray board after frame forming. This data can be obtained through methods such as line laser contour scanning. By analyzing the gap between the contour curve of the folded-in edge and the standard contour, fit indicators such as gap area and gap depth are generated. Spatial coordinate system alignment refers to unifying the data obtained from different stations and different sensors into the same spatial reference system for processing. Specifically, it involves mapping and matching the pixel coordinates of the suspected bubble area in the surface image with the spatial positions corresponding to the gray board edge position deviation and the folded-in edge fit data recorded in the preceding data, thereby determining the accurate position of each suspected bubble area relative to the gray board structure. The first and second categories of suspected bubble areas are classifications based on spatial location. The former specifically refers to suspected bubble areas located in the seam areas between gray boards; the formation of these bubbles is often related to the molding accuracy or positioning deviation of the frame. The latter refers to suspected bubble areas located in the main planar areas of the gray board; these bubbles are more related to the material of the facing paper, the characteristics of the adhesive, or the bonding process. A bubble state matrix is a data structure used to comprehensively describe the bubble status on the surface of the finished packaging box.It encodes the location coordinates, category attributes, and processed (e.g., weighted correction based on fit) morphological features and grayscale distribution characteristics of each suspected bubble area, forming a multi-dimensional dataset that provides input for subsequent parameter matching. The preset defoaming process parameter library is a pre-built database storing processing solutions corresponding to various typical bubble states. This database can be populated based on historical production data or process test results. Each record contains a bubble state matrix template, along with matching defoaming head pressure adjustment values and pressure application time adjustment values. The pressure adjustment values and pressure application time adjustment values are specific control instructions used to drive the actuator's actions. They are not fixed process parameters but are dynamically matched from the process parameter library based on the current bubble state matrix, aiming to enable defoaming operations to adapt to the bubble elimination needs of different products and locations.
[0042] In this embodiment, the above-mentioned scheme forms an organic whole through data flow. First, basic information about "what the bubble is"—its shape and grayscale characteristics—is obtained through image acquisition and bubble detection. Then, by introducing grayboard deviation and fit data from previous workstations, a location attribute—"where the bubble is"—is added to the bubble, allowing it to be subdivided into different categories: those located in the seam area and those located on the grayboard surface. Merging the "what it is" and "where it is" information generates a bubble state matrix that reflects the cause of the bubble and the difficulty of its removal. Finally, based on this state matrix, corresponding process parameters are matched, achieving a closed loop from perceiving the bubble condition to deciding how to remove it. In this process, the preceding data plays a corrective and classification role, making subsequent parameter matching more targeted and avoiding the limitation of treating all bubbles equally. This collaborative data processing method allows the defoaming operation to take into account the characteristics of bubbles in different locations to a certain extent, helping to improve the precision of process control.
[0043] In some embodiments of this application, the step of obtaining the gray board edge position deviation recorded by the preceding visual positioning station further includes: obtaining the gray board edge image captured by the preceding visual positioning station during the gray board and face paper bonding process, extracting the coordinates of multiple edge points of the gray board using a sub-pixel edge detection algorithm, calculating the lateral and longitudinal deviations between the coordinates of each edge point and the corresponding standard template position, and generating a gray board position deviation matrix; wherein, the gray board position deviation matrix is used to identify the pixel region where each gray board edge is located in the spatial coordinate system alignment step.
[0044] In this embodiment, the gray board edge image refers to an image obtained by specifically capturing the edge area of the gray board using an image acquisition device at the preceding visual positioning station. During the bonding process between the gray board and the face paper, the visual positioning station typically triggers image capture during the gray board conveying or positioning stage to obtain images that clearly reflect the outline edge of the gray board. The quality of these images directly affects the accuracy of subsequent edge extraction; therefore, appropriate lighting methods and imaging angles can be selected based on the actual working conditions, such as using backlighting or low-angle lighting to enhance edge contrast. Subpixel edge detection algorithms are image processing techniques used to improve edge positioning accuracy. Traditional edge detection typically locates edges at the integer pixel level, while subpixel algorithms, through interpolation or fitting operations on pixel grayscale values, can determine the edge position to a finer scale within a pixel, such as 0.1 pixels or higher precision. Common subpixel edge detection methods include matrix-based methods, fitting-based methods, and interpolation-based methods; the specific choice depends on the imaging characteristics of the gray board edge. Through subpixel processing, edge coordinate information with higher resolution than the original image can be obtained, helping to more accurately reflect the actual position of the gray board. Edge point coordinates refer to the coordinate values of points representing edge positions extracted from a grayscale edge image after processing by a subpixel edge detection algorithm, placed in the image coordinate system. These coordinates are usually in pixels, but due to the introduction of subpixel algorithms, their values may contain decimal parts. Multiple edge point coordinates together constitute a digital description of the grayscale edge, reflecting the edge's direction, curvature, and local deformation. The standard template position refers to a pre-defined location where the grayscale edge should ideally be. This position is usually derived from product design drawings or calibrated standard samples and stored as template data. In the image coordinate system, the standard template position corresponds to a set of theoretical edge point coordinates, used for comparison with the actual extracted edge point coordinates. Lateral and longitudinal deviations refer to the differences between the actual extracted edge point coordinates and the corresponding standard template position coordinates in the horizontal (horizontal axis) and vertical (vertical axis) directions of the image. These deviations quantify the degree of grayscale offset relative to the standard position, and can be expressed as (Δx, Δy). The combined deviations of multiple edge points can reveal whether the gray board exhibits deformations such as overall translation, rotation, or local warping. The gray board position deviation matrix is a data array organized in spatial order by the lateral and longitudinal deviations of these edge points. This matrix can be viewed as a two-dimensional data structure, where each element corresponds to the deviation at a specific edge position of the gray board, and can contain both lateral and longitudinal components. The purpose of this matrix is to record the offset of each edge region of the gray board and, in subsequent spatial coordinate system alignment steps, to identify the pixel area occupied by each edge of the gray board, thereby associating the pixel coordinates in the surface image with the deviations from previous processes.
[0045] In this step, high-precision edge point coordinates are extracted from the gray board edge image using a sub-pixel edge detection algorithm. These coordinates are then compared with the standard template position to generate lateral and longitudinal deviations, ultimately forming a gray board position deviation matrix. The core of this process lies in quantifying the actual position deviation of the gray board and organizing it into a usable data format. The deviation matrix is not merely a data record; it also provides a spatial reference for subsequent spatial alignment. It is precisely because of the sub-pixel level edge deviation data that it becomes possible to accurately match the position of suspected bubble areas with deviations from previous processes. Without this refined deviation quantification, whether a bubble is located in the seam area can only be roughly estimated, significantly impacting classification accuracy. Therefore, this step lays the spatial positioning foundation for the entire collaborative control method, providing a reliable basis for bubble classification and parameter matching.
[0046] Taking cigarette box packaging production as an example, when the preceding visual positioning station photographs the gray board of the cigarette box, it acquires edge images of the four sides of the gray board. Using a sub-pixel edge detection algorithm, the coordinates of multiple points on the upper edge of the gray board are extracted from the image. It is found that the actual positions of these points are generally offset to the right by 0.3 pixels compared to the standard template position, and there is a slight downward curvature in the middle part. These deviation values are recorded to generate a matrix containing the lateral and vertical deviations of each point on the upper edge. Subsequently, at the defoaming station, when a suspected bubble area is detected on the surface of the cigarette box, spatial alignment can be used to determine whether the bubble is exactly located in the offset area of the upper edge of the gray board, thus classifying it as a first-type bubble and adjusting the defoaming pressure accordingly.
[0047] In some embodiments of this application, the step of obtaining the folded edge fitting data recorded at the pre-forming frame station further includes: obtaining line laser scanning data of the area where the folded edge fits against the gray board sidewall after the frame is formed; reconstructing the fitting contour curve of the folded edge based on the line laser scanning data; calculating the gap area and gap depth between the fitting contour curve and the standard fitting contour; and generating a fitting index; wherein the fitting index is used to characterize the tightness of the gray board splice seam area.
[0048] In this embodiment, line laser scanning data refers to three-dimensional point cloud data reflecting the surface contour information of an object, acquired by a line laser profile measuring instrument. At the frame forming station, a line laser projects a laser line onto the area where the folded edge meets the sidewall of the gray board. A camera captures the laser stripe image modulated by the object surface, and the height information of each point on the laser line is calculated using triangulation principles. These data points are typically presented in two-dimensional coordinates (displacement along the laser line direction, height value), and multiple cross-sections can be continuously scanned to obtain complete contour information of the meeting area. Line laser scanning is non-contact and highly accurate, making it suitable for measuring the morphology of minute gaps like folded edges. The meeting contour curve refers to a two-dimensional contour line reconstructed from the line laser scanning data, reflecting the shape of the interface between the folded edge and the sidewall of the gray board. Specifically, by interpolating or fitting multiple height points acquired on a scanning cross-section, a continuous curve can be formed. This curve can visually demonstrate the undulations of the folded edge during its bending and meeting process, starting from the surface of the gray board sidewall. For multiple continuous scanning sections, the overall three-dimensional morphology of the bonding area can be reconstructed. However, for bonding analysis, the focus is usually on the contour curve on a representative section. The standard bonding contour refers to the pre-defined shape of the folded edge under ideal process conditions. This contour is usually derived from product design drawings or validated standard samples, reflecting the ideal state of tight, gap-free bonding between the folded edge and the gray board sidewall. In actual production, due to factors such as material springback, mold wear, or uneven pressure, the actual bonding contour often differs from the standard contour. The standard bonding contour can serve as a reference benchmark for quantitatively evaluating the quality of actual bonding. Gap area and gap depth are two indicators used to quantify the difference between the actual bonding contour and the standard bonding contour. Gap depth refers to the maximum distance between the actual and standard contours along the direction perpendicular to the gray board sidewall, reflecting the severity of poor bonding. Gap area refers to the area enclosed between the two contour lines, usually calculated by integration over a specified evaluation length, comprehensively reflecting the cumulative effect of the gap in width and depth. Understandably, a larger gap area and a deeper gap indicate a less tight fit between the folded edges, resulting in a looser seam in that area. The fit index is a quantitative value calculated based on both the gap area and depth, used to characterize the tightness of the gray board seam area. This index can be defined in various ways, such as by weighted summation of the gap area and depth, or by comparing both to an allowable tolerance range and converting them into a grade value. The magnitude of the fit index directly reflects the susceptibility to air bubbles in that area: a higher fit index (or a lower one, depending on the definition) indicates a looser seam, and a greater likelihood of air bubbles forming at that location. This index will be used in subsequent steps to correct for air bubble characteristics in the seam area.
[0049] In this step, line laser scanning data serves as the raw input. After reconstruction processing, a bonding contour curve is formed, which is then compared and calculated with a standard bonding contour to ultimately generate a bonding index. This series of operations constructs a complete link from raw measurement data to the quantification of process status. Scanning data is an objective physical measurement result, the bonding contour curve is a visual representation of the data, gap area and gap depth are quantified differences, and the bonding index is a comprehensive process evaluation parameter. Each link is interconnected and indispensable: without high-precision scanning data, true contour information cannot be obtained; without comparison with the standard contour, the quality of bonding cannot be judged; without the quantification of gap area and depth, specific values that can be used for subsequent processing cannot be generated. The final generated bonding index will serve as the basis for subsequent feature weighting correction of the first type of bubble region, allowing bubbles located at loose seams to receive higher weights in the bubble state matrix, thereby matching greater defoaming pressure or longer pressure application time.
[0050] Taking cigarette box packaging as an example, at the frame forming station, the side walls of the cigarette box need to be folded in and fitted. A line laser scanner scans the fitting areas of the four side walls and folded edges of the cigarette box, obtaining the height data of each side wall section. After reconstruction, a fitting contour curve is obtained. Compared with the standard fitting contour, it is found that there is a gap depth of about 0.2 mm in a section in the middle of the front side wall of the cigarette box, and the gap area is also relatively large. The calculated fitting degree index of this area is high, indicating that the splicing seam is relatively loose. Subsequently, at the defoaming station, if a bubble is detected exactly in the middle of the front side wall, the characteristics of the bubble will be weighted and corrected according to this high fitting degree index, so that it appears as a bubble that is more difficult to eliminate in the bubble state matrix, thereby matching a larger defoaming pressure to better eliminate bubbles caused by loose splicing seams.
[0051] In some embodiments of this application, the steps for detecting suspected bubble regions in a surface image include: performing multi-scale wavelet transform on the surface image to extract singular points in the high-frequency subband as candidate bubble points; performing morphological closing operations on the candidate bubble points to connect them and form candidate connected regions; calculating the circularity, eccentricity, and contrast features of each candidate connected region, and marking the candidate connected regions that meet the preset threshold as suspected bubble regions.
[0052] In this embodiment, multi-scale wavelet transform is a signal processing technique that decomposes an image at different scales, dividing the image information into low-frequency approximation parts and high-frequency detail parts, and is implemented using existing algorithms. Here, multi-scale refers to processing the image using analysis windows of different sizes to simultaneously capture bubble features of different sizes. Wavelet transform can decompose an image into multiple frequency bands, where the high-frequency sub-band corresponds to regions in the image with drastic gray-level changes, such as bubble edges, abrupt changes in paper texture, and seam boundaries. Various implementation methods can be used, such as discrete wavelet transform or stationary wavelet transform, depending on computational resources and accuracy requirements. Through multi-scale analysis, the frequency components corresponding to bubbles of different sizes can be captured more comprehensively. The high-frequency sub-band refers to the components containing high-frequency information of the image after wavelet decomposition. These sub-bands typically correspond to details in the image, such as edges, corners, textures, and noise. For bubble detection, the gray-level difference between the bubble and the surrounding background creates local gray-level jumps, which are represented by high-energy regions in the high-frequency sub-band. The high-frequency subband can be high-frequency components in the horizontal, vertical, or diagonal directions, or it can be the result of comprehensive processing of high-frequency components in multiple directions. Singularities are pixels with abnormally high grayscale values in the high-frequency subband, usually corresponding to local grayscale extrema in the image. These points are often located at the edges or inside bubbles, serving as potential indicators of bubble presence. Singularity extraction can be achieved by finding local maxima or using thresholding. It's understandable that not all singularities correspond to real bubbles; texture edges of the paper, dust spots, etc., can also generate singularities, thus requiring further processing. Candidate bubble points are the set of pixels extracted from the high-frequency subband that are initially determined to be potentially related to bubbles. These points are the starting point for subsequent processing, representing the locations where bubbles may exist in the image. Because the high-frequency subband contains interference information such as texture edges, candidate bubble points usually contain a large number of non-bubble points, requiring further filtering and connection in subsequent steps. Morphological closing is a fundamental operation in image morphological processing, consisting of a dilation operation followed by an erosion operation. The closing operation fills in narrow breaks and small holes in an image while preserving the overall shape and size of the original region. Here, performing the closing operation on the binary image composed of candidate bubble points connects adjacent but unconnected candidate points, forming continuous connected regions. This is helpful in merging discrete bubble edge points into complete bubble regions. A candidate connected region is a pixel block formed by connecting adjacent pixels after morphological closing. These regions represent complete regions that may be bubbles, rather than single isolated points. Each candidate connected region has its specific geometry and size, providing a basic processing unit for subsequent feature calculations. Circularity is a feature parameter describing how close a region's shape is to a circle.For bubbles, due to surface tension, many bubbles exhibit an approximately circular outline in an image. Circularity can be calculated by the relationship between the area and perimeter of the region, for example, by dividing the area by the square of the perimeter and multiplying by a constant. The closer the circularity value is to 1, the closer the region is to a circle; the smaller the value, the more irregular the shape of the region. For example, artifacts caused by wrinkles tend to have elongated shapes, resulting in lower circularity values. Eccentricity is a feature parameter describing the degree of stretching of a region's shape, similar to the concept of eccentricity for an ellipse. A higher eccentricity indicates a more elongated region; a lower eccentricity indicates a region closer to a circle or square. This feature helps distinguish circular bubbles from linear scratches or seams. Contrast features describe the degree of difference in grayscale between a candidate connected region and its surrounding background. Due to the reflective properties of the air inside, bubble regions typically exhibit grayscale differences compared to their surrounding, closely adjacent regions. Contrast can be defined as the difference between the average grayscale of the region and the average grayscale of its neighbors, or the ratio of the two. Regions with higher contrast are more likely to be real bubbles, while candidate regions with lower contrast may be false positives caused by texture variations. Preset thresholds refer to pre-defined numerical limits used to filter candidate connected regions. Threshold ranges can be set for features such as roundness, eccentricity, and contrast. Only candidate connected regions that meet the corresponding threshold requirements for all three features will be ultimately marked as suspected bubble regions. These thresholds can be statistically set based on samples from actual production, or adjusted and optimized during production line debugging.
[0053] In this implementation, this detection step progressively filters out suspected bubble regions from the original image in a step-by-step manner. First, singular points in the high-frequency subband are extracted using multi-scale wavelet transform. This step is equivalent to initially locking down the local locations where bubbles may exist from the complex tissue paper texture background, serving as a focus of attention. However, these singular points are discrete pixels and cannot directly reflect the complete shape of the bubble. Next, morphological closing operations are used to connect adjacent singular points into candidate connected regions. This step restores the possible continuous contour of the bubble, laying the foundation for subsequent shape analysis. Finally, the roundness, eccentricity, and contrast features of each candidate connected region are calculated and compared with preset thresholds. This step serves to eliminate false candidate regions caused by texture edges, seams, or dust. The three features describe the intrinsic properties of the candidate regions from different perspectives: roundness and eccentricity focus on whether the shape conforms to the physical characteristics of a bubble, while contrast focuses on whether the grayscale changes conform to the optical characteristics of a bubble. The three work together to determine the final bubble suspected region labeling result.
[0054] Taking cigarette packaging as an example, after the bubble removal station acquires an image of the cigarette box surface, it undergoes multi-scale wavelet transform to extract multiple singular points from the high-frequency subband. These points are distributed across various locations on the cigarette box surface. After morphological closing operations, some closely spaced singular points are connected into several small regions. Calculating the roundness, eccentricity, and contrast of these regions reveals that one region has a roundness of 0.85, an eccentricity of only 0.3, and high contrast with the surrounding background; while another elongated region has a roundness of only 0.3, an eccentricity as high as 0.9, and low contrast. After comparison with preset thresholds, the former region is marked as a suspected bubble region, while the latter is determined to be the texture edge of the face paper and is excluded. In this way, the final suspected bubble regions relatively accurately reflect the actual bubble distribution on the cigarette box surface.
[0055] In some embodiments of this application, the steps of determining a first type of suspected bubble area located in the gray board splice area and a second type of suspected bubble area located in the gray board surface area include: mapping the center coordinates of the suspected bubble area to the spatial coordinate system where the gray board position deviation matrix is located; if the center coordinates fall within the tolerance zone formed by the edge point coordinates in the gray board position deviation matrix, it is determined to be a first type of suspected bubble area; otherwise, it is determined to be a second type of suspected bubble area.
[0056] In this embodiment, the center coordinates refer to the position coordinates of the geometric center point of each suspected bubble region in the image. For a marked suspected bubble region, its center coordinates can be obtained by calculating the average of the coordinates of all pixels in the region, or the center of the smallest bounding rectangle of the region can be used as a representative. The center coordinates, as a positional representation of the suspected bubble region, are used to determine the specific orientation of the bubble relative to the gray board structure in the subsequent spatial alignment step. For example, for an approximately circular bubble region, its center coordinates roughly correspond to the center position of the bubble. Mapping refers to the process of transforming points in an image coordinate system to another coordinate system. Here, mapping refers to transforming the center coordinates of the suspected bubble region from the pixel coordinate system of the surface image to the spatial coordinate system used by the gray board position deviation matrix. This transformation usually needs to be determined with the help of camera calibration parameters and the mechanical transmission relationship between each station to ensure that data from different sources can be compared and analyzed under the same spatial reference frame. The spatial coordinate system in which the gray board position deviation matrix is located refers to the spatial reference frame adopted by the gray board position deviation matrix. This coordinate system is usually associated with the physical structure of the finished packaging box, for example, taking a corner point of the gray board as the origin and the length and width directions of the gray board as coordinate axes. Each element in the gray board position deviation matrix corresponds to a deviation value at a specific location in the coordinate system. Mapping the center coordinates of the suspected bubble area to this coordinate system means that the position of the bubble can be directly geometrically correlated with the deviation of each edge of the gray board. The tolerance zone formed by the edge point coordinates refers to an allowable area defined around the coordinates of each edge point of the gray board in the spatial coordinate system defined by the gray board position deviation matrix. Since the edge of the gray board is not a strict geometric line, but an area with a certain width, and there are normal dimensional fluctuations during the production process, it is more reasonable to regard the edge of the gray board as a strip-shaped area. The tolerance zone can be a strip formed by extending a certain width to both sides with the edge point coordinates as the center. This width can be preset according to the thickness of the gray board, the imaging accuracy, and the process requirements. Points falling within this range are considered to be located in the splicing seam area of the gray board.
[0057] In this embodiment, this classification step uses spatial mapping and region determination to link the originally isolated bubble detection results with the process deviation data of the preceding workstation. First, the center coordinates of the suspected bubble area are mapped to the coordinate system of the gray board position deviation matrix. This step achieves spatial unification of data from different workstations, providing a common benchmark for subsequent comparisons. Subsequently, by determining whether the center coordinates fall within the tolerance zone formed by the edge point coordinates, a refined classification of bubble positions is achieved. The introduction of the tolerance zone takes into account the actual physical shape of the gray board edge and normal fluctuations in production, avoiding misclassification of points located just near the edge as edge points or non-edge points. Through this mechanism, bubbles located at the gray board seams are identified and assigned the first category label, while other bubbles are classified into the second category. This classification result provides a clear basis for subsequent feature processing and parameter matching, allowing bubbles located in different positions to be treated differently, avoiding incomplete defoaming or overpressure damage that may result from using a uniform processing method.
[0058] Taking cigarette box packaging as an example, the bubble removal station detected three suspected bubble areas on the cigarette box surface, located in the center of the front, near the left edge of the front, and on the left side. Through camera calibration and mechanical coordinate transformation, the center coordinates of these three bubbles were mapped to the coordinate system of the gray board position deviation matrix. The gray board position deviation matrix showed a positioning deviation at the left edge of the front of the cigarette box, and the tolerance zone of this edge covered the area near the left edge of the front. After comparison, the center coordinates of the bubble near the left edge of the front fell within this tolerance zone, and was therefore identified as a first-type suspected bubble area, indicating that the bubble was likely related to the positioning deviation of the gray board edge. The center coordinates of the bubbles in the center of the front and on the left side did not fall within the tolerance zone of any edge, and were therefore identified as second-type suspected bubble areas. Thus, the three bubbles were successfully classified, and will be processed using different parameters subsequently.
[0059] In some embodiments of this application, the step of generating the bubble state matrix of the current finished product packaging box includes: for the first type of suspected bubble area, the morphological features and gray-scale distribution features are weighted and corrected according to the fit index of its location; for the second type of suspected bubble area, its original morphological features and gray-scale distribution features are retained; the corrected or retained feature parameters are encoded according to the bubble position coordinates to form a multi-dimensional bubble state matrix.
[0060] In this embodiment, weighted correction refers to numerically adjusting the original morphological and grayscale distribution characteristics of the suspected first-type bubble region based on the fit index of its location. Since the fit index reflects the tightness of the gray board seam area, the worse the fit (e.g., the larger the gap), the more difficult it is to eliminate the bubble. Therefore, when generating the bubble state matrix, weighted correction can be used to make these bubbles located at loose seams exhibit higher "stubbornness" in their feature values. For example, if the original roundness value of a certain first-type bubble region is 0.8, but the fit index at its location shows a large gap, the roundness can be multiplied by a weight coefficient greater than 1, or similar amplification processing can be applied to features such as area and contrast. The specific method of weighted correction can be pre-set according to the correspondence between the fit index and the difficulty of bubble removal; for example, a mapping table between the fit index and the weight coefficient can be established, or a functional relationship can be used for calculation. Preserving the original morphological and grayscale distribution characteristics means that for the second type of suspected bubble areas, no additional numerical adjustments are made; the morphological and grayscale distribution characteristics extracted in step S2 are directly used as the basis for subsequent coding. This approach is based on the consideration that bubbles located in the gray board area are mainly related to the paper material, adhesive properties, or bonding process. Their elimination difficulty is not directly related to the bonding degree of the preceding frame forming, therefore, there is no need to introduce a bonding degree index for correction. Preserving the original characteristics helps maintain the bubble state matrix's accurate reflection of bubbles in the gray board area. Feature parameters refer to the specific quantitative values used to describe each suspected bubble area after weighted correction or preservation of the original state. These parameters may include, but are not limited to, the area, perimeter, roundness, eccentricity, average grayscale, grayscale variance, and contrast of the area. Each suspected bubble area corresponds to a set of feature parameters, which together constitute a comprehensive description of the bubble. Coding according to the bubble position coordinates means associating the feature parameters of each suspected bubble area with its spatial position on the surface of the finished packaging box and organizing them according to a certain data format. The bubble position coordinates can be two-dimensional coordinates after spatial alignment in step S4, such as (x, y) values in a coordinate system established with a corner point of the gray board as the origin. The encoding method can take various forms. For example, a two-dimensional array can be constructed, where each element corresponds to a specific position region, storing the feature parameters of the bubbles within that region; or a list structure can be used to record the coordinates of each bubble and its corresponding feature parameter vector in sequence. The purpose of encoding is to facilitate rapid retrieval and comparison of bubble state information in subsequent parameter matching steps. The multi-dimensional bubble state matrix refers to the final generated data structure, which contains complete information on all suspected bubble areas on the surface of the current finished packaging box. It is called multi-dimensional because the matrix not only includes the spatial dimension of the bubble's position coordinates but also the feature dimension composed of multiple feature parameters for each bubble.This can be understood as a data table, where each row represents a suspected bubble area, and each column represents an attribute (such as X-coordinate, Y-coordinate, area, roundness, contrast, etc.). This matrix provides a comprehensive digital description of the current bubble condition of the product, offering input for matching corresponding control parameters from the defoaming process parameter library.
[0061] In this implementation, the core of this generation step lies in adopting differentiated processing strategies for the two types of bubbles and organically integrating the processing results with location information. First, based on the category attributes determined in the previous steps, the first and second types of bubbles are separated: the first type of bubbles, located in the seam area, are weighted and corrected using a fit index, ensuring that their shape and grayscale features reflect the additional defoaming difficulty caused by loose splicing at that location; the second type of bubbles remain unchanged to avoid introducing irrelevant correction factors. This separation process reflects the differentiated treatment of bubbles with different causes, making subsequent parameter matching more targeted. Subsequently, the corrected or retained feature parameters are bound and encoded with the bubble's location coordinates, forming a data structure with a one-to-one correspondence between location and attribute. The existence of location coordinates gives the bubble state matrix spatial attributes, reflecting the distribution of bubbles across the entire finished product box surface; while the existence of multi-dimensional feature parameters allows the matrix to quantitatively describe the specific characteristics of each bubble. The combination of these two provides a complete information foundation for subsequently matching defoaming parameters from the process parameter library that are suitable for the current bubble distribution and characteristics.
[0062] Taking cigarette packaging as an example, suppose two suspected bubble areas are detected on the surface of the cigarette box: one is located at the seam of the front sidewall (Category 1), where the previously measured fit index is high, indicating that the seam is relatively loose; the other is located in the gray board area in the center of the front of the cigarette box (Category 2). When generating the bubble state matrix, for the bubble at the seam, its area and contrast features are weighted and amplified based on its high fit index, for example, by multiplying the area by a coefficient of 1.3, so that it appears as a stubborn bubble requiring greater pressure in subsequent parameter matching. For the bubble in the center of the gray board area, its original area, roundness, and other features are used directly. Then, the coordinates of these two bubbles (e.g., the coordinates of the bubble at the seam are (15, 22), and the coordinates of the bubble in the gray board area are (30, 45)) are combined with their respective feature parameters (corrected or original) to form a bubble state matrix containing two rows of data. This matrix will then be used to match the most similar template in the defoaming process parameter library, thereby determining appropriate pressure adjustment values for the two different positions of the cigarette box.
[0063] In some embodiments of this application, a preset defoaming process parameter library stores multiple bubble state matrix templates and pressure adjustment values and pressure application time adjustment values corresponding to each template. The step of matching the defoaming pressure head pressure adjustment value and pressure application time adjustment value corresponding to the current bubble state from the preset defoaming process parameter library according to the bubble state matrix includes: calculating the similarity between the current bubble state matrix and each template, and selecting the pressure adjustment value and pressure application time adjustment value corresponding to the template with the highest similarity as the control parameters for the current defoaming operation.
[0064] In this embodiment, the pre-built defoaming process parameter library is a dataset pre-constructed and stored in the control system. This library includes various typical bubble distribution conditions and their corresponding processing solutions. The parameter library can be built based on previous process experiment results or obtained through statistical analysis of historical production data. As production experience accumulates, this library can be continuously expanded and updated. It is understood that the richness of the parameter library affects the accuracy of matching to a certain extent; the more template types included in the library, the more likely it is to find a reference solution similar to the current situation. The bubble state matrix template is a reference sample stored in the parameter library, with each template representing a typical bubble distribution pattern. These templates are derived from representative bubble conditions encountered in past production, and are saved in matrix form after feature extraction and encoding. Each template not only records the bubble's location distribution, category attributes, and morphological grayscale features, but also associates it with a set of verified and effective defoaming control parameters. For example, one template may correspond to a situation where there are continuous small bubbles in the splicing seam area and a small number of large bubbles scattered on the gray board surface, while another template may correspond to a situation where densely packed microbubbles are evenly distributed on the gray board surface. Similarity is a quantitative indicator used to measure the closeness between the current bubble state matrix and various templates in the parameter library. Similarity can be calculated using various mathematical methods, such as calculating the Euclidean distance, cosine similarity, or correlation coefficient between the two matrices. A higher similarity value indicates that the current bubble distribution is closer to the state represented by a historical template. Similarity calculation can be performed globally on the entire matrix, or different regions within the matrix (such as the seam area and the gray board surface area) can be assigned different weights before comparison to highlight the influence of key areas. Pressure adjustment and pressure application time adjustment values are the specific process parameters ultimately used to control the defoaming operation. These two values are not fixed constants but are dynamically matched from the parameter library based on the current bubble state. The pressure adjustment value can be an absolute value or an increase or decrease relative to the reference pressure; similarly, the pressure application time adjustment value can be a duration value or a time increment or decrement. Together, they determine the pressure and duration that the defoaming head should apply during this operation.
[0065] In this embodiment, a rapid mapping mechanism from state perception to parameter decision-making is constructed. The bubble state matrix, as a digital description of the current bubble condition on the product surface, serves as the input to the matching process. The preset defoaming process parameter library acts as an experience knowledge base, storing templates representing various typical situations encountered historically, while the pressure and time adjustment values associated with each template represent verified and effective solutions. By calculating the similarity between the current matrix and each template and searching for the closest match in the library, historical experience is essentially being used to address the current problem. The parameters corresponding to the template with the highest similarity are selected as the current control command, thus linking the current specific situation with successful handling experience of similar situations in the past. This template-matching-based parameter decision-making method avoids complex mechanistic analysis for each new situation and utilizes accumulated experience data to guide production, enabling the setting of defoaming parameters to quickly adapt to changes in bubble distribution.
[0066] Taking cigarette box packaging as an example, the preset defoaming process parameter library stores multiple templates. One template corresponds to the situation where 3-5 round bubbles with a diameter of about 2 mm appear at the seam of the cigarette box side wall. The pressure adjustment value associated with this template is increased by 0.2 MPa, and the pressure application time adjustment value is extended by 0.5 seconds. After bubble detection and matrix generation, the bubble state matrix of the currently produced cigarette box shows that the cigarette box also has 4 round bubbles with a diameter of about 2 mm at the seam of the side wall, and the overall distribution is very similar to the template in the library. By calculating the similarity, it is confirmed that this template has the highest similarity. Therefore, the control system selects the parameters corresponding to this template, increases the pressure of the defoaming head by 0.2 MPa on the baseline value, extends the pressure application time by 0.5 seconds, and then executes the defoaming operation.
[0067] In some embodiments of this application, the step of controlling the actuator of the defoaming station to perform defoaming operation according to the pressure adjustment value and the pressure application time adjustment value further includes: spatially interpolating the pressure adjustment value corresponding to each bubble area to generate a pressure distribution control surface acting on the entire surface of the finished product packaging box; applying different output pressures to multiple independently controlled pressure units in the defoaming head according to the pressure distribution control surface, and controlling the pressure application time in segments.
[0068] In this embodiment, the pressure adjustment value corresponding to each bubble region refers to the pressure correction amount suggested for each specific bubble region obtained by matching the bubble state matrix with the process parameter library in the aforementioned steps. These adjustment values are discrete; they only correspond to the locations of each bubble detected in the image, not every point on the surface of the finished box. It is understood that there is no directly corresponding pressure adjustment value for locations outside the bubble regions, but these regions also need to withstand a certain pressure to maintain the overall bonding effect. Spatial interpolation is a mathematical processing method used to extrapolate data for unknown points within a continuous region based on known discrete point data. Here, the known data are the pressure adjustment values corresponding to each bubble region, while what needs to be extrapolated is the pressure adjustment value for each location on the entire surface of the finished box. Spatial interpolation can employ various algorithms, such as linear interpolation, spline interpolation, or kriging interpolation, and the specific choice depends on the density of the bubble distribution and the requirements for smoothness. Through interpolation processing, discrete, local pressure requirements can be extended to a continuous, full-surface pressure distribution. A pressure distribution control surface is a two-dimensional surface function or data grid generated through spatial interpolation. It describes the continuous distribution of pressure adjustment values across the entire surface of the finished box as the position changes. This surface can be visualized as a "pressure map" covering the surface of the finished box, with different areas corresponding to different colors or heights, representing the amount of pressure adjustment that should be applied at that location. The pressure distribution control surface provides a full-surface pressure reference for subsequent fine-tuning control. Multiple independently controlled pressure units refer to the defoaming head being divided into several sub-units whose output pressure can be controlled individually. These pressure units can be matrix-arranged miniature pressure blocks, or airbags or electromagnetic pressure heads capable of independent pressure adjustment. Each pressure unit can receive independent control commands and apply different pressure values than other units. This design makes the defoaming head no longer a single, uniform pressure application, but rather possesses spatial resolution, enabling it to apply differentiated pressure according to the needs of different areas on the finished box surface. Segmented control refers to not using a uniform pressure duration when controlling the pressure application time, but instead setting different pressure times for different areas of the finished box surface. The division of zones can correspond to the layout of the pressure units, or it can be flexibly defined according to the distribution of bubble regions. For example, a longer pressurization time can be set for areas with dense bubbles or those that are difficult to eliminate; while a shorter pressurization time or the same as the reference time can be set for areas without bubbles or where bubbles are easy to eliminate.
[0069] In this embodiment, a refined transformation from local demand to global control is achieved. First, the pressure adjustment values corresponding to each bubble region are discrete and local, reflecting the individual demands of bubbles at different locations. Through spatial interpolation, these discrete demands are merged into a continuous pressure distribution control surface, allowing the pressure demands that originally existed only at bubble points to smoothly transition to the entire surface of the finished product box, avoiding potential damage to the product caused by sudden pressure changes in adjacent areas. Subsequently, this pressure distribution control surface is transmitted to multiple independently controlled pressure units in the defoaming head. Each unit applies the corresponding output pressure according to the value of the surface at its location, thus achieving true on-demand pressure application. Simultaneously, segmented control of the pressure application time further enhances the flexibility of regulation, allowing both pressure and time dimensions to be differentiated according to regional characteristics. This control method, which expands pressure demands from points to a surface and then implements the surface distribution to independent execution units, enables the defoaming operation to more precisely match the actual distribution of bubbles, helping to eliminate stubborn bubbles while avoiding excessive pressure on bubble-free areas.
[0070] Taking cigarette box packaging as an example, the bubble state matrix obtained after the preceding steps shows that there is a stubborn bubble in the middle of the front side of the cigarette box that requires an additional 0.3 MPa pressure, while there are two small bubbles on the left side that each require an additional 0.1 MPa pressure. Through spatial interpolation, a pressure distribution control surface is generated that gradually decreases from the middle of the front side outwards. The debubbling head consists of multiple independently controlled micro-pressure blocks. When the head is pressed down, the pressure block located in the middle of the front side applies a pressure 0.3 MPa higher than the reference value according to the pressure surface, while the pressure blocks around it apply 0.2 or 0.1 MPa pressure. The corresponding pressure block on the left side applies 0.1 MPa pressure, and other bubble-free areas only apply the reference pressure. Simultaneously, the pressure application time is controlled: the middle area of the front side is pressured for an extended period of 1 second, the left side area for an extended period of 0.5 seconds, and other areas are pressured according to the reference time. In this way, different areas on the cigarette box surface receive differentiated debubbling treatment adapted to their bubble conditions.
[0071] In some embodiments of this application, the method further includes: after the defoaming operation is completed, acquiring surface images of the finished packaging box from multiple perspectives to verify the defoaming effect; if the verification result shows that there are residual bubble areas that have not been eliminated, combining the image features of the residual bubble areas, the corresponding gray board edge position deviation, and the folded edge fit data into an anomaly record and storing them in the anomaly database; when the cumulative number of anomaly records for the same specification of product reaches a preset number, triggering an update prompt for the corresponding template parameters in the defoaming process parameter library.
[0072] In this implementation, defoaming effect verification refers to the process of photographing the surface of the finished packaging box again using an image acquisition device after the defoaming operation is completed, and comparing the captured image with the state before defoaming or the preset quality standard. The purpose of this step is to confirm whether the defoaming operation has achieved the expected effect, that is, whether the bubbles have been completely eliminated. The verification method can be to re-detect suspected bubble areas, or to perform differential processing between the image after defoaming and the image before defoaming. It is understood that the result of the effect verification will serve as the basis for whether to record anomalies in the future. Residual bubble areas refer to bubbles that are still present on the surface of the finished packaging box after the defoaming operation and are found during the defoaming effect verification process. These bubbles may not have been completely eliminated due to insufficient defoaming parameters, or they may have been newly generated during the defoaming process (e.g., local bulging caused by improper pressure). The identification of residual bubble areas can use the same or similar image processing methods as the initial bubble detection, and their location and characteristics will be recorded. Anomaly record refers to a data record formed by packaging and storing the relevant information of residual bubble areas found in a defoaming effect verification. This record typically contains three parts: image features of the residual bubble area (including its morphological features and grayscale distribution features), and data from the preceding workstation corresponding to the product—the deviation of the gray board edge position and the fit of the folded edge. These three parts together provide a complete description of the cause and effect of a defoaming failure event. The anomaly database is a dedicated collection of data used to store anomaly records. This database can be organized according to multiple dimensions such as product specifications, defect type, and occurrence time for subsequent statistical analysis and querying. As the production process continues, the anomaly database accumulates data, providing raw materials for process optimization. Products of the same specification refer to a class of packaging boxes with the same product model, material composition, and dimensional parameters. For products of different specifications, the bubble formation patterns and defoaming process parameters may differ; therefore, the statistics and analysis of anomaly records need to be limited to the same specification to ensure data comparability. The preset quantity is a pre-set threshold used to determine whether the process parameter database needs to be updated. This quantity can be set according to factors such as the production batch size and the stringency of quality requirements; for example, it can be set to detect residual bubbles in 10 consecutive products of the same specification, or a cumulative total of 50. The purpose of the preset quantity is to avoid frequent update prompts due to occasional, single anomalies. A trigger refers to a signal or instruction that automatically initiates a subsequent action when the cumulative number of anomaly records reaches the preset quantity. This trigger action could be generating a prompt message displayed on the HMI, sending a message to maintenance personnel, or automatically entering the parameter library's maintenance mode. The corresponding template parameters refer to the pressure adjustment values and pressure application time adjustment values corresponding to the set of templates matched from the defoaming process parameter library for the product involved in the anomaly record during the initial defoaming operation.This set of parameters is the direct cause of the current unsatisfactory defoaming effect, and therefore becomes the target for subsequent review and adjustment. An update notification is an informational message used to inform operators or process engineers that one or more templates in the current defoaming process parameter library for a specific product specification may need to be checked and optimized. The notification may include statistical information on abnormal records, the template numbers involved, and suggested adjustment directions. Upon receiving the notification, relevant personnel can manually review the template parameters or make corrections using data analysis tools.
[0073] In this embodiment, this technical step constructs a closed-loop mechanism from effect feedback to parameter optimization. Defoaming effect verification, as a post-production inspection method, captures cases where defoaming operations were not completely successful and combines key information from these cases (residual bubble characteristics and preceding deviation data) into anomaly records stored in the database. This step achieves quantitative description and storage of defoaming failure events. As production continues, anomaly records for the same product specification gradually accumulate. When the number reaches a preset threshold, the system triggers an update prompt, pointing to the set of template parameters that initially caused the failure. This mechanism makes the process parameter library no longer static but capable of self-examination and optimization prompts based on feedback from actual production. The preceding deviation data in the anomaly records (gray board edge position deviation and folded edge fit data) is particularly crucial, as it helps pinpoint whether defoaming failure is related to fluctuations in preceding processes. This provides clues for tracing problems at previous workstations while optimizing defoaming parameters. Through this feedback loop, defoaming process parameters can be gradually improved with accumulated production experience, helping to reduce the recurrence of similar problems in future batches.
[0074] Taking cigarette box packaging as an example, after a batch of cigarette boxes undergoes defoaming, the system collects images again for effect verification. It was found that a small air bubble remained at the sidewall seam of one cigarette box. Therefore, the image feature of this residual air bubble, along with the gray board edge deviation recorded at the visual positioning station (sidewall edge offset to the right by 0.2 pixels) and the folded edge fit data recorded at the frame forming station (gap depth of 0.15 mm), are combined into an anomaly record and stored in the anomaly database. When the cumulative number of such anomaly records for cigarette boxes of the same specification reaches 20, the system triggers an update prompt, displaying "It is recommended to check the pressure and time parameters of template A5 (corresponding to the seam air bubble template) in the defoaming process parameter library." Process personnel then review and adjust the parameters of template A5 accordingly to improve the success rate of subsequent defoaming operations.
[0075] In some embodiments of this application, the method further includes: performing statistical analysis on the bubble state matrix of multiple consecutive finished packaging boxes to generate a bubble distribution trend map; if the bubble distribution trend map shows that the frequency of bubble occurrence in the gray board splicing seam area exceeds a set threshold, then sending positioning reference correction parameters to the preceding visual positioning station to adjust the positioning coordinates of subsequent gray board and face paper bonding.
[0076] In this embodiment, the bubble distribution trend chart refers to a visual chart that presents the results of statistical analysis in a graphical way. This chart can be a line graph showing the change in bubble frequency over time or product serial number; it can also be a heat map showing the spatial distribution density of bubbles on the surface of the finished box; or it can be a bar chart comparing the number of bubble occurrences in different areas. The intuitiveness of the trend chart helps to quickly identify the changing patterns of bubble distribution. The bubble occurrence frequency in the gray board seam area refers to the number or proportion of suspected bubble areas located in the gray board seam area among multiple consecutive products. This frequency can be calculated as the number of products with bubbles in the seam area per hundred products, or as the proportion of all bubbles located in the seam area. An increase in frequency often indicates a potential problem in the preceding process. A threshold is a predetermined numerical limit used to determine whether the bubble occurrence frequency in the seam area has exceeded the normal fluctuation range. This threshold can be set based on historical statistical data from normal production, for example, twice the standard deviation of the normal mean, or an acceptable upper limit can be directly set based on quality standards. When the actual frequency exceeds this threshold, it indicates an abnormal trend that requires attention. The preceding visual positioning station refers to the process step located before the defoaming station, responsible for positioning the gray board and face paper during lamination. This station uses a vision system to identify the position of the gray board or face paper and controls the mechanical device for precise alignment. In this step, the analysis results from the defoaming station will have a reverse effect on this station, forming cross-station collaborative control. The positioning reference correction parameter refers to the numerical command used to adjust the working reference of the preceding visual positioning station. This parameter can be an offset compensation amount for the positioning coordinates, such as shifting the lamination reference position by 0.1 mm in the X direction; it can also be an adjustment coefficient for the positioning algorithm, such as changing the sensitivity of edge detection. The value of the correction parameter can be calculated backward from the positional distribution of air bubbles in the splicing seam area.
[0077] This embodiment constructs a cross-process collaborative mechanism that provides feedback from the downstream defoaming station to the upstream positioning station. First, by statistically analyzing the bubble state matrix of multiple consecutive finished packaging boxes, the instantaneous information of a single product is transformed into trend data reflecting process stability, eliminating the interference of occasional factors and making the judgment more reliable. The generated trend chart provides an intuitive visualization tool, facilitating the observation of the changing patterns of bubble distribution. When the analysis reveals an abnormally high frequency of bubbles in the seam area, this phenomenon likely indicates a drift or deviation in the preceding positioning reference. At this time, the system proactively sends positioning reference correction parameters to the preceding visual positioning station, directly intervening in the operation of the preceding process and adjusting the bonding position of the gray board and the face paper from the source to reduce bubbles in the seam area caused by positioning deviations. This reverse adjustment mechanism allows the defoaming station to no longer passively receive problems transmitted from the preceding process, but to proactively feed back quality information, achieving collaborative optimization of the overall production line process. Through such linkage, preventative adjustments can be made before problems occur in batches, helping to reduce bubble defects in subsequent products.
[0078] Taking cigarette box packaging as an example, the system statistically analyzed the bubble state matrix of the 200 most recently produced cigarette boxes. The generated bubble distribution trend chart showed that in the past 50 cigarette boxes, the frequency of bubbles in the side wall seam area increased significantly, from 5% to 25%, exceeding the set threshold of 15%. Based on the specific location distribution of these bubbles, the system determined that a slight shift in the reference at the preceding visual positioning station might have caused a slight change in the seam position when the gray board and the face paper were bonded. Therefore, the system sent positioning reference correction parameters to the preceding visual positioning station, suggesting that the positioning coordinates of the gray board be adjusted 0.15 mm to the left in the horizontal direction. After receiving the parameters, the preceding station implemented the adjustment in subsequent production, and the frequency of bubbles in the seam area monitored by the debubbling station gradually returned to normal levels.
[0079] In some embodiments of this application, the method further includes: calculating an estimated value of the air permeability coefficient of the current batch of face paper based on the area change trend of suspected second-type bubble areas of multiple consecutive finished packaging boxes; comparing the estimated value of the air permeability coefficient with the standard air permeability coefficient range; and generating an abnormal prompt message for the face paper batch if the value exceeds the range.
[0080] In this embodiment, the area change trend refers to the overall direction or pattern of change in the area of suspected second-type bubble regions across multiple consecutive finished packaging boxes. This trend can be gradually increasing, gradually decreasing, or basically stable. Trend identification typically requires fitting or moving average processing of data points from multiple products to eliminate random fluctuations in individual products. For example, the average area of second-type bubbles in the most recent 100 products can be calculated and compared with the average area of the previous batch to determine whether it is increasing or decreasing. The air permeability coefficient estimate is a value used to characterize the air permeability performance of the face paper, derived indirectly. The air permeability of the face paper directly affects the ease with which air escapes during the lamination process: face paper with better air permeability allows residual air to escape easily, resulting in smaller bubble areas; face paper with poor air permeability makes it difficult for air to escape, potentially leading to larger bubble areas. The air permeability coefficient estimate can be calculated based on the area change trend of second-type bubbles and a known air permeability-bubble area relationship model. This relationship model can be established using prior experimental data, such as establishing a correspondence between the average bubble areas of face papers with different air permeability under the same process conditions. The standard air permeability coefficient range refers to the normal fluctuation range of the air permeability coefficient of face paper for the current product specification. This range is usually determined by the technical specifications provided by the face paper supplier or the company's own incoming material inspection standards. The range has an upper and lower limit; air permeability falling within the range is considered acceptable, while exceeding the range indicates a potential problem with the face paper. Understandably, different product specifications may have different air permeability requirements, therefore the standard range needs to be set for each specific product. A face paper batch anomaly alert is a warning notification used to inform operators or quality management personnel that the currently used face paper batch may have a quality problem, specifically manifested as an air permeability coefficient exceeding the normal range. The alert may include the batch number, the abnormal indicator (air permeability), a comparison of the measured value with the standard range, and recommended remedial measures, such as suspending the use of this batch of face paper for sampling and re-inspection. This alert helps to identify and isolate problematic raw materials early in the production process, preventing large-scale quality problems.
[0081] This embodiment achieves online indirect monitoring of incoming material quality. The area change trend of the second type of suspected bubble area is direct observation data, which comes from information accumulated in daily inspections at the defoaming station. By analyzing this trend and combining it with the previously established correspondence model between bubble area and air permeability, the estimated air permeability coefficient of the current batch of face paper can be calculated in reverse. This process is equivalent to turning the defoaming station into a hidden material inspection station, using production process data to evaluate face paper quality online without adding additional inspection equipment and procedures. The calculated air permeability coefficient is compared with the standard range; if it exceeds the range, a batch anomaly alert is generated. This mechanism allows material problems that might only be detected in the incoming material inspection stage to be detected in a timely manner during production. When the alert appears, production personnel can proactively review or adjust process parameters for the batch of face paper, thereby reducing the instability of defoaming quality caused by material fluctuations to a certain extent.
[0082] Taking cigarette pack packaging as an example, the system statistically analyzed the area of suspected Category II air bubbles in 100 recently produced cigarette packs. It was found that the average area of these bubbles had gradually increased from 2.5 square millimeters in previous batches to 4.0 square millimeters currently, showing a clear upward trend. Based on the previously established air permeability-bubble area relationship model, the estimated air permeability coefficient of the current batch's face paper was approximately 0.8 cubic centimeters / square centimeter·second, while the standard air permeability coefficient range for this specification of cigarette pack face paper is 1.2 to 1.8. The actual value is significantly lower than the lower limit of the standard range, indicating that the air permeability of this batch of face paper is poor. The system then generated an abnormal batch alert, displaying that the face paper of batch number 20251231 had abnormal air permeability, and recommended suspending use and conducting a re-inspection.
[0083] In some embodiments of this application, the method further includes: when the number of suspected bubble areas detected exceeds a preset number threshold and the proportion of suspected first-type bubble areas exceeds a preset proportion threshold, suspending the operation of the defoaming station and sending a stop detection signal to the preceding frame forming station to trigger an inspection of the wear condition of the frame forming mold.
[0084] In this embodiment, the preset quantity threshold is a pre-defined numerical limit used to determine whether the total number of suspected bubble areas detected on a single finished product packaging box is abnormally high. This threshold can be set according to product specifications and quality standards; for example, for cigarette boxes, it can be set to 5 or 8. When the number of detected bubbles exceeds this threshold, it indicates that the product may have a serious quality problem, or that there is a systemic fluctuation in the production line process. The proportion of suspected first-type bubble areas refers to the ratio of the number of suspected first-type bubble areas (located in the gray board splicing seam area) on the current finished product packaging box to the total number of suspected bubble areas detected on the product. This ratio can be expressed as a percentage, such as 60% or 80%. The level of the proportion reflects whether the bubble problem is mainly concentrated in the splicing seam area, which is indicative of the source of the fault. The preset proportion threshold is a pre-defined numerical limit used to determine whether the proportion of suspected first-type bubble areas is abnormally high. For example, it can be set to 70%. When the actual proportion exceeds 70%, it indicates that the bubble problem is highly concentrated in the splicing seam area. This threshold is usually used in conjunction with the preset quantity threshold to form a dual judgment condition. Suspending the defoaming station means the control system issues a command to temporarily stop the operation of the defoaming station. This includes stopping product conveying, pressure head movement, and the operation of related auxiliary mechanisms. The purpose of the suspension is to prevent the continued production of more defective products and to allow time for troubleshooting and handling. The suspension can be automatically triggered or confirmed by the operator after an alarm is issued. The preceding frame forming station is the process step located before the defoaming station, responsible for folding the face paper in and forming the shape. This station uses a mold to form the product, and the condition of the mold directly affects the bonding quality of the folded edge. In this step, the defoaming station will send a signal to this station after detecting a problem. The stop detection signal is a cross-station instruction or notification sent to the preceding frame forming station, requiring that station to stop operation and conduct an inspection. This signal may include the triggering reason (e.g., the defoaming station detects abnormal bubbles in the seam) and suggested inspection items (e.g., focusing on checking the wear of the mold). The station receiving the signal can automatically stop or prompt the operator to intervene. A frame forming die is a mechanical mold used in the preceding frame forming station to fold and press the face paper into shape. The working surface of the die is in direct contact with the product, and its shape accuracy and surface finish directly affect the forming quality of the folded edge. After prolonged use, the die may experience wear, deformation, or surface damage. Wear refers to changes in the surface condition of the frame forming die caused by mechanical friction, pressure, and other factors during use. Wear may manifest as localized indentations, rounded edges, and increased surface roughness. These changes reduce the fit of the folded edge, making the seam area more prone to air bubbles. Wear can be inspected visually by the operator or measured using specialized measuring tools or instruments.
[0085] This embodiment establishes an emergency shutdown and fault tracing mechanism based on dual judgment conditions. If the total number of suspected bubble areas exceeds a preset threshold, it indicates a severe, batch-wide bubble problem in the current product, rather than an occasional isolated defect. Furthermore, it requires that the proportion of the first type of suspected bubble area also exceeds a preset percentage threshold, focusing the problem on the splicing seam area. When both conditions are met simultaneously, it means the problem is not only severe but also has a clear regional characteristic: a large number of bubbles are concentrated near the gray board splicing seam. This combination strongly suggests the fault source may be located in the preceding frame forming station, as the quality of the splicing seam area is mainly affected by the frame forming effect. Based on this judgment, the system proactively suspends the defoaming station operation and sends a shutdown detection signal to the preceding frame forming station, directly suggesting an inspection of the mold wear condition. This mechanism achieves rapid correlation between subsequent inspection results and the cause of the preceding fault, precisely narrowing the problem location from the vague "production line anomaly" to "possible wear of the frame forming mold," providing maintenance personnel with a clear inspection direction, helping to shorten downtime for troubleshooting, and reducing the large amount of scrap generated due to continuous operation with a fault.
[0086] Taking cigarette box packaging as an example, the debubbling station detected 12 suspected bubble areas on the current cigarette box, far exceeding the preset threshold of 5. Further analysis revealed that 10 of these bubbles were located in the seam area of the side wall, with the first type of bubble accounting for 83%, also exceeding the preset threshold of 70%. The system determined that this might be a problem with the mold in the preceding frame forming station. Therefore, the debubbling station automatically paused operation and sent a stop detection signal to the preceding frame forming station, indicating "abnormal bubbles in the seam, it is recommended to check the wear condition of the frame mold." After receiving the prompt, the operator in the preceding station stopped the machine for inspection and found that there were indeed obvious wear and indentations at the four corners of the mold, and then replaced the mold. Subsequent production resumed normally, and the number of bubbles in the seam area decreased significantly.
[0087] Please refer to Figure 2A second aspect of this application provides an automated defoaming collaborative control system for finished products based on machine vision. The system includes: an image acquisition module 21, located at the defoaming station, for acquiring surface images of the finished packaging box from multiple perspectives; a preceding data interface module 22, for obtaining the gray board edge position deviation from the preceding visual positioning station and the folded edge fit data from the preceding frame forming station; an image processing module 23, for detecting suspected bubble areas in the surface images and extracting morphological features and grayscale distribution features; a spatial alignment module 24, for aligning the position distribution of suspected bubble areas with the gray board edge position deviation and the folded edge fit data in a spatial coordinate system, and determining the category attributes of the first type of suspected bubble area and the second type of suspected bubble area; a state matrix generation module 25, for generating a bubble state matrix based on morphological features, grayscale distribution features, and category attributes; a parameter matching module 26, with a built-in preset defoaming process parameter library, for matching corresponding pressure adjustment values and pressure application time adjustment values according to the bubble state matrix; and an execution drive module 27, for controlling the action of the actuator at the defoaming station according to the pressure adjustment values and pressure application time adjustment values. This system is used to implement the aforementioned machine vision-based automated defoaming collaborative control method for finished products.
[0088] In the above embodiments, through the collaborative work of each module, a closed-loop control of the entire process from image acquisition, pre-process data acquisition, bubble classification and recognition to parameter matching and execution drive is realized. The system structure is clear and the functions of each module are closely related, which helps to improve the automation and intelligence level of the defoaming process in the packaging box production line.
[0089] See Figure 3 , Figure 3 This is a schematic block diagram of an electronic device provided according to an embodiment of this application. Figure 3 The electronic device 300 in this embodiment may include one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The processors 301, input devices 302, output devices 303, and memories 304 communicate with each other via a communication bus 305. The memories 304 store computer programs, including program instructions. The processors 301 execute the program instructions stored in the memories 304. Specifically, the processors 301 are configured to invoke the program instructions to execute the aforementioned machine vision-based automatic defoaming collaborative control method for finished products.
[0090] It should be understood that, in the embodiments of this application, the processor 301 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0091] Input device 302 may include a touchpad, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint orientation information), a microphone, etc., and output device 303 may include a display (LCD, etc.), a speaker, etc.
[0092] The memory 304 may include read-only memory and random access memory, and provides instructions and data to the processor 301. A portion of the memory 304 may also include non-volatile random access memory. For example, the memory 304 may also store device type information.
[0093] In specific implementations, the processor 301, input device 302, and output device 303 described in the embodiments of this application can execute the implementation methods described in any embodiment of the automatic finished product defoaming collaborative control method based on machine vision provided in the embodiments of this application, or they can execute the implementation methods of the electronic devices described in the embodiments of this application, which will not be repeated here.
[0094] In another embodiment of this application, an electronic device is provided. The electronic device stores a computer program, which includes program instructions. When executed by a processor, the program instructions implement all or part of the processes in the machine vision-based automatic defoaming collaborative control method for finished products described above. Alternatively, the computer program can instruct related hardware to complete the process. The computer program can be stored in an electronic device, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. Computer-readable media can include any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0095] The computer-readable storage medium can be an internal storage unit of the electronic device in any of the foregoing embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device. Furthermore, the computer-readable storage medium can include both internal and external storage units of the electronic device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0096] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0097] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the electronic devices and units described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0098] In the several embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces or units, or it may be an electrical, mechanical, or other form of connection.
[0099] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.
[0100] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0101] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A machine vision-based automated finished product defoaming collaborative control method, applied to a packaging box production line, characterized in that, Includes the following steps: S1: Obtain surface images of the finished packaging box from multiple perspectives at the defoaming station; S2: Detect suspected bubble regions on the surface image and extract the morphological features and grayscale distribution features of the suspected bubble regions; S3: Obtain the gray board edge position deviation recorded in the previous vision positioning station and obtain the folded edge fit data recorded in the previous frame forming station; S4: Align the spatial coordinate system with the positional distribution of the suspected bubble areas and the positional deviation of the gray board edge and the fit data of the folded edge to determine the first type of suspected bubble areas located in the gray board splice area and the second type of suspected bubble areas located in the gray board surface area. S5: Generate a bubble state matrix for the current finished product packaging box based on the morphological features, the grayscale distribution features, and the category attributes of the first type of suspected bubble area and the second type of suspected bubble area; S6: Based on the bubble state matrix, match the defoaming head pressure adjustment value and pressure application time adjustment value corresponding to the current bubble state from the preset defoaming process parameter library; S7: Control the actuator of the defoaming station to perform defoaming operation on the current finished product packaging box according to the pressure adjustment value and the pressure application time adjustment value.
2. The automatic finished product defoaming collaborative control method based on machine vision according to claim 1, characterized in that, The step of obtaining the gray board edge position deviation recorded by the preceding visual positioning station further includes: obtaining the gray board edge image collected by the preceding visual positioning station during the gray board and face paper bonding process, extracting the coordinates of multiple edge points of the gray board using a sub-pixel edge detection algorithm, calculating the lateral and longitudinal deviations between the coordinates of each edge point and the corresponding standard template position, and generating a gray board position deviation matrix; wherein, the gray board position deviation matrix is used to identify the pixel region where each gray board edge is located in the spatial coordinate system alignment step.
3. The automatic finished product defoaming collaborative control method based on machine vision according to claim 2, characterized in that, The step of obtaining the folded edge fitting data recorded at the previous frame forming station further includes: obtaining line laser scanning data of the area where the folded edge fits against the gray board sidewall after the frame is formed; reconstructing the fitting contour curve of the folded edge based on the line laser scanning data; calculating the gap area and gap depth between the fitting contour curve and the standard fitting contour; and generating a fitting index; wherein the fitting index is used to characterize the tightness of the gray board splicing seam area.
4. The automatic finished product defoaming collaborative control method based on machine vision according to claim 1, characterized in that, The step of detecting suspected bubble regions in the surface image includes: performing multi-scale wavelet transform on the surface image to extract singular points in the high-frequency subband as candidate bubble points; performing morphological closing operations on the candidate bubble points to connect them and form candidate connected regions; calculating the circularity, eccentricity, and contrast features of each candidate connected region, and marking the candidate connected regions that meet the preset threshold as suspected bubble regions.
5. The automatic finished product defoaming collaborative control method based on machine vision according to claim 3, characterized in that, The steps for determining the first type of suspected bubble area located in the gray board splice area and the second type of suspected bubble area located in the gray board surface area include: mapping the center coordinates of the suspected bubble area to the spatial coordinate system where the gray board position deviation matrix is located; if the center coordinates fall within the tolerance zone formed by the edge point coordinates in the gray board position deviation matrix, it is determined to be the first type of suspected bubble area; otherwise, it is determined to be the second type of suspected bubble area.
6. The automatic finished product defoaming collaborative control method based on machine vision according to claim 5, characterized in that, The steps for generating the bubble state matrix of the current finished product packaging box include: for the first type of suspected bubble area, the morphological features and grayscale distribution features are weighted and corrected according to the fit index of its location; for the second type of suspected bubble area, its original morphological features and grayscale distribution features are retained; the corrected or retained feature parameters are encoded according to the bubble position coordinates to form a multi-dimensional bubble state matrix.
7. The automatic finished product defoaming collaborative control method based on machine vision according to claim 1, characterized in that, The preset defoaming process parameter library stores multiple bubble state matrix templates and corresponding pressure adjustment values and pressure application time adjustment values for each template. The step of matching the defoaming pressure head pressure adjustment value and pressure application time adjustment value corresponding to the current bubble state from the preset defoaming process parameter library according to the bubble state matrix includes: calculating the similarity between the current bubble state matrix and each template, and selecting the pressure adjustment value and pressure application time adjustment value corresponding to the template with the highest similarity as the control parameters for the current defoaming operation.
8. The automatic finished product defoaming collaborative control method based on machine vision according to claim 7, characterized in that, The step of controlling the actuator of the defoaming station to perform defoaming operation according to the pressure adjustment value and the pressure application time adjustment value further includes: spatially interpolating the pressure adjustment value corresponding to each bubble area to generate a pressure distribution control surface acting on the entire surface of the finished product packaging box; applying different output pressures to multiple independently controlled pressure units in the defoaming head according to the pressure distribution control surface, and segmenting the pressure application time.
9. The automatic finished product defoaming collaborative control method based on machine vision according to claim 1, characterized in that, The method further includes: after the defoaming operation is completed, surface images of the finished packaging box from multiple perspectives are collected again to verify the defoaming effect; if the verification result shows that there are residual bubble areas that have not been eliminated, the image features of the residual bubble areas, the corresponding gray board edge position deviation, and the folded edge fit data are combined into anomaly records and stored in the anomaly database; when the cumulative number of anomaly records for the same specification of product reaches a preset number, an update prompt is triggered for the corresponding template parameters in the defoaming process parameter library.
10. A machine vision-based automated defoaming collaborative control system for finished products, used to implement the method according to any one of claims 1 to 9, characterized in that, The system includes: The image acquisition module is located at the defoaming station and is used to acquire surface images of the finished packaging box from multiple perspectives. The preceding data interface module is used to obtain the gray board edge position deviation from the preceding visual positioning station and the folded edge fit data from the preceding frame forming station. The image processing module is used to detect suspected bubble regions in the surface image and extract morphological features and grayscale distribution features. The spatial alignment module is used to align the location distribution of suspected bubble areas with the deviation of the gray board edge position and the fit data of the folded edge in a spatial coordinate system, and to determine the category attributes of the first type of suspected bubble areas and the second type of suspected bubble areas. The state matrix generation module is used to generate a bubble state matrix based on the morphological features, the grayscale distribution features, and the category attributes. The parameter matching module has a built-in preset defoaming process parameter library, which is used to match the corresponding pressure adjustment value and pressure application time adjustment value according to the bubble state matrix. The execution drive module is used to control the actuator of the defoaming station according to the pressure adjustment value and the pressure application time adjustment value.
Citation Information
Patent Citations
Printing paperboard positioning method and system based on visual image segmentation and edge detection
CN120833352A
Film lamination defect detection method and system based on image processing
CN120876486A