An intelligent corrugated box production method and control system

By using the main control system, CCD camera visual recognition system and artificial fish school algorithm in the corrugated carton production system, automated damage detection and image segmentation are realized, solving the problem of insufficient accuracy and flexibility in damage detection and raw material recognition of existing systems, and improving production efficiency and product quality.

CN119396095BActive Publication Date: 2025-05-16GUANGXI JISHENG PAPER CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411496139.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-05-16
Estimated Expiration
2044-10-25

AI Technical Summary

Technical Problem

The existing intelligent corrugated carton production system has insufficient accuracy and flexibility in damage detection and raw material identification, resulting in low production efficiency, unstable quality and serious waste of raw materials.

Method used

The main control system is used to obtain customer order information in real time, automatically adjust production line parameters, and automatically detect damage through the CCD camera visual recognition system. If damage is detected, image segmentation and feature extraction are used using an artificial fish school algorithm with the corruption type weight factor W, and finally the image data is uploaded to the cloud database.

Benefits of technology

It improves the accuracy and efficiency of video processing, enhances the automation of corrugated box damage judgment, reduces manual intervention, and improves production efficiency and product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396095B_ABST
    Figure CN119396095B_ABST
Patent Text Reader

Abstract

The present invention provides an intelligent corrugated paper box production method and control system. The method first obtains the order information of the customer management system (CRM) in real time through the main control system; secondly, the main control system automatically adjusts the production line parameters through the servo motor and the sensor according to the order information to adapt to the production of different cartons; thirdly, the produced corrugated paper boxes are automatically damaged by the CCD camera visual recognition system. If a damaged corrugated paper box is detected, the artificial fish school algorithm with the damage type weight factor W is used for image segmentation; finally, the damaged corrugated paper box image data obtained by image segmentation is uploaded to the cloud database for storage. The present application greatly improves the accuracy and efficiency of video processing by using the artificial fish school algorithm with the damage type weight factor W for image segmentation, and greatly increases the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automated production and processing technology, and specifically to an intelligent corrugated box production method and control system. Background Art

[0002] As one of the most commonly used packaging materials in modern logistics, transportation and storage, corrugated boxes are widely used in various industries due to their advantages such as high strength, light weight and low cost. Especially in the e-commerce, manufacturing and food industries, corrugated boxes are almost indispensable packaging products. Traditional corrugated box production usually relies on semi-automatic or manual operations, involving multiple processes, including raw material supply, corrugated cardboard pressing and forming, carton cutting and gluing, etc. Although this production model is relatively mature, it has obvious problems such as low production efficiency, unstable quality and high dependence on manual labor.

[0003] In traditional corrugated box production, especially when faced with customer orders of different specifications and batch customization, the production line is difficult to adjust flexibly, resulting in long production cycles and low efficiency. At the same time, the production quality of cartons is difficult to fully guarantee, especially the damage on the surface of cartons (such as scratches, dents, cracks, etc.) is difficult to detect and repair in time during the production process, increasing the scrap rate and rework rate. In addition, the feeding scheduling and raw material identification of cartons in the production process mostly rely on manual operations, which are prone to errors and waste. These problems are becoming more and more prominent as customer needs become increasingly diversified and order delivery requirements become increasingly high.

[0004] In response to the above problems, in recent years, many companies have begun to introduce automation and intelligent technologies into the production process of corrugated boxes. By introducing automated control systems, visual recognition technology, intelligent scheduling algorithms, etc., attempts are made to improve production efficiency, reduce manual intervention, and ensure product quality. However, the existing intelligent corrugated box production system still has some limitations in technical implementation. For example, most of the existing visual recognition systems rely on simple image processing algorithms and cannot accurately identify complex damage features (such as scratches, dents, and fragmentation). When facing different types of damage, the detection accuracy of the system still needs to be improved. At the same time, the degree of intelligence of the feeding system is limited, and the identification and transportation of raw materials mostly rely on fixed feeding processes, lack of flexibility, and serious waste of raw materials. In addition, the analysis of customer order information often relies on manual operation or simple system docking, lacks automated and intelligent processing processes, and cannot effectively respond to diverse order requirements, making it difficult for the production line to respond quickly to order changes.

[0005] In this context, intelligent corrugated box production methods and control systems have become an important direction for the industry's technological upgrade. By introducing advanced visual recognition systems, artificial intelligence algorithms and automated control technologies, the level of intelligent production can be effectively improved, significantly improving the problems of low efficiency, high dependence on manual labor, and unstable quality in traditional production methods.

[0006] In addition, the existing corrugated box production technology faces problems such as insufficient automation, low production efficiency, and unstable quality. In order to improve the production efficiency of corrugated boxes, ensure product quality, reduce manual dependence, and respond to diverse customer order requirements, a new solution is urgently needed for the refined automated real-time targeted video image processing method to improve processing efficiency and accuracy, thereby improving user satisfaction. Summary of the invention

[0007] In view of the above problems mentioned in the prior art, the present invention provides an intelligent corrugated cardboard production method and control system. The method first obtains the order information of the customer management system (CRM) in real time through the main control system; secondly, the main control system automatically adjusts the production line parameters through the servo motor and the sensor according to the order information to adapt to the production of different cartons; thirdly, the produced corrugated cardboard boxes are automatically damaged by the CCD camera visual recognition system. If a damaged corrugated cardboard box is detected, the artificial fish school algorithm with the damage type weight factor W is used for image segmentation; finally, the damaged corrugated cardboard box image data obtained by image segmentation is uploaded to the cloud database for storage. This application greatly improves the accuracy and efficiency of video processing and greatly increases the user experience by using the artificial fish school algorithm with the damage type weight factor W for image segmentation.

[0008] The present application provides an intelligent corrugated box production method, comprising the steps of:

[0009] S1: The main control system obtains order information from the customer management system (CRM) in real time, automatically receives and analyzes customer order information, including the size, thickness, material, and quantity of the carton;

[0010] S2: The main control system automatically adjusts the production line parameters through servo motors and sensors according to the order information to adapt to the production of different cartons; the production line parameters include pressing force, cutting size, temperature, and speed;

[0011] S3: Automatically detect damage on the produced corrugated boxes using a CCD camera visual recognition system. If a damaged corrugated box is detected, an artificial fish swarm algorithm with a damage type weight factor W is used for image segmentation.

[0012] S31: Initialize the artificial fish school, the local foraging range of the artificial fish school is a rectangular window with four sides of 2k pixels, where k represents the number of pixels of 1 / 2 side length of the rectangular window;

[0013] S32: The artificial fish searches for the image segmentation edge position of the damaged corrugated box by moving the rectangular window in the global range, and the moving step is Step. If S(x, y) ≥ T when the center position of the rectangular window moves to the position (x, y), T is the set threshold, then the rectangular window contains the image segmentation edge, and then searches for the optimal segmentation position in the current local window according to the artificial fish foraging behavior, otherwise the rectangular window moves to the next position; the process of searching for the optimal segmentation position is as follows: randomly generate a position N times (x new ,y new )=(x+random(i),y+random(j)); random() is a random generation function; select E(x new ,y new ) is the optimal position (x′, y′) within the rectangular window, (x′, y′) = (x new ,y new ), x′ is the horizontal coordinate of the optimal position within the rectangular window range, y′ is the vertical coordinate of the optimal position within the rectangular window range, and the rectangular window moves to the next position until the global range is traversed;

[0014] Among them, the fitness calculation S(x,y) of the artificial fish swarm algorithm is expressed as follows:

[0015]

[0016] Where W represents the damage type weight factor, and the value range of i and j is {-k, k}. Edge detection uses the artificial fish swarm algorithm with the damage type weight factor W to find edge changes in the image. The edge strength E is expressed as follows:

[0017]

[0018] Among them, G x and G y are the gradients of the image in the x and y directions respectively;

[0019] S33: region marking, connecting and segmenting all the optimal positions (x′, y′) during the moving process of the rectangular window, marking the segmented regions, and extracting shape features of the segmented regions;

[0020] S34: segmenting the corrugated box loss image area by using an artificial fish swarm algorithm with a damage type weight factor W added;

[0021] S4: Upload the damaged corrugated box image data obtained by image segmentation to the cloud database for storage.

