Encasement quality online monitoring system and method based on visual AI

By adopting a visual AI-based online monitoring system during the packing process, combining industrial cameras and AI models to automatically detect packing objects, the safety and environmental dependence problems of traditional manual detection are solved and the automatic detection methods exist, and efficient and accurate packing quality control is achieved.

CN119671972APending Publication Date: 2025-03-21SHANGHAI TRIOWIN INTELLIGENT MACHINERY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411732632.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

Traditional packaging process relies on manual testing, which is inefficient and prone to errors. Existing automatic detection methods such as capacitance detection and ray detection have problems such as inconvenient installation, environmental dependence or personal safety threats.

Method used

The packaging quality online monitoring system based on visual AI is adopted, combining digital industrial cameras, industrial computers, controllers and front light sources, and the image inside the packaging box is processed using a preset visual AI model, automatically detecting the packing objects and outputting control signals to ensure the integrity and accuracy of the packing.

Benefits of technology

It realizes automated, high-speed and accurate packing quality inspection, improves inspection efficiency, saves labor costs, ensures the integrity and accuracy of packing, and reduces the error rate and labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119671972A_ABST
    Figure CN119671972A_ABST
Patent Text Reader

Abstract

The invention relates to a boxing quality on-line monitoring system and method based on vision AI, the system comprises a digital industrial camera, an industrial computer, a controller and a front light source which are connected in sequence, the controller is further connected with an execution mechanism on a production line, the digital industrial camera is used for shooting an image of an internal area of the packaging box directly seen from the top of the packaging box, and processing the image by using a preset visual AI model; the industrial computer is used for comparing and analyzing the processed image to determine a detection result and outputting a corresponding control signal to the controller according to the detection result; the controller is used for correspondingly controlling the working state of the executing mechanism and adjusting the working parameters of the front light source. Compared with the prior art, the digital industrial camera is combined with the front light source for image collection, the high-precision AI image recognition technology and the automatic control technology are combined, the detection efficiency can be improved, the labor cost can be saved, and the boxing integrity and accuracy can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent processing and production technology, and in particular to a visual AI-based online packing quality monitoring system and method. Background Art

[0002] Packing is an important process for product packaging and protection. Its quality is directly related to the integrity and accuracy of the product. In the packing operation, in addition to placing the product itself in the box, it is often necessary to place additional items such as product certificates, handbags, anti-counterfeiting identifiers, etc. in the box. In order to avoid missing or wrong packaging, the traditional packing process mainly relies on manual quality inspection and counting operations, which is not only inefficient but also prone to errors.

[0003] Existing research uses capacitance detection, radiation detection and other methods to achieve automatic packaging detection, but the capacitance detection method is inconvenient to install and is easily affected by the environment. The radiation detection method is difficult to promote and apply in practice due to its threat to personal safety. Summary of the invention

[0004] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide an online monitoring system and method for packing quality based on visual AI, which combines high-precision AI (Artificial Intelligence) image recognition technology with automatic control technology, can improve detection efficiency, save labor costs, and ensure the integrity and accuracy of packing.

[0005] The object of the present invention can be achieved by the following technical solutions: a visual AI-based on-line monitoring system for packing quality, comprising a digital industrial camera, an industrial computer, a controller and a front light source connected in sequence, the controller is also connected to an actuator on a production line, the digital industrial camera is used to take an image of the internal area of ​​the packaging box directly from the top of the packaging box, and a preset visual AI model is used to process the image;

[0006] The industrial computer is used to compare and analyze the processed images to determine the detection results, and output corresponding control signals to the controller according to the detection results;

[0007] The controller is used to control the working state of the actuator accordingly and adjust the working parameters of the front light source.

[0008] Furthermore, the industrial computer is connected to a display and a memory, the display is used to display the current detection result in real time, and the memory is used to record the current detection result in real time.

[0009] A method for online monitoring of packing quality based on visual AI, comprising the following steps:

[0010] S1. Adjust the parameters of the image acquisition area so that the boxed objects can be identified and measured in the image;

[0011] S2. Adjust the parameters of the digital industrial camera and the working parameters of the front light source to achieve the best quality of the captured image;

[0012] S3. Presetting a corresponding image processing algorithm in the digital industrial camera according to the characteristics of the object to be detected;

[0013] S4. Use a digital industrial camera to collect images of the internal area of ​​the current packaging box, use a pre-trained visual AI model to process the images, and then transmit the processed images to an industrial computer;

[0014] S5, the industrial computer compares the processed image with the corresponding standard image to determine the quality inspection result of the packaging. If the inspection result is unqualified, step S6 is executed, otherwise step S7 is executed;

[0015] S6, the industrial computer outputs a control signal to the controller, and the corresponding control actuator removes the current packaging box from the production line;

[0016] S7. The industrial computer outputs a control signal to the controller, and the corresponding control actuator completes the packing operation for the current packing box.

[0017] Furthermore, the image area parameters collected in step S1 include image resolution and field of view size.

[0018] Furthermore, the specific process of step S1 is as follows:

[0019] First determine the size and shape of the object;

[0020] Then determine the maximum size of the object;

[0021] Based on the maximum size of the object and the resolution of the camera, calculate the minimum required field of view:

[0022]

[0023] Among them, L is the maximum size of the object and f is the focal length of the camera lens.

[0024] Furthermore, the working parameters of the front light source in step S2 include light source position, angle and intensity, and the front light source adopts 3D structured light.

[0025] Furthermore, the image processing algorithm in step S3 includes a connected domain analysis algorithm, an edge detection algorithm or a region measurement algorithm, which is used to perform corresponding processing on the color features, shape features or edge features of the object to be detected.

[0026] Furthermore, the process of the visual AI model processing the image in step S4 includes:

[0027] ROI definition: determine the region of interest ROI where the detection target is located, select the shape of the ROI, and define its boundary vertices;

[0028] ROI adjustment: adjust the position, size and number of detection boxes according to the image content to cover the target object and adapt to multiple targets or complex scenes in the image;

[0029] Color channel analysis: Use an image editor to observe the output of different color channels and select the channel with the highest contrast between the target and the background;

[0030] Preprocessing decision: If the image is noisy or unclear, perform denoising or filtering preprocessing;

[0031] Gradient decision: If you need to highlight the edges or changing areas in the image, select and apply the gradient detection algorithm;

[0032] Binarization: Apply the binarization algorithm to convert the image into black and white;

[0033] Morphological operation: Based on the image characteristics, decide whether to apply morphological operations to remove noise or fill gaps in the target area;

[0034] Connected Component Analysis: Perform connected component analysis to identify and label connected regions in an image.

[0035] Area filtering: based on the preset filtering criteria and corresponding thresholds, filter out the areas that meet the conditions;

[0036] Result output: Based on the preset multiple combined filtering conditions, the location information, area, width, height and offset of the area are output.

[0037] Furthermore, the step S4 specifically involves digitizing and compressing the processed image and then transmitting it to the industrial computer.

[0038] Furthermore, the specific process of step S5 is as follows:

[0039] The industrial computer performs corner point extraction and feature matching analysis on the processed image, and verifies the consistency between the monitoring points in the image and the monitoring points in the preset standard image. If the verification passes, it indicates that the packaging quality inspection result is qualified, otherwise it fails.

[0040] Compared with the prior art, the present invention has the following advantages:

[0041] The present invention sets up a digital industrial camera, an industrial computer, a controller and a front light source connected in sequence, and connects the controller to the actuator on the production line, uses a digital industrial camera to take an image of the internal area of ​​the packaging box directly from the top of the packaging box, and uses a preset visual AI model to process the image; uses an industrial computer to compare and analyze the processed image to determine the detection result, and outputs a corresponding control signal to the controller according to the detection result; uses the controller to control the working state of the actuator accordingly, and adjusts the working parameters of the front light source. In this way, high-precision AI image recognition technology is combined with automatic control technology, which can automatically, efficiently and accurately detect the quality of packaging to ensure the integrity and accuracy of packaging.