[0022] Preferably, searching for the optimal segmentation position in the current local window according to the artificial fish foraging behavior further comprises: calculating the center position (x av ,y av ), if E(x av ,y av )>E(x′,y′), then update position (x′,y′)=(x av ,y av ).

[0023] Preferably, the shape features of the segmented area are extracted, and the shape features include area A and perimeter P;

[0024]

[0025] Preferably, W represents a damage type weight factor, including scratches, dents and cracks, W = [w1, w2, w3] = [0.3, 0.5, 0.2].

[0026] Preferably, the automatic damage detection of produced corrugated paper boxes using a CCD camera visual recognition system comprises:

[0027] S1: grayscale the collected CCD camera image;

[0028] S2: The Canny operator edge detection algorithm is used to identify scratches, dents and cracks in the image. When scratches, dents or cracks exist in the image, it is judged that a damaged corrugated box is detected.

[0029] The present application also provides an intelligent corrugated box production control system, comprising:

[0030] Order information acquisition module: The main control system obtains order information from the customer management system (CRM) in real time, automatically receives and analyzes customer order information, including the size, thickness, material, and quantity of the carton;

[0031] Production line parameter adjustment module: The main control system automatically adjusts the production line parameters through servo motors and sensors according to order information to adapt to the production of different cartons; production line parameters include pressing force, cutting size, temperature, and speed;

[0032] Automatic damage detection module: The CCD camera visual recognition system is used to automatically detect damage to the produced corrugated boxes. If a damaged corrugated box is detected, the artificial fish swarm algorithm with the damage type weight factor W is used for image segmentation;

[0033] Initialize the artificial fish school module. The local foraging range of the artificial fish school is a rectangular window with four sides of 2k pixels, where k represents the number of pixels with half the side length of the rectangular window.

[0034] Rectangular window movement judgment module, the artificial fish forages for the damaged corrugated box image segmentation edge position in the global range by moving the rectangular window, and the moving step is Step. If the center position of the rectangular window moves to the position (x, y) S(x, y) ≥ T, T is the set threshold, then the rectangular window contains the image segmentation edge, and then the optimal segmentation position is searched in the current local window according to the foraging behavior of the artificial fish, otherwise the rectangular window moves to the next position; the process of searching for the optimal segmentation position is as follows: randomly generate a position N times (x new ,y new )=(x+random(i),y+random(j)); random() is a random generation function; select E(x new ,y new ) is the optimal position (x′, y′) within the rectangular window, (x′, y′) = (x new ,y new ), the rectangular window moves to the next position until the global scope is traversed;

[0035] Among them, the fitness calculation S(x,y) of the artificial fish swarm algorithm is expressed as follows:

[0036]

[0037] Where W represents the damage type weight factor, and the value range of i and j is {-k, k}. Edge detection uses the artificial fish swarm algorithm with the damage type weight factor W to find edge changes in the image. The edge strength E is expressed as follows:

[0038]

[0039] Among them, G x and G y are the gradients of the image in the x and y directions respectively;

[0040] The region marking module connects and segments all the optimal positions (x′, y′) of the rectangular window during its movement, marks the segmented regions, and extracts the shape features of the segmented regions;

[0041] Segmentation module: segment the damaged image area of ​​the corrugated box by adding the artificial fish swarm algorithm with the damage type weight factor W;

[0042] Data saving module: upload the damaged corrugated box image data obtained by image segmentation to the cloud database for storage.

[0043] Preferably, searching for the optimal segmentation position in the current local window according to the artificial fish foraging behavior further comprises: calculating the center position (x av ,y av ), if E(x av ,y av )>E(x′,y′), then update position (x′,y′)=(x av ,y av ).

[0044] Preferably, the shape features of the segmented area are extracted, and the shape features include area A and perimeter P;

[0045]

[0046] Preferably, W represents a damage type weight factor, W=[w1, w2, w3]=[0.3, 0.5, 0.2], w1 represents a scratch type, w2 represents a dent type, and w3 represents a crack type.

[0047] Preferably, the automatic damage detection of the produced corrugated paper boxes using a CCD camera visual recognition system comprises:

[0048] S1: grayscale the collected CCD camera image;

[0049] S2: The Canny operator edge detection algorithm is used to identify scratches, dents and cracks in the image. When scratches, dents or cracks exist in the image, it is judged that a damaged corrugated box is detected.

[0050] The present invention provides an intelligent corrugated box production method and control system, which can achieve the following beneficial technical effects:

[0051] 1. This application uses an artificial fish swarm with a damage type weight factor W to segment and extract features from the image. The fitness calculation S(x, y) of the artificial fish swarm algorithm is expressed as follows:

[0052]

[0053] Among them, W represents the damage type weight factor, and the value range of i and j is {-k, k}; edge detection searches for edge changes in the image by adding the artificial fish swarm algorithm with the damage type weight factor W; when the artificial fish finds a new position, the local search function is used to further optimize the position. By setting the local search and the damage type weight factor, including scratches, dents and fragments, W = [w1, w2, w3] = [0.3, 0.5, 0.2], the image extraction can extract the damaged parts according to the characteristics of the damage type, which greatly enhances the accurate extraction of the damaged parts and improves the automation of corrugated box damage judgment.

[0054] 2. The present invention uses artificial fish to forage and search for the edge position of the corrugated box loss image segmentation in a global range by moving the rectangular window. The moving step is Step. If the center position of the image rectangular window moves to the position (x, y) S(x, y) ≥ T, T is the set threshold, then the rectangular window contains the image segmentation edge, and then the optimal segmentation position is searched in the current local window according to the foraging behavior of the artificial fish, otherwise the rectangular window moves to the next position; the process of searching for the optimal segmentation position is as follows: randomly generate a position N times (x new ,y new )=(x+random(i),y+random(j)); random() is a random generation function; select E(x new ,y new ) is the optimal position (x′, y′) within the rectangular window, (x′, y′) = (x new ,y new ), the rectangular window moves to the next position until the global range is traversed. By first selecting the image with segmented edges and then finding the optimal position through artificial and foraging behavior, the judgment accuracy is greatly improved, and the extraction of the damaged position of the corrugated box is realized by combining multiple factors.

[0055] 3. The present invention provides an intelligent corrugated paper box production method and control system. The method first obtains the order information of the customer management system (CRM) in real time through the main control system; secondly, the main control system automatically adjusts the production line parameters through the servo motor and the sensor according to the order information to adapt to the production of different cartons; thirdly, the produced corrugated paper boxes are automatically damaged by the CCD camera visual recognition system. If a damaged corrugated paper box is detected, the artificial fish school algorithm with the damage type weight factor W is used for image segmentation; finally, the damaged corrugated paper box image data obtained by image segmentation is uploaded to the cloud database for storage. This application greatly improves the accuracy and efficiency of video processing and greatly increases the user experience by using the artificial fish school algorithm with the damage type weight factor W for image segmentation. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0057] Figure 1 It is a schematic diagram of the steps of an intelligent corrugated paper box production method of the present invention;

[0058] Figure 2 It is a schematic diagram of an intelligent corrugated paper box production control system of the present invention. DETAILED DESCRIPTION

[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0060] Embodiment 1:

[0061] In view of the above problems mentioned in the prior art, in order to solve the above technical problems, as shown in the attached Figure 1 As shown: This application provides an intelligent corrugated box production method, comprising the steps of:

[0062] S1: The main control system obtains order information from the customer management system (CRM) in real time, automatically receives and parses customer order information, including the size, thickness, material, and quantity of the carton; the system is connected to the customer management system (CRM) or enterprise resource planning system (ERP) through the main control system (i.e., factory management system). The CRM system is used to store the order information placed by customers, including basic order data (such as order number, order time, delivery date, etc.) and specific requirements related to corrugated carton production (such as carton size, thickness, material, and order quantity). The main control system automatically receives this information from the CRM system, and parses, verifies, and formats it to generate a production plan and subsequent automated production process. The main control system and the CRM system realize information exchange through the API interface. The order data is transmitted to the main control system through the API interface in a structured JSON format. Automatic receiving process: When a customer creates a new order in the CRM system, the system automatically generates an order number and stores the order information in the CRM database. The main control system periodically calls the CRM API interface to query whether a new order has been generated. If there is a new order, the system automatically obtains the order information. The order data is transferred from the CRM system to the main control system in JSON format.