[0042] The present invention first adjusts the specific parameters of the image acquisition area, including the required image resolution and field of view size, to ensure that the packed objects can be accurately identified and measured in the image; then adjusts the camera parameters and light source parameters to obtain the best image quality; thereby, in combination with a high-speed digital industrial camera and a front light source, it is possible to directly view the internal area of ​​the packaging box from the top of the packaging box and perform image acquisition covering the entire packaging box range, thereby ensuring the effectiveness and accuracy of image acquisition, and facilitating the reliability of subsequent image processing.

[0043] The present invention presets image processing algorithms suitable for different detection objects according to the different characteristics of the detection objects, which can effectively improve the quality of the collected images and realize image enhancement, so as to significantly improve the accuracy and efficiency of subsequent object detection.

[0044] In the present invention, a visual AI model is preset in the digital industrial camera, and the visual AI model is used to perform ROI definition, ROI adjustment, color channel analysis, preprocessing decision, gradient decision, binarization processing, morphological operation, connected domain analysis, and regional filtering operations on the collected images, which can achieve in-depth analysis and understanding of the image content and improve the reliability of the detection results. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A schematic diagram of the setting effect of the digital industrial camera and the front light source in the present invention;

[0046] Figure 2 It is a schematic diagram of the method flow of the present invention;

[0047] Figure 3 It is a schematic diagram of the application process of the embodiment;

[0048] Figure 4 This is a schematic diagram of the effect of the trained visual AI model in the embodiment;

[0049] Figure 5 Schematic diagram of the LOG operator model. DETAILED DESCRIPTION

[0050] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0051] Example

[0052] A visual AI-based packaging quality online monitoring system includes a digital industrial camera, an industrial computer, a controller and a front light source connected in sequence. The controller is also connected to an actuator on the production line, such as Figure 1 As shown in the figure, the digital industrial camera combined with the front light source directly looks at the inner area of ​​the packaging box from the top of the packaging box to perform image acquisition and processing, and the camera's field of view covers the entire packaging box range;

[0053] The digital industrial camera is used to capture images of the interior area of ​​the packaging box from the top of the packaging box, and the images are processed using a preset visual AI model;

[0054] The industrial computer is used to compare and analyze the processed images to determine the detection results, and output corresponding control signals to the controller according to the detection results; the industrial computer is also connected to a display and a memory, wherein the display is used to display the current detection results in real time, and the memory is used to record the current detection results in real time;

[0055] The controller is used to control the working state of the actuator accordingly and adjust the working parameters of the front light source.

[0056] The above system is used to implement an online monitoring method for packing quality based on visual AI, which includes the following steps:

[0057] S1. Adjust the parameters of the image acquisition area so that the boxed objects can be identified and measured in the image;

[0058] S2. Adjust the parameters of the digital industrial camera and the working parameters of the front light source to achieve the best quality of the captured image;

[0059] S3. Presetting a corresponding image processing algorithm in the digital industrial camera according to the characteristics of the object to be detected;

[0060] S4. Use a digital industrial camera to collect images of the internal area of ​​the current packaging box, use a pre-trained visual AI model to process the images, and then transmit the processed images to an industrial computer;

[0061] S5, the industrial computer compares the processed image with the corresponding standard image to determine the quality inspection result of the packaging. If the inspection result is unqualified, step S6 is executed, otherwise step S7 is executed;

[0062] S6, the industrial computer outputs a control signal to the controller, and the corresponding control actuator removes the current packaging box from the production line;

[0063] S7. The industrial computer outputs a control signal to the controller, and the corresponding control actuator completes the packing operation for the current packing box.

[0064] This embodiment applies the above solution, such as Figure 3 As shown, the main contents are:

[0065] 1. Adjust the specific parameters of the image acquisition area, including the required image resolution and field of view size, to ensure that the boxed objects can be accurately identified and measured in the image;

[0066] 2. After determining the area, adjust the camera parameters and special light source to obtain the best image quality;

[0067] 3. Clarify the characteristics of the detection object and select an algorithm suitable for the detection object;

[0068] 4. The camera sensor converts the optical signal into an electrical signal, which is then uploaded to an industrial computer for signal processing and comparative analysis;

[0069] 5. After comprehensive analysis and comparison of information, the controller sends out command signals to accurately control the action of the actuator to achieve the predetermined operation target;

[0070] 6. After the test information is processed and calculated, the results are uploaded to the display, showing the test status as normal or abnormal, and the results are automatically archived and recorded by the memory.

[0071] In step 1, the specific parameters of the image acquisition area, including the required image resolution and field of view size, are adjusted to ensure that the boxed objects can be accurately identified and measured in the image. In order to ensure that the boxed objects can be completely and clearly captured during the image acquisition process, the size and shape of the object must be determined first. Assume that the object is a cuboid with the maximum length, width, and height dimensions of L, W, and H, respectively. Considering the image resolution and the required viewing angle, the following steps are used to calculate the image acquisition area: Determine the maximum size of the object, assuming it is L. Calculate the required minimum field of view (FOV) based on the maximum size of the object and the resolution of the camera.

[0072] For example, if the camera has a resolution of M pixels, use the formula: To estimate the required field of view, where f is the focal length of the camera lens. Based on the calculated field of view, select an appropriate lens to ensure that the object can be fully displayed in the image. Considering the error of object placement and the accuracy limitation of the image acquisition device, appropriately increase the size of the image acquisition area to ensure that the object is always clearly visible in the image.

[0073] In step 2, after the area is determined, the camera parameters and special light sources are adjusted to obtain the best image quality. The light source used in this method is 3D structured light, which is used for product quality control and defect detection. The position, angle and intensity of the light source are adjusted to eliminate shadows, reflections, and evenly illuminate the target area.

[0074] In step three, the characteristics of the object to be detected are clarified and an algorithm suitable for the object to be detected is selected. This solution requires an in-depth analysis of the image to understand its resolution, contrast, color distribution and other characteristics. Usually, high-resolution images can provide more detailed information, while low-contrast images may require more complex algorithms to distinguish objects from the background. This solution mainly uses template algorithms and edge algorithms, requires high-pass filtering and enhancement of images, uses the LOG algorithm and the second-order differential Laplace operator algorithm, selects the appropriate algorithm and optimizes it, can significantly improve the accuracy and efficiency of object detection, and provide solid technical support for various image processing tasks.

[0075] In step 4, the camera sensor converts the optical signal into an electrical signal, which is then uploaded to the controller for signal processing and comparative analysis. The camera's image sensor converts this continuous image information into discrete electrical signals. This process involves the conversion of analog signals to digital signals, which is achieved through an encoder that converts the optical signal into digital form. It compresses and encodes the image data to reduce storage space and speed up transmission. After receiving the electrical signal, the industrial computer further compares and processes it. This includes image preprocessing, feature extraction, pattern recognition and other operations to achieve analysis and understanding of the image content.

[0076] This embodiment uses a high-speed industrial camera to collect images. After receiving the image data through the image sensor, the image data is processed through various built-in ISP (Image Signal Processor) algorithms to convert it into a digital signal.

[0077] The digital signal completes the high-speed transmission of image data to the industrial computer through the GgeVision protocol.

[0078] The industrial computer receives the digital signal and sends a control signal to the controller, which then executes the control instruction accurately to adjust the lighting intensity and angle of the special front light source.

[0079] The industrial computer compares the collected image data with the preset standard image, detects the consistency of the monitoring points, counts and records qualified products, and alarms and records unqualified products.