[0063] After receiving the order information, the main control system begins to parse the key fields of the order for scheduling and production. The system first extracts the basic information and product information in the order. The parsed fields include: Order number: used to uniquely identify the order. Customer name: convenient for subsequent customer interaction and after-sales service. Order date: record the creation time of the order. Delivery date: determine the production and delivery period of the order. Product type: confirm the type of product, whether it is a corrugated box. Size: includes the length, width and height of the box, in millimeters. Thickness: the thickness of the corrugated box, in millimeters. Material: the type of corrugated cardboard, such as double corrugated or single corrugated. Quantity: the number of corrugated boxes ordered by the customer. The system formats the extracted fields to ensure the uniformity and operability of the data. For example: Size field: ensure that the units of length, width and height are all millimeters (mm). If the units are not uniform, the system will automatically convert them. Material field: confirm that the material field conforms to the name in the system's predefined standard material library. If not, the system will prompt an exception.

[0064] S2: The main control system automatically adjusts the production line parameters through servo motors and sensors according to the order information to adapt to the production of different cartons; the production line parameters include pressing force, cutting size, temperature, and speed; the main control system extracts the key parameters of the corrugated box (such as size, material, thickness, and quantity) from the customer order information, and automatically sets the working parameters of the production line based on this information. The servo motor precisely controls the movement and working status of the production equipment, while the sensor monitors the operating status of the equipment in real time to ensure that the various parameters in the production process are consistent with the set values. The following are the main parameters adjusted by the system during the production process: Pressing force: The pressure applied by the corrugated board during the forming and bonding process. Cutting size: The specific size of the cardboard cut, including length, width, and height. Temperature: The processing temperature of hot melt adhesive or corrugated paper during the pressing and bonding process. Speed: The running speed of the production line, including the conveying speed and pressing speed of the cardboard. The main control system obtains the following information from the customer order: Dimension information: The length, width, and height of the carton. Material information: The material type (such as single corrugated, double corrugated) and thickness of the corrugated paper. Order quantity: The number of cartons to be produced. After analysis, the main control system extracts the following key parameters: carton size: 500×300×400mm; corrugated paper thickness: 5mm; material type: double corrugated paper.

[0065] According to the dimensions in the order (length 500mm, width 300mm, height 400mm), the main control system controls the servo motor to accurately position the cutting knife of the cutting machine. Servo motor controls the position of the cutting knife: After receiving the command from the main control system, the servo motor moves the cutting knife to the specified position to ensure that the cutting machine cuts according to the dimensions of 500×300mm. Sensor feedback: The position sensor monitors the position of the cutting knife in real time to ensure that the cutting accuracy is within the error range of ±0.5mm. If a position deviation is detected, the system will issue an adjustment command to reposition the cutting knife.

[0066] During the forming and gluing process of corrugated boxes, appropriate pressing force needs to be applied to ensure that the corrugated board can be firmly formed without damage. Servo motor controls the pressing force: According to the thickness (5mm) and material (double corrugated paper) of the corrugated paper, the main control system sets the appropriate pressing force according to the preset pressure model. For example, for double corrugated paper with a thickness of 5mm, the system sets the pressing force to 1500N (Newton). Real-time monitoring by pressure sensor: The pressure sensor detects the actual pressing force and feeds the data back to the main control system. If the actual pressing force is detected to be lower or higher than the set value, the system will automatically adjust the pressure of the pressing equipment through the servo motor.

[0067] In the lamination and bonding process of corrugated board, the heating of glue and the processing temperature of corrugated board are crucial. Different materials and thicknesses of board require different processing temperatures. Servo motor controls heating element: According to the material and thickness of the corrugated board, the main control system controls the temperature of the heating element. For example, a 5mm thick double corrugated board may require a processing temperature of 180℃. The servo motor controls the power output of the heating element to ensure that the heating element remains within the set temperature range. Real-time monitoring by temperature sensor: The temperature sensor detects the actual heating temperature and feeds back to the main control system. If temperature fluctuations are detected, the system will immediately adjust the power of the heating element to ensure stable temperature. The adjustment of production speed directly affects the production efficiency of the order, especially for large-volume orders, reasonable speed control is particularly important. Servo motor controls the conveyor belt speed: According to the requirements of the order quantity and production cycle, the main control system adjusts the speed of the conveyor belt through the servo motor. For example, if the order quantity is 1,000 pieces, the system calculates the optimal production speed to be 50 cartons per minute. The servo motor adjusts the running speed of the conveyor belt to ensure that the production line remains efficient. Speed ​​sensor feedback: The speed sensor monitors the speed of the conveyor belt in real time to ensure that it is consistent with the set value. If the speed deviation exceeds the set threshold, the system will automatically issue an adjustment command to ensure a smooth production rhythm.

[0068] S3: The CCD camera visual recognition system is used to automatically detect damage to the produced corrugated boxes. If a damaged corrugated box is detected, the artificial fish swarm algorithm with the damage type weight factor W is used for image segmentation. After the corrugated box is produced, the system uses the CCD camera installed on the production line to shoot each box and collect its surface image. The CCD camera has high resolution and the ability to accurately capture details, and can clearly record various subtle damages on the surface of the box.

[0069] In some embodiments, after the image is acquired, the system will pre-process the image, mainly including the following steps: Grayscale processing: converting the original color image into a grayscale image, simplifying the color information in the image, and highlighting the brightness or texture changes in the damaged area. Noise removal: eliminating noise in the image through filtering technology to ensure that subsequent processing is not affected by impurities. Contrast enhancement: enhancing the details in the image, especially the areas that may contain damage, to facilitate subsequent detection.

[0070] The system uses visual recognition algorithms to comprehensively scan the surface of the corrugated box to look for possible damage. During this process, the system will focus on identifying several typical types of damage, such as: Scratches: thin marks on the surface of the box, usually due to the impact of sharp objects during transportation or production. Depression: local depression of the surface, usually caused by external pressure, resulting in structural damage to the corrugated board. Cracks: cracks on the surface of the box, which may penetrate the cardboard and affect the strength and integrity of the box. Through image processing algorithms (such as edge detection and texture analysis), the system is able to detect and classify these types of damage.

[0071] After detecting the surface damage of the carton, the system will automatically segment the damaged area. The process mainly includes the following steps: The system assigns a corresponding weight factor W to each type of damage (such as scratches, dents or cracks) according to the type of damage detected. This weight factor indicates the degree of influence of different types of damage on the overall quality of the carton. For example, the weight factor of a crack may be larger than that of a scratch because the crack has a greater impact on the structural strength.

[0072] The system uses an image segmentation method based on an artificial fish school algorithm to determine the boundaries of the damaged area. The algorithm imitates the foraging behavior of fish in the water and can quickly search for the optimal segmentation area in the image. After introducing the weight factor W, the algorithm will prioritize damaged areas with larger weights according to the type of damage to make the segmentation more accurate. Once the segmentation is completed, the system will further extract features from the segmented damaged areas and classify the damage according to preset standards: Minor damage: such as shallow scratches, usually does not affect the overall structure of the carton, and the system will record this information for subsequent quality tracking. Moderate damage: such as more obvious dents or local damage, rework may be required. Severe damage: such as cracks or large areas of damage, the system will automatically mark the carton as an unqualified product and trigger corresponding production line processing measures (such as scrap disposal or rework).

[0073] S31: Initialize the artificial fish school, the local foraging range of the artificial fish school is a rectangular window with four sides of 2k pixels, where k represents the number of pixels of 1 / 2 side length of the rectangular window;

[0074] In some embodiments, before damage detection begins, the system first initializes a school of artificial fish. Each fish in the artificial fish school represents a possible segmentation position or area. The initial artificial fish school is usually randomly distributed on the corrugated box image, as follows: the system randomly generates several initial positions in the image, which cover the entire surface of the corrugated box. Each artificial fish is assigned an initial position as the starting point for its search. During initialization, the system gives each artificial fish a certain damage information perception ability based on the pre-processed image (which has been grayed, enhanced and noise-removed). This means that each artificial fish can sense whether there are signs of damage around its location.