[0080] In this embodiment, SGVision tools and AI cloud platform tools are used to perform AI training on the Markrab AI cloud platform. After the model file is generated, it can be imported into the SGVision AI module for direct reference for connection detection. Combined with the zero-code construction feature of SGVision, zero-code can be used to build offline machine vision applications to achieve full-process functions such as acquisition, detection (traditional + AI), communication, and data storage. In addition, it is difficult for a model to be trained to the best effect at one time, and it may be necessary to continuously expand data and tune in combination with the model evaluation report and verification results. Therefore, Markrab's AI cloud platform designs a model iteration function, that is, when the model training is completed, a latest version number will be generated, first V1, then V2... and so on. By adjusting the training data, algorithm and training parameters, multiple trainings can be performed to obtain better model effects. During the operation process, the visual program will request to store the data in the result once. After comparing the data, if the set conditions are met, the high level will be sent to the corresponding pin, and the coil connected to the controller as a driver will pass the screening. If the conditions are not met, the low level will be sent to the corresponding pin, and the screening will be recorded and failed, and the detailed data that failed will be uploaded and stored in the display.

[0081] The specific training process of the visual AI model includes:

[0082] 1) Algorithm selection: According to the specific requirements of the detection task, select a most suitable algorithm from the available algorithm library, such as connected domain analysis, edge detection or area measurement.

[0083] 2) ROI definition: Determine the region of interest (ROI) where the detection target is located, which may involve selecting the shape of the ROI (such as rectangle, circle, etc.) and defining its boundary vertices.

[0084] 3) ROI adjustment: According to the image content, adjust the position and size of the detection box to ensure that it accurately covers the target object.

[0085] 4) Color channel analysis: Use an image editor to observe the output of different color channels and select a channel with the highest contrast between the target and the background for use in subsequent steps.

[0086] 5) Preprocessing decision: If the image is noisy or unclear, determine whether a preprocessing step such as denoising or filtering is required.

[0087] 6) Gradient Decision: If you need to highlight the edges or changing areas in the image, select and apply a gradient detection algorithm.

[0088] 7) Binarization: Apply the binarization algorithm to convert the image into black and white to simplify the subsequent image analysis process.

[0089] 8) Parameter adjustment and result verification: Check the results of preprocessing and binarization by displaying the status, and adjust the algorithm parameters as needed to ensure the accuracy of the results.

[0090] 9) Morphological operations: Based on the image characteristics, decide whether to apply morphological operations, such as dilation and erosion, to remove noise or fill gaps in the target area.

[0091] 10) Connected Domain Analysis: Connected domain analysis is performed to identify and mark connected regions in the image, which helps in further region screening and feature extraction.

[0092] 11) ROI quantity control: Determine the number of detection boxes as needed to accommodate multiple targets or complex scenes in the image.

[0093] 12) Area filtering criteria setting: Set filtering criteria based on features such as area, length, height, and corresponding thresholds to filter out areas that meet the conditions.

[0094] 13) Multi-condition constraint setting: Use logical relationships (such as "and" or "or") to combine multiple filtering conditions to implement complex filtering logic.

[0095] 14) Debugging and optimization: By adjusting the algorithm parameters and filtering criteria, the detection results are continuously optimized until the task requirements are met.

[0096] 15) Result output: The final output of the detection result includes the location information (X, Y coordinates), area, width, height and offset of the area.

[0097] 16) Post-processing: Depending on the application requirements, some post-processing steps may be required, such as data logging, alarm triggering, or integration with automation systems.

[0098] After the above AI training, the final visual image effect in this embodiment is as follows: Figure 4 shown.

[0099] It should be noted that in actual applications, the following measures can be taken during debugging to improve the model processing effect:

[0100] (1) Perform multi-condition filtering. The system can apply multiple constraints to filter at the same time. For example, to detect the situation where the area is greater than 200 and the length is greater than 15 at the same time, it can be achieved by setting two filtering rules.

[0101] (2) You can set regional filtering rules, such as area or length, and set thresholds for these rules. For example, set filtering rule 1 to area and the threshold to 200.