[0075] Each artificial fish searches for the optimal segmentation boundary near its current position. In order to limit the scope of the search area, the system defines a "local foraging range", that is, the area where the artificial fish can move and search in the image. The local foraging range of the artificial fish school is defined as a "rectangular window" with a side length of "2k pixels". Among them, k represents the number of 1 / 2 side length pixels that the artificial fish can explore. Therefore, the actual size of the rectangular window is 2k×2k pixels. For example, if k is 50, the local foraging range of the artificial fish is a square area with a side length of 100 pixels. Each artificial fish moves within the rectangular window to search for the optimal segmentation position. They will evaluate the characteristics of the damaged area (such as brightness changes, edge clarity, etc.) within this range, and determine whether to continue searching in the current area or move to a new position based on the preset strategy.

[0076] In the image segmentation process, the role of the rectangular window is to limit the search range of the artificial fish, so that it can focus on the local area for precise search, rather than blindly moving in the entire image. The size of the rectangular window can be dynamically adjusted according to different image resolutions or damage types: Larger damage area: When the system detects that the damage area is large, the size of the rectangular window (i.e., the k value) can be increased, allowing the artificial fish to search in a larger range, thereby quickly locating the edge of the large area of ​​damage. Smaller damage area: If the damage area is small, the size of the rectangular window can be reduced to ensure that the artificial fish can more accurately segment tiny scratches or dents.

[0077] The foraging behavior of each artificial fish in the rectangular window can be understood as the search behavior of the image edge. Specifically, after the initialization position, the artificial fish moves within the range of the rectangular window. It will judge whether the current position may be part of the damaged area based on the damage features in the image (such as edges, brightness changes, etc.). If the possibility of damage is perceived to be high, the artificial fish will further conduct a detailed search in the current area. After each movement, the artificial fish will evaluate the degree of damage in the current area. If obvious signs of damage are detected, the artificial fish will stop moving and mark the current position as a potential damage boundary position. If the damage features are not obvious, the artificial fish will move to the next area to continue searching. Through the above-mentioned local foraging behavior, the artificial fish can gradually determine the preliminary boundaries of the damaged area. This step-by-step search method ensures the flexibility and accuracy of the algorithm. The range defined by the rectangular window ensures that the artificial fish can maintain local and efficient search every time it moves, rather than randomly roaming in the global range.

[0078] This embodiment sets the local foraging range of the artificial fish school so that the system can quickly locate the damaged area on the surface of the corrugated box, and adapt to damage of different types and sizes by dynamically adjusting the size of the rectangular window. The specific implementation effects are as follows: The local search range of the rectangular window reduces unnecessary global searches and greatly improves the efficiency of image segmentation. By limiting the local range, the artificial fish can more accurately identify the edges of the damaged area, especially complex edge shapes (such as cracks or irregular scratches). According to different image resolutions and damage types, the size of the rectangular window can be dynamically adjusted to ensure the adaptability and flexibility of the algorithm.

[0079] S32: The artificial fish searches for the image segmentation edge position of the damaged corrugated box by moving the rectangular window in the global range, and the moving step is Step. If S(x, y) ≥ T when the center position of the rectangular window moves to the position (x, y), T is the set threshold, then the rectangular window contains the image segmentation edge, and then searches for the optimal segmentation position in the current local window according to the artificial fish foraging behavior, otherwise the rectangular window moves to the next position; the process of searching for the optimal segmentation position is as follows: randomly generate a position N times (x new ,y new )=(x+random(i),y+random(j)); random() is a random generation function; select E(x new ,y new ) is the optimal position (x′, y′) within the rectangular window, (x′, y′) = (x new ,y new ), x′ is the horizontal coordinate of the optimal position within the rectangular window range, y′ is the vertical coordinate of the optimal position within the rectangular window range, and the rectangular window moves to the next position until the global range is traversed;

[0080] Among them, the fitness calculation S(x,y) of the artificial fish swarm algorithm is expressed as follows:

[0081]

[0082] Where W represents the damage type weight factor, and the value range of i and j is {-k, k}. Edge detection uses the artificial fish swarm algorithm with the damage type weight factor W to find edge changes in the image. The edge strength E is expressed as follows:

[0083]

[0084] Among them, G x and G y are the gradients of the image in the x and y directions respectively;

[0085] In some embodiments, during the image segmentation process, a global search is first performed, that is, the system searches the entire surface of the corrugated box, with the goal of finding potential damaged edge areas in the image. The center position of the rectangular window moves across the entire image at a fixed step size (Step). Each time it moves, the rectangular window covers a new area of ​​the image. When the rectangular window moves to a certain position (x, y), the system detects the image information within the window. If a possible damaged edge is detected, the system will continue with a more detailed local search. Each time it moves to a new position, the system calculates whether the damage feature at that position exceeds the set threshold T. If the feature value exceeds the threshold T, it indicates that the area may contain a damaged edge, and the system will further enter the local search stage.

[0086] Once the system detects the existence of a potential damage edge in a rectangular window (exceeding the set threshold T), the system will enter the local foraging mode, that is, a more detailed search within the current rectangular window. Within the range of the rectangular window, the system will randomly generate N search positions (this is equivalent to the foraging behavior of artificial fish in the rectangular window). These randomly generated positions represent different areas in the image, and the system finds the optimal segmentation position by comparing the damage feature values ​​of these positions. For each randomly generated position, the system calculates its damage feature value. The system records the position with the largest damage feature value among these positions as the optimal segmentation position in the current rectangular window. By comparing the damage features of all generated positions, the system will select the position with the largest damage feature value and record its horizontal and vertical coordinates as the optimal segmentation point for the current area.

[0087] Different types of damage (such as scratches, dents, or cracks) have different effects on the overall quality of the corrugated box. The system dynamically adjusts the weight factor W based on the type of damage detected, giving different weights to different damage types. The system adjusts the priority of specific damaged areas during the search process based on the severity of each damage type. For example, the weight factor of a crack may be larger because it has a more serious impact on the structure, while the weight factor of a scratch may be smaller because it mainly affects the appearance. The system adjusts the foraging behavior of the artificial fish in the rectangular window based on the weight factor W of the damage type. Areas with larger weight factors will receive higher priority, which means that the system will be more inclined to find the optimal segmentation position in these areas. After completing the local search within the current rectangular window, the system will move to the next global position and continue the next round of search. The movement of the rectangular window is performed according to a certain step size to ensure that the entire image surface is covered. The system will repeat the above global search and local foraging process until the entire image surface of the corrugated box is traversed. Each search will record the optimal segmentation position and gradually complete the segmentation of the entire damaged area. By combining the above global search with local search, the system can gradually determine the edges of all damaged areas on the surface of the corrugated box. The optimal segmentation position within each rectangular window will eventually be spliced ​​into a complete damaged edge. The system will record the segmented damaged area as a basis for further quality analysis and subsequent processing.

[0088] S33: Region marking: connect all the optimal positions (x′, y′) during the moving process of the rectangular window and segment them, mark the segmented regions, and extract the shape features of the segmented regions; the optimal position of the rectangular window is connected

[0089] In some embodiments, the system has found the optimal segmentation position within each rectangular window through the artificial fish swarm algorithm. Each optimal segmentation position represents a portion of the damaged edge. During the movement of the rectangular window, the system will continuously record the optimal position found in each rectangular window. Each position is represented in the form of coordinates. When all rectangular windows have completed the movement and recorded the optimal segmentation position, the system will connect these optimal positions according to their relative positions in the image to form a continuous edge line. The edge line represents the boundary of the damaged area on the corrugated box. Once all the optimal positions are connected, the system closes these edge lines to form a complete damaged area. By closing the edge line, the system can separate the damaged area from the overall image and make it an independent part. The system automatically connects all the optimal segmentation positions to form a closed area boundary to ensure that the damaged area is distinguished from other undamaged areas. When the boundary is closed, the damaged area will be marked independently. The system will fill the damaged area internally during the segmentation process for further analysis.

[0090] After completing the segmentation of the damaged area, the system will mark the segmented damaged area. Each segmented area will be assigned a unique marking number to distinguish different damaged areas. The system generates a unique marking number for each segmented damaged area. These marks are used to track and manage different damaged areas. Especially in the case of multiple damages, the marking number can help the system distinguish and process multiple damaged areas. According to the type of damage previously detected (such as scratches, dents or cracks), the system will add classification marks to each damaged area to ensure that different types of damage can be handled correctly. For the convenience of the operator or subsequent processing, the system will present the marked damaged areas in a visual manner on the image. Each marked area will be distinguished by a different color or symbol to show the location and category of each damaged area. After the segmented area is marked, the system will extract the shape features of each damaged area. These features can reflect the geometric properties and severity of the damaged area, mainly including the following aspects:

[0091] Area calculation: The system determines the area of ​​the damaged area by counting the number of pixels within the segmented area. The area reflects the size of the damaged area and is an important indicator for measuring the degree of damage. Based on the area of ​​different damaged areas, the system will classify the damage as small area damage or large area damage. A larger area may indicate that the damage is more serious and needs to be treated first.

[0092] Perimeter calculation: The system calculates the total length along the edge of the damage to obtain the perimeter of the damaged area. The perimeter can reflect the complexity of the shape of the damaged area. For example, a longer perimeter usually means that the edge is more complex and irregular. The system will analyze the ratio of perimeter to area to determine whether the damaged area is regular. If the ratio is high, it usually indicates that the edge of the area is irregular, which may be a more complex type of damage.

[0093] Aspect ratio calculation: The system calculates the aspect ratio of the minimum circumscribed rectangle of the segmented area to evaluate the shape of the damaged area. For example, an area with an aspect ratio close to 1 usually indicates that the damage is more circular, while an area with a larger aspect ratio may indicate that the damage is strip-shaped, such as a scratch. Through the aspect ratio, the system can classify the damaged area into different shape categories (such as long strips, nearly square or irregular shapes), which helps to further analyze the source and nature of the damage.

[0094] Roundness calculation: Roundness reflects whether the geometric shape of the damaged area is close to a circle. The system determines the roundness of the area by comparing the area of ​​the segmented area with the square of its perimeter. The higher the roundness, the closer the shape of the damaged area is to a circle. A circular damaged area usually means a dent or break caused by pressure, while a stripe-shaped damage usually means a scratch or scrape.

[0095] S34: The damaged image area of ​​the corrugated box is marked and segmented by using the artificial fish swarm algorithm with the damage type weight factor W added; the damage type weight factor W is a different weight value assigned according to the degree of influence of different damage types (such as scratches, dents, cracks, etc.) on the quality of the corrugated box. Specifically: Scratches (minor surface damage): The W value is small and usually does not affect the structural integrity of the carton, but mainly affects the appearance. Dents (slight deformation of the surface): The W value is medium, which may affect the shape or volume of the carton, but will not cause serious damage. Cracks (structural damage): The W value is large, which may cause the load-bearing capacity of the carton to decrease, so it is given priority.

[0096] During the damage detection process, the weight factor W affects the priority order of the artificial fish swarm algorithm for different damage areas. The algorithm will give higher priority to the damage area with larger weight value for segmentation and marking. This mechanism ensures that the system can first process those damages that have a greater impact on product quality.

[0097] The core of the artificial fish algorithm is to simulate the foraging behavior of fish schools, and find the optimal segmentation position by moving and searching in the image. The artificial fish school first moves across the entire image of the corrugated box to find areas where damage may exist. Each "fish" represents a computing unit of the algorithm, which will make judgments based on the damage features in the local image. When the algorithm detects that the damage features of a certain area meet the set threshold, the system will enter the local segmentation mode. In this mode, the artificial fish school will focus on this area and further refine the segmentation boundary.

[0098] At each segmentation decision point, the system adjusts the segmentation behavior based on the weight factor W of the damage type. If the algorithm identifies a region as a crack (i.e., a high-weight type), the system performs a higher priority segmentation in that region and gives it a higher weight when marking it. For low-weight types of damage (such as scratches), the system may reduce the intensity of the search in that region and prioritize those damaged areas with greater impact.

[0099] Each time the artificial fish school moves to a new position, the algorithm determines whether the current area belongs to the damage edge based on the characteristics of the image (such as brightness changes, edge information, etc.). The weight factor W helps the algorithm to be more accurate in processing complex edges and make differentiated segmentation decisions based on the type of damage. In each local area, the algorithm randomly generates multiple search points and finds the optimal segmentation position by comparing these points. High-weight areas have higher priority, and the algorithm will generate more search points to ensure accurate positioning of the damage edge. As the algorithm's recognition of the damaged area gradually deepens, the system will dynamically adjust the search strategy based on the damage characteristics and weight factors of each area to ensure that high-priority areas are segmented first.

[0100] After the artificial fish swarm algorithm completes the segmentation, the system will mark each segmented damaged area. The marking method includes: each segmented area will be assigned a unique number so that these damaged areas can be tracked and managed in subsequent processing. According to the type of damage (such as scratches, dents, cracks, etc.), the system will add the corresponding type mark to each area. The scratch area will be marked as "minor damage" and the crack area will be marked as "serious damage". The system will not only mark according to the type of damage, but also include weight information in the mark. If the weight factor W of a damaged area is high, the system will mark the area as a priority object. Operators can use these marks to quickly identify areas that need priority attention in subsequent quality inspections. For low-weight damaged areas such as scratches, the system will perform regular markings for subsequent visual inspections or quality control.

[0101] S4: Upload the damaged corrugated box image data obtained by image segmentation to the cloud database for storage. In the previous steps, the system has segmented the damaged areas on the surface of the corrugated box through the artificial fish swarm algorithm and marked these damaged areas. The segmented image can be a combination of multiple types of damage, such as scratches, dents or cracks, and each damaged area is marked and given a corresponding number.

[0102] The system generates an image file based on the results of each inspection. The segmented damaged area is superimposed on the original image to form a complete result image. These image files are usually in common image formats (such as PNG, JPEG or TIFF) and contain the following information: The original corrugated box image contains the appearance information of the entire carton. The damaged area is marked with color or lines to show the location and type of each damaged area. The system generates a unique number for each damaged area and attaches classification information (such as scratches, dents or cracks, etc.).

[0103] Before uploading the image, the system will package all detected images and related data to ensure that the data is complete and correct during the upload process. Data packaging includes the following: The segmented damaged image is the main upload content. In addition to the image file, the system will also generate metadata related to the detection results. These metadata include shape feature data such as detection time, damage type, damaged area, perimeter, etc. The system will associate the customer order information corresponding to the corrugated box with the detection results to ensure that each damaged image can correspond to a specific customer and order, which is convenient for subsequent tracking and quality feedback. In order to ensure data security during the upload process, the system will encrypt the packaged data. The encryption algorithm can use the common AES-256 or RSA encryption method to ensure that sensitive data is not tampered with or leaked during transmission. In addition, the system will compress the image file to reduce the bandwidth and time required for uploading.

[0104] The system connects with the API interface of the cloud database to upload data. The cloud database adopts a distributed architecture, which can handle a large amount of image data and provide efficient storage and management services. The system calls the upload interface of the cloud database to send image files and related metadata to the cloud. The API interface generates a unique record ID based on the uploaded data packet to ensure that each upload can uniquely identify the result of this inspection. During the data upload process, the system will obtain the upload status in real time and feedback the upload progress. If there is a network failure or interruption during the upload process, the system will automatically retry the upload to ensure that the data is successfully uploaded. When the data is successfully uploaded to the cloud, the cloud database will store and manage the uploaded data. Each uploaded damage image and metadata will be stored and indexed according to the following dimensions: The system will classify and index the uploaded images according to the customer order information to facilitate retrieval by customer or order. All uploaded damage images will be sorted according to the inspection time for subsequent historical data query and analysis. Image data will also be classified according to damage type (such as scratches, dents, cracks, etc.) to facilitate subsequent quality analysis.

[0105] In some embodiments, searching for the optimal segmentation position in the current local window according to the artificial fish foraging behavior further includes: calculating the center position (x av ,y av ), if E(x av ,y av )>E(x′,y′), then update position (x′,y′)=(x av ,y av ).

[0106] In some embodiments, shape features of the segmented region are extracted, and the shape features include area A and perimeter P;

[0107]