[0102] (3) Multiple condition combinations can be set to identify anomalies, such as area greater than 200 and length greater than 15, or length greater than 20. This can be achieved by setting two area filtering rules, for example, rule 1 is length, the threshold is set to 15, and then the area criterion is set to greater than 200 and the length criterion is set to greater than 20.

[0103] (4) You can set thresholds for specific colors, such as the field center color threshold and the field width color threshold. These parameters may be used for color recognition or filtering. The width, height, and area of ​​the statistical area are output in real time. These data are crucial for analyzing and judging whether the packing process meets the specifications.

[0104] In addition, this embodiment needs to detect the certificate of conformity, handbag, anti-counterfeiting identifier and other monitoring points during image acquisition, and grayscale these collected images to obtain images of these detection objects. Since the collected images are often interfered by external factors, it is often necessary to improve the quality of the images to enhance the visual effect of the images. The ROI (i.e., information of interest) in a collected image is enhanced, and the Non-ROI (i.e., interference information or noise) is suppressed to improve the observability of the image, which is beneficial to the judgment of the computer. The image enhancement part is based on the second-order differential Laplace operator to produce a stronger response to details and individual points, and is isotropic, which allows it to maintain rotational invariance when processing images. Therefore, in image enhancement, it is more commonly used than the first-order gradient operator. Noise will be generated in the obtained image, so in order to obtain a better sharpening effect, filtering processing is also required, and the Gaussian-Laplacian operator, referred to as the LOG (laplacian of gauss) algorithm, appears. It is shaped like a straw hat, such as Figure 5 shown.

[0105] Algorithm content:

[0106] 1. Filtering algorithm: Perform Gaussian smoothing filtering on the original image f(x,y), that is:

[0107]

[0108] By convolving G(x,y) with the f(x,y) image, we can get a smooth image, namely:

[0109] g(x,y)=f(x,y)*G(x,y)

[0110] 2. Enhancement algorithm: Perform Laplace operation on the smoothed image, that is:

[0111]

[0112] Since the Laplace operation on the smoothed image g(x,y) is equivalent to the convolution of the Laplace operation of G(x,y) and f(x,y), we have:

[0113]

[0114] The formula is called LOG filter, which is:

[0115]

[0116] The LOG operator first performs Gaussian filtering on the image to remove noise that follows Gaussian distribution, and isolated noise points and small tissue structures are also filtered out; then Laplace sharpening is used to highlight the edge information of the image. Compared with the Laplace operator, the LOG operator effectively suppresses noise and has a better sharpening effect.

[0117] Through the image algorithm selection, after graying, smoothing filtering, edge detection, sharpening and other image enhancement processing, the processed image is transmitted to the industrial computer for corner extraction and feature matching, and finally the information of the monitoring point is compared with the preset standard image monitoring point information, thereby replacing the traditional manual recording and detection, and improving the quality and efficiency of detection.

[0118] In summary, this solution achieves high-efficiency and high-accuracy monitoring of the packing process by precisely adjusting image acquisition parameters, optimizing light sources, intelligent algorithm selection, efficient signal processing, and precise control execution, and can achieve a rejection rate of up to 99.99% and a false rejection rate of less than 0.3%. This solution can effectively improve the accuracy and completeness of packing, significantly reduce labor costs, improve production efficiency and product quality, and can well meet the needs of modern automated production.

Claims

1. A visual AI-based online packing quality monitoring system, characterized in that: It includes a digital industrial camera, an industrial computer, a controller and a front light source connected in sequence, wherein the controller is also connected to an actuator on a production line, and the digital industrial camera is used to capture an image of the inner area of ​​the packaging box directly from the top of the packaging box, and processes the image using a preset visual AI model; The industrial computer is used to compare and analyze the processed images to determine the detection results, and output corresponding control signals to the controller according to the detection results; The controller is used to control the working state of the actuator accordingly and adjust the working parameters of the front light source.