[0108] In some embodiments, W represents a damage type weight factor, including scratches, dents, and cracks, W = [w1, w2, w3] = [0.3, 0.5, 0.2]. In the corrugated box production process, different damage types such as scratches, dents, and cracks have different degrees of impact on the box. For example, cracks usually seriously affect the structural integrity of the box, while scratches affect the appearance of the box more. Therefore, the weight factor W for each type of damage is determined to allow the system to perform graded processing according to the severity of different damage types. The damage type with a larger weight will receive a higher processing priority.

[0109] The determination of weight factors is usually carried out through the following steps, including data collection, experimental testing, expert evaluation, and data analysis. The specific process is as follows: First, the system detects a large number of different types of damage to corrugated cartons during the production process and classifies each type of damage. The data includes but is not limited to the following aspects: Scratches: Minor scratches on the surface usually do not affect the structure of the carton, but only the appearance. Depression: Local depression of the surface may affect the shape or stacking stability of the carton. Cracks: Cracks on the surface or inside of the carton may lead to reduced load-bearing capacity or packaging failure. In order to more accurately evaluate the impact of different types of damage on corrugated cartons, the laboratory conducted a series of stress tests and failure simulations: Scratches test: By simulating production, transportation and use scenarios, observe whether minor scratches have a significant impact on the load-bearing capacity, sealing and protection of the carton. The test results show that scratches have little effect on the structure, but may affect the visual appearance and customer experience. Depression test: Stacking experiments are carried out on depressed cartons to test their stability when stacked in multiple layers. The results show that moderate or severe depressions may cause the carton to lose stability during transportation or storage. Crack test: Strength test is carried out on cracked cartons to simulate the impact of cracks on the load-bearing capacity of cartons. The results show that cracks can significantly reduce the strength of cartons and increase the risk of damage.

[0110] Through these experiments, we obtained data support for the impact of each type of damage on the actual performance of the carton. Based on the experimental results, the system will import these data into the algorithm model for statistical analysis. The model comprehensively considers the frequency of occurrence, severity and processing cost of each type of damage, and finally calculates the weight factor of each type of damage. Weight factor W1 for scratches: Since scratches have little effect on the structure of the carton, the weight value is relatively low. Weight factor W2 for dents: Dents may affect the shape and stacking stability of the carton, so the weight value is in the middle. Weight factor W3 for cracks: Cracks have the greatest impact on the load-bearing capacity of the carton and have the highest weight value.

[0111] In some embodiments, the method of automatically detecting damage to the produced corrugated paper boxes using a CCD camera visual recognition system includes:

[0112] S1: grayscale the collected CCD camera image;

[0113] S2: The Canny operator edge detection algorithm is used to identify scratches, dents and cracks in the image. When scratches, dents or cracks exist in the image, it is judged that a damaged corrugated box is detected.

[0114] The present application also provides an intelligent corrugated box production control system, such as Figure 2As shown, it includes: The main control system is the core of the entire production control system, responsible for coordinating the operations of each production link and the communication between equipment. It receives order information, manages production scheduling, monitors production status, and provides quality feedback. The main control system usually consists of a high-performance industrial computer (or PLC system) equipped with a high-capacity storage unit and a powerful processor to ensure real-time data processing capabilities during the production process.

[0115] The sensor system is used to monitor the status of the production line in real time to ensure the normal operation of each process. Common sensors include: Temperature sensors are used to detect the temperature of cardboard heating and bonding during production to ensure that the temperature remains within the set range. Pressure sensors are used to detect the pressing force to ensure that the molding pressure of the cardboard meets the requirements. Speed ​​sensors monitor the conveyor belt speed of the production line to ensure that the cartons run at the set rhythm. Position sensors are used to monitor the position of the cutting knife to ensure cutting accuracy. All sensors are connected to the main control system through industrial buses (such as Modbus, CAN bus) or wireless sensor networks (such as ZigBee, Wi-Fi), and the monitoring data is fed back to the main control system in real time.

[0116] Servo motor and drive system, servo motor drive system is used to accurately control mechanical equipment on the production line, such as cutting, pressing, conveying, etc. Through the precise control of the servo motor, the system can automatically adjust the working parameters of the equipment according to different order requirements. The servo motor is connected to the main control system, which sends signals through the control driver to adjust the speed, angle and position of the motor to ensure that each device can work accurately according to the set process parameters.

[0117] CCD camera and visual recognition system, CCD camera is used to inspect the quality of produced corrugated boxes, especially to detect surface damage (such as scratches, dents, cracks, etc.). The visual recognition system identifies possible defects on the surface of the box through image processing algorithms and feeds them back to the main control system for quality analysis. The high-resolution CCD camera is connected to the main control system through an image acquisition card or Ethernet. The camera takes real-time images of the surface of the corrugated box, and the images are transmitted to the visual recognition system, which processes and analyzes the images through software.

[0118] Human-machine interface, HMI is used by operators to view production status, adjust production parameters and handle abnormal situations. Operators can monitor production progress, adjust production plans or make manual interventions through interactive devices such as touch screens. HMI is usually a touch screen, integrated into the main control system, and connected to the main control system through Ethernet or RS232 / RS485 serial communication interface. Operators can view sensor data, production line status and order progress in real time through HMI.

[0119] Cloud databases are used to store all data generated during the production process, including order information, production parameters, quality inspection results, etc. Through cloud databases, companies can remotely monitor production status and use big data analysis to optimize production. Cloud databases are usually deployed in the company's data center or public cloud platform. The production control system is connected to the cloud database through the Industrial Internet of Things (IoT) interface, and the data is transmitted to the cloud for storage via 5G, Wi-Fi or wired Ethernet.

[0120] The feeding system is used to automatically supply raw materials such as corrugated cardboard required by the production line, ensuring that the raw materials are delivered to the production line in a timely and accurate manner. The feeding system is equipped with intelligent conveyor belts and silos. Sensors are used to monitor the remaining amount of raw materials. The main control system dispatches the feeding system according to order information to ensure uninterrupted production. The sensor and the main control system are connected wirelessly or wired to transmit feeding information.

[0121] Barcode / Radio Frequency Identification (RFID) System: Barcode or RFID system is used to identify and track the production progress and status of cartons, ensuring that each carton can be accurately tracked and matched with the corresponding order information. Barcode scanners or RFID readers are installed at different nodes of the production line to track and manage by scanning or reading the labels on the cartons. Data is transmitted to the main control system via Wi-Fi or wired interface.

[0122] All sensors are connected to the main control system through industrial buses (such as Modbus, CAN bus) or wireless networks, and the main control system receives data feedback from various sensors in real time. The servo motor is connected to the main control system through a driver. The main control system controls the working status of the servo motor in real time according to the order information and sensor feedback to ensure that the production parameters meet the set requirements. The CCD camera is connected to the main control system through an Ethernet or USB interface, and the collected image data is transmitted to the main control system for processing and analysis. The HMI is connected to the main control system through Ethernet or serial communication. The operator can view production data, adjust parameters or perform manual intervention in real time through the HMI. The feeding system uses wireless sensors or wired connections to ensure that the supply of raw materials is fed back to the main control system in real time to avoid production interruptions due to insufficient supply.

[0123] Cloud connection and data transmission: The main control system is connected to the cloud database through the Industrial Internet of Things (IoT) interface. All production data, inspection data and order information in the system will be uploaded to the cloud in real time for storage and analysis. Data transmission is completed through 5G, Wi-Fi or wired Ethernet to ensure the real-time and security of the system.

[0124] The main control system automatically receives order information from the CRM / ERP system and transmits the information to the production line. The main control system automatically sets the production line parameters such as pressing force, cutting size, transmission speed, etc. through the servo motor according to the order information. The production monitoring sensor system monitors the status of the production line to ensure the normal operation of each process. Real-time data is fed back to the main control system through the bus. After production is completed, the CCD camera captures the surface image of the carton, and the visual recognition system analyzes and marks the damaged area. All inspection data and production data are uploaded to the cloud database for management personnel to analyze and make decisions.

[0125] Order information acquisition module: The main control system obtains order information from the customer management system (CRM) in real time, automatically receives and analyzes customer order information, including the size, thickness, material, and quantity of the carton;

[0126] Production line parameter adjustment module: The main control system automatically adjusts the production line parameters through servo motors and sensors according to order information to adapt to the production of different cartons; production line parameters include pressing force, cutting size, temperature, and speed;

[0127] Automatic damage detection module: The CCD camera visual recognition system is used to automatically detect damage to the produced corrugated boxes. If a damaged corrugated box is detected, the artificial fish swarm algorithm with the damage type weight factor W is used for image segmentation;

[0128] Initialize the artificial fish swarm module. The local foraging range of the artificial fish swarm is a rectangular window with four sides of 2k pixels, where k represents the number of pixels with half the side length of the rectangular window. The artificial fish swarm algorithm is an optimization algorithm based on swarm intelligence, which simulates the foraging, gathering, and following behaviors of fish in the water to find the optimal solution to the problem. In this technical solution, each "fish" of the artificial fish swarm algorithm represents a possible image segmentation position, and the fish swarm as a whole finds the edge of the damaged area in the image through collaboration and dynamic adjustment. The artificial fish swarm algorithm searches for the optimal segmentation position in the image by simulating multiple behaviors of fish, mainly including foraging behavior, gathering behavior, and following behavior.

[0129] Foraging behavior principle: Foraging behavior is the core behavior of the artificial fish algorithm, simulating the process of fish looking for food in the water. In image segmentation, foraging behavior corresponds to the process of each "fish" looking for the edge of the damage in the image. Each fish moves its position and tries to find an area whose characteristics (such as brightness changes or texture features) meet the edge characteristics of the damage. Process: Each fish starts from a random initial position and moves to a new position step by step. If the new position has more obvious edge features, the fish stays at that position and continues searching. If no better position is found, the fish will continue to move to other areas for searching.

[0130] Aggregation behavior principle: Aggregation behavior simulates the phenomenon of fish flocking when they find food. When multiple fish find the same damaged area at the same time, the fish will gather in the area and search intensively to ensure that the damage in the area is fully identified. Process: When several fish detect the edge of the damage in the same local area, they will stop further expanding the search and focus on searching for the optimal segmentation position in the area. In this way, the system can quickly and accurately determine the damage edge. Following behavior principle: Following behavior simulates the behavior of individuals in a school of fish following each other. If a fish finds a damaged area, nearby members of the school may follow its movement to find the edge faster. Process: If a fish detects a damage feature, the remaining fish will follow the path of the fish and focus on the damaged area for a more detailed segmentation search. This following behavior allows the algorithm to lock onto the damaged area faster and reduce invalid searches.

[0131] In this technical solution, the artificial fish swarm algorithm is mainly used for the segmentation of damaged images of corrugated boxes. The workflow of the algorithm is as follows: Initial position selection: At the beginning of the algorithm, the system randomly distributes several artificial fish in the global range of the corrugated box image. The initial position of each fish can be a pixel point or a local area in the image. Initialization parameter setting: Each fish is assigned an initial moving step and perception range. The moving step indicates the distance each fish moves in the image, while the perception range is used to detect the damage features around it. Local search: Each fish performs a local search based on the currently perceived image features (such as grayscale gradient, edge strength, etc.). If the detected damage edge feature meets the set threshold, the fish will stay at this position and mark the area as a damaged edge. Global adjustment: If a fish does not find a damage feature, it will continue to move globally until it finds a potential damage edge. By combining local and global searches, the algorithm can gradually lock all damaged areas on the surface of the corrugated box. The role of the weight factor W: During the damage detection process, the system assigns different weight factors W to each damage type according to the different damage types (such as scratches, dents, cracks). The weight factor reflects the degree of influence of different damage types on the quality of the carton. Dynamic adjustment: The weight factor W affects the behavior of the fish school. For example, damage types with larger weight values ​​(such as cracks) will be processed first, and the fish school will search the area more intensively when detecting this type of damage. In contrast, damage types with smaller weights (such as scratches) will be allocated fewer search resources. Determination of the optimal position: In the process of continuous movement and searching, the fish school will eventually find the optimal segmentation position of the damaged edge in the image. Through repeated local searches and global adjustments, the algorithm can accurately determine the boundaries of the damaged area. Adaptive adjustment: The search step size, perception range and other parameters of the fish school can be dynamically adjusted according to the damage type and image complexity. Larger step sizes are used for global searches, while smaller step sizes are used for fine edge segmentation.

[0132] Rectangular window movement judgment module, the artificial fish forages for the damaged corrugated box image segmentation edge position in the global range by moving the rectangular window, and the moving step is Step. If the center position of the rectangular window moves to the position (x, y) S(x, y) ≥ T, T is the set threshold, then the rectangular window contains the image segmentation edge, and then the optimal segmentation position is searched in the current local window according to the foraging behavior of the artificial fish, otherwise the rectangular window moves to the next position; the process of searching for the optimal segmentation position is as follows: randomly generate a position N times (x new ,y new )=(x+random(i),y+random(j)); random() is a random generation function; select E(x new ,y new ) is the optimal position (x′, y′) within the rectangular window, (x′, y′) = (x new ,y new ), the rectangular window moves to the next position until the global scope is traversed;

[0133] Among them, the fitness calculation S(x,y) of the artificial fish swarm algorithm is expressed as follows:

[0134]

[0135] Where W represents the damage type weight factor, and the value range of i and j is {-k, k}. Edge detection uses the artificial fish swarm algorithm with the damage type weight factor W to find edge changes in the image. The edge strength E is expressed as follows:

[0136]

[0137] Among them, G x and G y are the gradients of the image in the x and y directions respectively;

[0138] The region marking module connects and segments all the optimal positions (x′, y′) of the rectangular window during its movement, marks the segmented regions, and extracts the shape features of the segmented regions;

[0139] Segmentation module: segment the damaged image area of ​​the corrugated box by adding the artificial fish swarm algorithm with the damage type weight factor W;

[0140] Data saving module: upload the damaged corrugated box image data obtained by image segmentation to the cloud database for storage.

[0141] In some embodiments, searching for the optimal segmentation position in the current local window according to the artificial fish foraging behavior further includes: calculating the center position (x av ,yav ), if E(x av ,y av )>E(x′,y′), then update position (x′,y′)=(x av ,y av ).

[0142] In some embodiments, shape features of the segmented region are extracted, and the shape features include area A and perimeter P;

[0143]

[0144] In some embodiments, W represents a damage type weight factor, W=[w1, w2, w3]=[0.3, 0.5, 0.2], w1 represents a scratch type, w2 represents a dent type, and w3 represents a crack type.

[0145] In some embodiments, the method of automatically detecting damage to the produced corrugated paper boxes using a CCD camera visual recognition system includes:

[0146] S1: grayscale the collected CCD camera image;

[0147] S2: The Canny operator edge detection algorithm is used to identify scratches, dents and cracks in the image. When scratches, dents or cracks exist in the image, it is judged that a damaged corrugated box is detected.

[0148] The present invention provides an intelligent corrugated box production method and control system, which can achieve the following beneficial technical effects:

[0149] 1. This application uses an artificial fish swarm with a damage type weight factor W to segment and extract features from the image. The fitness calculation S(x, y) of the artificial fish swarm algorithm is expressed as follows:

[0150]

[0151] Among them, W represents the damage type weight factor, and the value range of i and j is {-k, k}; edge detection searches for edge changes in the image by adding the artificial fish swarm algorithm with the damage type weight factor W; when the artificial fish finds a new position, the local search function is used to further optimize the position. By setting the local search and the damage type weight factor, including scratches, dents and fragments, W = [w1, w2, w3] = [0.3, 0.5, 0.2], the image extraction can extract the damaged parts according to the characteristics of the damage type, which greatly enhances the accurate extraction of the damaged parts and improves the automation of corrugated box damage judgment.

[0152] 2. The present invention uses artificial fish to forage and search for the edge position of the corrugated box loss image segmentation in a global range by moving the rectangular window. The moving step is Step. If the center position of the image rectangular window moves to the position (x, y) S(x, y) ≥ T, T is the set threshold, then the rectangular window contains the image segmentation edge, and then the optimal segmentation position is searched in the current local window according to the foraging behavior of the artificial fish, otherwise the rectangular window moves to the next position; the process of searching for the optimal segmentation position is as follows: randomly generate a position N times (x new ,y new )=(x+random(i),y+random(j)); random() is a random generation function; select E(x new ,y new ) is the optimal position (x′, y′) within the rectangular window, (x′, y′) = (x new ,y new ), the rectangular window moves to the next position until the global range is traversed. By first selecting the image with segmented edges and then finding the optimal position through artificial and foraging behavior, the judgment accuracy is greatly improved, and the extraction of the damaged position of the corrugated box is realized by combining multiple factors.