2. According to claim 1, a visual AI-based online packing quality monitoring system is characterized in that: The industrial computer is connected to a display and a memory, the display is used to display the current detection result in real time, and the memory is used to record the current detection result in real time.

3. A visual AI-based online packing quality monitoring method, applied to a visual AI-based online packing quality monitoring system as claimed in claim 1, characterized in that: The following steps are involved: S1. Adjust the parameters of the image acquisition area so that the boxed objects can be identified and measured in the image; S2. Adjust the parameters of the digital industrial camera and the working parameters of the front light source to achieve the best quality of the captured image; S3. Presetting a corresponding image processing algorithm in the digital industrial camera according to the characteristics of the object to be detected; S4. Use a digital industrial camera to collect images of the internal area of ​​the current packaging box, use a pre-trained visual AI model to process the images, and then transmit the processed images to an industrial computer; S5, the industrial computer compares the processed image with the corresponding standard image to determine the quality inspection result of the packaging. If the inspection result is unqualified, step S6 is executed, otherwise step S7 is executed; S6, the industrial computer outputs a control signal to the controller, and the corresponding control actuator removes the current packaging box from the production line; S7. The industrial computer outputs a control signal to the controller, and the corresponding control actuator completes the packing operation for the current packing box.

4. The method for online monitoring of packaging quality based on visual AI according to claim 3 is characterized in that: The image area parameters collected in step S1 include image resolution and field of view size.

5. The method for online monitoring of packing quality based on visual AI according to claim 4 is characterized in that: The specific process of step S1 is as follows: First determine the size and shape of the object; Then determine the maximum size of the object; Based on the maximum size of the object and the resolution of the camera, calculate the minimum required field of view: Among them, L is the maximum size of the object and f is the focal length of the camera lens.

6. The method for online monitoring of packing quality based on visual AI according to claim 3 is characterized in that: The working parameters of the front light source in step S2 include the light source position, angle and intensity, and the front light source adopts 3D structured light.

7. The method for online monitoring of packaging quality based on visual AI according to claim 3 is characterized in that: The image processing algorithm in step S3 includes a connected domain analysis algorithm, an edge detection algorithm or a region measurement algorithm, which is used to perform corresponding processing on the color features, shape features or edge features of the object to be detected.

8. The method for online monitoring of packing quality based on visual AI according to claim 7 is characterized in that: The process of the visual AI model processing the image in step S4 includes: ROI definition: determine the region of interest ROI where the detection target is located, select the shape of the ROI, and define its boundary vertices; ROI adjustment: adjust the position, size and number of detection boxes according to the image content to cover the target object and adapt to multiple targets or complex scenes in the image; Color channel analysis: Use an image editor to observe the output of different color channels and select the channel with the highest contrast between the target and the background; Preprocessing decision: If the image is noisy or unclear, perform denoising or filtering preprocessing; Gradient decision: If you need to highlight the edges or changing areas in the image, select and apply the gradient detection algorithm; Binarization: Apply the binarization algorithm to convert the image into black and white; Morphological operation: Based on the image characteristics, decide whether to apply morphological operations to remove noise or fill gaps in the target area; Connected Component Analysis: Perform connected component analysis to identify and label connected regions in an image. Area filtering: based on the preset filtering criteria and corresponding thresholds, filter out the areas that meet the conditions; Result output: Based on the preset multiple combined filtering conditions, the location information, area, width, height and offset of the area are output.

9. The method for online monitoring of packaging quality based on visual AI according to claim 3 is characterized in that: The step S4 specifically involves digitizing and compressing the processed image and then transmitting it to the industrial computer.

10. The method for online monitoring of packaging quality based on visual AI according to claim 3 is characterized in that: The specific process of step S5 is as follows: The industrial computer performs corner point extraction and feature matching analysis on the processed image, and verifies the consistency between the monitoring points in the image and the monitoring points in the preset standard image. If the verification passes, it indicates that the packaging quality inspection result is qualified, otherwise it fails.