[0153] 3. The present invention provides an intelligent corrugated paper box production method and control system. The method first obtains the order information of the customer management system (CRM) in real time through the main control system; secondly, the main control system automatically adjusts the production line parameters through the servo motor and the sensor according to the order information to adapt to the production of different cartons; thirdly, the produced corrugated paper boxes are automatically damaged by the CCD camera visual recognition system. If a damaged corrugated paper box is detected, the artificial fish school algorithm with the damage type weight factor W is used for image segmentation; finally, the damaged corrugated paper box image data obtained by image segmentation is uploaded to the cloud database for storage. This application greatly improves the accuracy and efficiency of video processing and greatly increases the user experience by using the artificial fish school algorithm with the damage type weight factor W for image segmentation.

[0154] An intelligent corrugated box production method and control system are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the core idea of ​​the present invention. At the same time, for those skilled in the art, according to the ideas and methods of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. An intelligent corrugated box production method, characterized in that: Includes steps: S1: The main control system obtains order information from the customer management system (CRM) in real time, automatically receives and analyzes customer order information, including the size, thickness, material, and quantity of the carton; S2: The main control system automatically adjusts the production line parameters through servo motors and sensors according to the order information to adapt to the production of different cartons; the production line parameters include pressing force, cutting size, temperature, and speed; S3: Automatically detect damage on the produced corrugated boxes using a CCD camera visual recognition system. If a damaged corrugated box is detected, an artificial fish swarm algorithm with a damage type weight factor W is used for image segmentation. S31: Initialize the artificial fish school, the local foraging range of the artificial fish school is a rectangular window with four sides of 2k pixels, where k represents the number of pixels of 1 / 2 side length of the rectangular window; S32: The artificial fish searches for the image segmentation edge position of the damaged corrugated box by moving the rectangular window in the global range, and the moving step is Step. If S(x, y) ≥ T when the center position of the rectangular window moves to the position (x, y), T is the set threshold, then the rectangular window contains the image segmentation edge, and then searches for the optimal segmentation position in the current local window according to the artificial fish foraging behavior, otherwise the rectangular window moves to the next position; the process of searching for the optimal segmentation position is as follows: randomly generate a position N times (x new ,y new )=(x+random(i),y+random(j)); random() is a random generation function; select E(x new ,y new ) is the optimal position (x′, y′) within the rectangular window, (x′, y′) = (x new ,y new ), x′ is the horizontal coordinate of the optimal position within the rectangular window range, y′ is the vertical coordinate of the optimal position within the rectangular window range, and the rectangular window moves to the next position until the global range is traversed; Among them, the fitness calculation S(x,y) of the artificial fish swarm algorithm is expressed as follows: Where W represents the damage type weight factor, and the value range of i and j is {-k, k}. Edge detection uses the artificial fish swarm algorithm with the damage type weight factor W to find edge changes in the image. The edge strength E is expressed as follows: Among them, G x and G y are the gradients of the image in the x and y directions respectively; S33: region marking, connecting and segmenting all the optimal positions (x′, y′) during the moving process of the rectangular window, marking the segmented regions, and extracting shape features of the segmented regions; S34: segmenting the corrugated box loss image area by using an artificial fish swarm algorithm with a damage type weight factor W added; S4: Upload the damaged corrugated box image data obtained by image segmentation to the cloud database for storage.

2. An intelligent corrugated box production method as claimed in claim 1, characterized in that: The step of searching for the optimal segmentation position in the current local window according to the artificial fish foraging behavior further includes: calculating the center position (x av ,y av ), if E(x av ,y av )>E(x′,y′), then update position (x′,y′)=(x av ,y av ).

3. An intelligent corrugated box production method as claimed in claim 2, characterized in that: Extract the shape features of the segmented area, the shape features include area A and perimeter P; 4. The intelligent corrugated box production method according to claim 1, characterized in that: W represents the damage type weight factor, including scratches, dents and cracks, W = [w1, w2, w3] = [0.3, 0.5, 0.2].

5. The intelligent corrugated box production method according to claim 1, characterized in that: The method of automatically detecting damage to the produced corrugated paper boxes using a CCD camera visual recognition system includes: S1: grayscale the collected CCD camera image; S2: The Canny operator edge detection algorithm is used to identify scratches, dents and cracks in the image. When scratches, dents or cracks exist in the image, it is judged that a damaged corrugated box is detected.

6. An intelligent corrugated box production control system, characterized in that: include: Order information acquisition module: The main control system obtains order information from the customer management system (CRM) in real time, automatically receives and analyzes customer order information, including the size, thickness, material, and quantity of the carton; Production line parameter adjustment module: The main control system automatically adjusts the production line parameters through servo motors and sensors according to order information to adapt to the production of different cartons; production line parameters include pressing force, cutting size, temperature, and speed; Automatic damage detection module: The CCD camera visual recognition system is used to automatically detect damage to the produced corrugated boxes. If a damaged corrugated box is detected, the artificial fish swarm algorithm with the damage type weight factor W is used for image segmentation; Initialize the artificial fish school module. The local foraging range of the artificial fish school is a rectangular window with four sides of 2k pixels, where k represents the number of pixels with half the side length of the rectangular window. Rectangular window movement judgment module, the artificial fish forages for the damaged corrugated box image segmentation edge position in the global range by moving the rectangular window, and the moving step is Step. If the center position of the rectangular window moves to the position (x, y) S(x, y) ≥ T, T is the set threshold, then the rectangular window contains the image segmentation edge, and then the optimal segmentation position is searched in the current local window according to the foraging behavior of the artificial fish, otherwise the rectangular window moves to the next position; the process of searching for the optimal segmentation position is as follows: randomly generate a position N times (x new ,y new )=(x+random(i),y+random(j)); random() is a random generation function; select E(x new ,y new ) is the optimal position (x′, y′) within the rectangular window, (x′, y′) = (x new ,y new ), the rectangular window moves to the next position until the global scope is traversed; Among them, the fitness calculation S(x,y) of the artificial fish swarm algorithm is expressed as follows: Where W represents the damage type weight factor, and the value range of i and j is {-k, k}. Edge detection uses the artificial fish swarm algorithm with the damage type weight factor W to find edge changes in the image. The edge strength E is expressed as follows: Among them, G x and G y are the gradients of the image in the x and y directions respectively; The region marking module connects and segments all the optimal positions (x′, y′) of the rectangular window during its movement, marks the segmented regions, and extracts the shape features of the segmented regions; Segmentation module: segment the damaged image area of ​​the corrugated box by adding the artificial fish swarm algorithm with the damage type weight factor W; Data saving module: upload the damaged corrugated box image data obtained by image segmentation to the cloud database for storage.

7. An intelligent corrugated box production control system as claimed in claim 6, characterized in that: The step of searching for the optimal segmentation position in the current local window according to the artificial fish foraging behavior further includes: calculating the center position (x av ,y av ), if E(x av ,y av )>E(x′,y′), then update position (x′,y′)=(x av ,y av ).

8. An intelligent corrugated paper box production control system as claimed in claim 6, characterized in that: Extract the shape features of the segmented area, the shape features include area A and perimeter P; 9. The intelligent corrugated paper box production control system according to claim 6, characterized in that: The W represents the damage type weight factor, W=[w1,w2,w3]=[0.3,0.5,0.2], w1 represents the scratch type, w2 represents the dent type, and w3 represents the crack type.

10. The intelligent corrugated paper box production control system according to claim 6, characterized in that: The method of automatically detecting damage to the produced corrugated paper boxes using a CCD camera visual recognition system includes: S1: grayscale the collected CCD camera image; S2: The Canny operator edge detection algorithm is used to identify scratches, dents and cracks in the image. When scratches, dents or cracks exist in the image, it is judged that a damaged corrugated box is detected.

Citation Information

Patent Citations

  • Artificial fish swarm algorithm-based circular workpiece detection method

    CN106097307A

  • Flat wheel fault detection method for optimizing BP neural network by improving artificial fish swarm algorithm

    CN111461183A