A plastic packaging barrel online defect detection method and system based on machine vision and deep learning

By simultaneously triggering visible light and thermal image sensors, generating multimodal fusion maps, and combining them with deep learning models, the problem of missed defect detection caused by high light reflection and temperature drift on the surface of plastic packaging barrels is solved, achieving efficient defect detection and identification.

CN120726012BActive Publication Date: 2026-02-27JIANGSHAN XINBAIFENG PLASTIC PACKAGE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510909054.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2026-02-27
Estimated Expiration
2045-07-02

AI Technical Summary

Technical Problem

In existing technologies, there are problems such as high failure rate of defects caused by high light reflection artifacts on the surface of plastic packaging barrels and gradual temperature drift, and a sharp drop in the sensitivity of thermal feature recognition.

Method used

By controlling the visible light sensor and the thermal image sensor through a synchronous triggering mechanism, time-aligned image data is acquired, and dynamic range expansion and surface reflection suppression processing are performed to generate a multimodal thermal and visual fusion map. Combined with a deep learning model, topological contour features and temperature diffusion features are analyzed to identify defects on the surface of plastic packaging barrels.

Benefits of technology

It significantly reduces interference from high light reflection and temperature drift, improves the accuracy and sensitivity of defect detection, and enables precise identification and tracing of defects such as bubbles and cracks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120726012B_ABST
    Figure CN120726012B_ABST
Patent Text Reader

Abstract

The application provides a plastic packaging barrel online defect detection method and system based on machine vision and deep learning. In the application, visible light and thermal image data aligned in time on the surface of the plastic packaging barrel are collected, the dynamic range of the thermal image is first expanded to enhance the recognition, then the mapping relationship between the stable area of the thermal image and the reflection area of the visible light is used to compensate for the high light interference, and the surface reflection is suppressed; the processed dual-mode data is superimposed to generate a multi-modal fusion image, the temperature reference value of the fusion image is dynamically adjusted based on the material thermal conductivity and the line environment temperature, and the abnormal temperature area is located; finally, the topological contour and temperature diffusion features of the area are extracted, input into a deep learning model to determine the material structure attribute and spatial position of the defect, and online detection is completed. The application fuses thermal and visual data to enhance the perception ability of subtle structural defects, and significantly improves the precision and robustness of online detection of plastic packaging barrels in complex lighting environments.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of industrial automation quality inspection, and in particular to a plastic packaging barrel online defect detection method and system based on machine vision and deep learning. BACKGROUND

[0002] In the high-speed continuous production scene of the plastic packaging barrel automation production line, the detection of the fine structure defects (such as bubbles, impurities embedded, local uneven thickness, etc.) on the barrel surface needs to meet the millisecond-level real-time response requirement, and at the same time, three key interferences must be overcome: the high light pollution caused by the strong reflection of the plastic material, the thermal imaging feature drift caused by the temperature fluctuation of the production line environment, and the precise identification requirement of the defect physical properties (material structure abnormalities).

[0003] The current advanced scheme adopts a single-mode thermal imaging fusion time sequence analysis technology: the barrel surface temperature field distribution is captured by an infrared thermal imager, and is input into a deep learning model of a fusion convolutional neural network (CNN) and a long short-term memory network (LSTM), the former locates the temperature abnormal area, and the latter analyzes the time sequence features of thermal diffusion under continuous motion state to suppress the instantaneous environmental noise.

[0004] This scheme has two essential bottlenecks: first, the high-reflective area of the plastic surface produces an ultra-high temperature artifact in thermal imaging, such as a >150℃ instantaneous peak, which is coupled with the micro-scale thermal features of the real defects, resulting in the model mistakenly identifying the reflection noise as a defect, such as a measured missed detection rate of >18%; second, when the production line environment has a gradual temperature drift of more than ±5℃ / h, the LSTM time sequence analysis is difficult to distinguish between the systematic thermal shift and the local thermal diffusion features of the defects, resulting in a decrease in sensitivity. SUMMARY

[0005] The present application provides a plastic packaging barrel online defect detection method and system based on machine vision and deep learning, to solve the problem of high defect missed detection rate and sudden decrease in thermal feature recognition sensitivity caused by the coupling interference of high light reflection artifact and gradual temperature drift in the prior art.

[0006] In a first aspect, the present application provides a plastic packaging barrel online defect detection method based on machine vision and deep learning, comprising:

[0007] The visible light sensor and the thermal image sensor are controlled by a synchronous triggering mechanism to collect time-aligned visible light image data and thermal image data of the plastic packaging barrel surface, and the thermal image data is processed by dynamic range expansion to enhance the visual distinguishability of the temperature distribution;

[0008] The visible light image data is subjected to surface reflection suppression processing for compensation through a mapping relationship between a visible light reflection noise region and a thermal image stable region, and a high light region in the visible light image data is compensated according to temperature distribution information of the thermal image data;

[0009] The thermal image data after dynamic range expansion processing and the visible light image data after surface reflection suppression processing are superimposed and integrated to generate a multi-modal thermal and visual fusion image;

[0010] Based on the thermal conductivity of the plastic packaging barrel material, and combined with the production line environment temperature fluctuation state, the temperature reference value of the multi-modal thermal and visual fusion image is adjusted, the abnormal temperature region in the multi-modal thermal and visual fusion image under the temperature reference value is identified, and the topological contour feature and temperature diffusion feature of the abnormal temperature region are extracted;

[0011] The topological contour feature and the temperature diffusion feature are input into a deep learning neural network model to determine the material structure attribute and spatial position of the surface defect of the plastic packaging barrel, and the material structure attribute and spatial position information of the defect are output to realize online defect detection of the plastic packaging barrel.

[0012] Optionally, the topological contour feature and the temperature diffusion feature are input into a deep learning neural network model to determine the material structure attribute and spatial position of the surface defect of the plastic packaging barrel, and the material structure attribute and spatial position information of the defect are output, including:

[0013] According to the material thickness and defect size range of the plastic packaging barrel, a neural network model in deep learning is selected to support simultaneous processing of the total length of the boundary in the shape feature group, the area coverage and the shape regularity, and to support simultaneous processing of the temperature feature group;

[0014] The neural network model is pre-trained, and then the trained neural network model is used with labeled defect feature data, and the topological contour feature and the temperature diffusion feature are jointly used as input;

[0015] The neural network model is used to analyze the shape of the topological contour feature and the distribution mode of the temperature diffusion feature, and to determine the structure attribute of the defect according to whether the distribution mode meets the preset shape feature trigger condition and temperature feature verification condition.

[0016] Based on the analysis result, the classification identification of the structure attribute and the position coordinates of the defect on the surface of the plastic packaging barrel are output.

[0017] Optionally, based on the thermal conductivity of the plastic packaging barrel material, and combined with the production line environment temperature fluctuation state, the temperature reference value of the multi-modal thermal and visual fusion image is adjusted, including:

[0018] obtaining a monitoring value of a fluctuation state of an environment temperature of a production line in real time through a set temperature sensor;

[0019] analyzing material properties of the plastic packaging barrel, and setting a temperature correction factor based on the monitoring value according to an inherent thermal conductivity of the material in the material properties;

[0020] combining data of a multimodal thermal and visual fusion map, and calculating a temperature reference value through a preset calculation rule;

[0021] adjusting the temperature reference value based on a combination function of the inherent thermal conductivity and the temperature correction factor to obtain an adjusted temperature reference value;

[0022] updating temperature values in the multimodal thermal and visual fusion map according to the temperature reference value, so that all pixel values are realigned with reference to the temperature reference value.

[0023] Optionally, in the multimodal thermal and visual fusion map under the temperature reference value, an abnormal temperature area is identified, and topological contour features and temperature diffusion features of the abnormal temperature area are extracted, including:

[0024] analyzing temperature values in the multimodal thermal and visual fusion map, and calibrating an area where the temperature values deviate from the temperature reference value by a preset deviation as an abnormal temperature area;

[0025] boundary positioning is performed on an edge shape of the abnormal temperature area, edge pixel point coordinate sets are tracked, and topological contour features are obtained by converting the coordinate sets;

[0026] measuring a gradient change pattern of temperature values inside the abnormal temperature area from the center to the outside, and analyzing the gradient change pattern to obtain temperature diffusion features;

[0027] outputting a coordinate set of the topological contour features and a numerical sequence of the temperature diffusion features.

[0028] Optionally, the thermal image data after dynamic range expansion processing and the visible light image data after surface reflection suppression processing are superimposed and integrated to generate a multimodal thermal and visual fusion map, including:

[0029] converting the thermal image data into a first channel and the visible light image data into a second channel;

[0030] taking temperature values of the first channel and pixel values of the second channel as input sources, and performing superimposed integration according to the same pixel position;

[0031] Performing fusion calculation on the overlapped data by using a simple average method or a maximum value selection method, so that the multi-modal thermal and visual fusion map simultaneously embodies temperature information and visual information, and generates the multi-modal thermal and visual fusion map.

[0032] Optionally, the visible light image data is subjected to surface reflection suppression processing for compensation through a mapping relationship between a visible light reflection noise area and a thermal image stable area, including:

[0033] Extracting a highlight area in the visible light image data as a visible light reflection noise area, wherein a pixel value of the highlight area is higher than a preset brightness threshold value;

[0034] In the thermal image stable area, positioning a spatial position corresponding to the visible light reflection noise area;

[0035] Based on the spatial position, obtaining a temperature reference value from the thermal image stable area, establishing a corresponding conversion relationship between the pixel value of the visible light reflection noise area and the temperature reference value of the thermal image stable area, and obtaining a mapping compensation relationship composed of a linear conversion function;

[0036] Applying the mapping compensation relationship to adjust the pixel value of the visible light reflection noise area, so that the pixel value and the temperature reference value of the thermal image stable area remain coordinated and matched in the compensated image.

[0037] Optionally, the highlight area in the visible light image data is compensated according to temperature distribution information of the thermal image data, including:

[0038] Obtaining a temperature value corresponding to the highlight area in the visible light image data from the thermal image data;

[0039] Based on the temperature value, calculating a brightness adjustment coefficient of the highlight area, wherein the brightness adjustment coefficient is inversely proportional to the temperature value;

[0040] Applying the brightness adjustment coefficient to directly perform scaling operation compensation on the pixel value of the highlight area, ensuring that the compensated highlight area smoothly transitions in brightness with the non-highlight area, and eliminating reflection interference in the visible light image data.

[0041] In a second aspect, the application provides a plastic packaging barrel online defect detection system based on machine vision and deep learning, including:

[0042] The acquisition module is configured to control a visible light sensor and a thermal image sensor through a synchronous triggering mechanism, acquire time-aligned visible light image data and thermal image data of a plastic packaging barrel surface, and perform dynamic range expansion processing on the thermal image data to enhance the visual distinguishability of temperature distribution;

[0043] The compensation module is used to perform surface reflection suppression processing on the visible light image data by compensating for the noise region of visible light reflection and the stable region of thermal image through the mapping relationship between the visible light reflection noise region and the thermal image stable region, and to compensate for the highlight region in the visible light image data according to the temperature distribution information of the thermal image data;

[0044] The generation module is used to overlay and integrate the thermal image data after dynamic range expansion processing with the visible light image data after surface reflection suppression processing to generate a multimodal thermal and visual fusion map.

[0045] The identification module is used to adjust the temperature reference value of the multimodal thermal and visual fusion map based on the thermal conductivity of the plastic packaging barrel material and the temperature fluctuation of the production line environment. It identifies abnormal temperature areas in the multimodal thermal and visual fusion map under the temperature reference value and extracts the topological contour features and local temperature diffusion features of the abnormal temperature areas.

[0046] The output module is used to input the topological contour features and local temperature diffusion features into the neural network model, determine the material structure properties and spatial location of the defects on the surface of the plastic packaging barrel, and output the material structure properties and spatial location information of the defects to realize online defect detection of the plastic packaging barrel.

[0047] Thirdly, this application provides a computing device, including a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are invoked and executed by the processing component to implement the online defect detection method for plastic packaging barrels based on machine vision and deep learning as described in the first aspect above.

[0048] Fourthly, this application provides a computer storage medium storing a computer program, which, when executed by a computer, implements an online defect detection method for plastic packaging drums based on machine vision and deep learning as described in the first aspect.

[0049] The application ensures time alignment of visible light and thermal image data through a synchronous triggering mechanism, significantly reduces image misalignment interference caused by high-speed production line movement, performs dynamic range expansion processing on the thermal image, effectively enhances the distinguishability of subtle temperature distribution differences, compensates for high light areas using the mapping relationship between the thermal image stable area and the visible light reflection area, significantly suppresses the masking of real defects by surface reflection noise, generates a multimodal thermal and visual fusion image after fusion processing of the dual-mode data, fully fuses complementary information of material surface morphology and thermal conductivity characteristics, dynamically adjusts the temperature reference of the fusion image based on material thermal conductivity and environmental temperature, significantly improves the recognition stability of temperature abnormal areas under complex working conditions, jointly extracts the topological contour features and temperature diffusion features of abnormal areas, deeply decouples the physical structure essence and thermodynamic behavior of defects, and finally synchronously outputs the material structure attributes and spatial position information of defects through a deep learning model, comprehensively solving the detection failure problem under the interference of high reflectivity and temperature drift coupling.

[0050] Further, by selecting a neural network model supporting joint input of topological contour features (total boundary length / area of the region / shape regularity) and temperature diffusion features according to the material thickness and defect size, and using preset shape feature triggering conditions and temperature feature verification conditions for two-factor cross verification, the physical attributes of similar defects such as bubbles and cracks can be accurately distinguished. In the multi-layer composite structure scene of plastic packaging barrels, the recognition confusion rate of bubbles, such as rapid heat conduction caused by internal gas, and cracks, such as heat conduction blockage caused by material rupture, is greatly reduced compared to traditional single models, and the attribute tracing of the smallest micro-defects is supported.

[0051] These aspects or other aspects of the application will be more apparent in the following description of the embodiments. BRIEF DESCRIPTION OF DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiment or prior art description. Obviously, the drawings in the following description are some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0053] Figure 1 A flowchart of a plastic packaging barrel online defect detection method based on machine vision and deep learning provided by the application is shown;

[0054] Figure 2 A scene schematic diagram of a plastic packaging barrel online defect detection method based on machine vision and deep learning provided by the application is shown;

[0055] Figure 3A structural schematic diagram of a plastic packaging barrel online defect detection system based on machine vision and deep learning provided by the application is shown.

[0056] Figure 4 A structural schematic diagram of a computing device provided by the application is shown. DETAILED DESCRIPTION

[0057] In order to enable personnel in the technical field to better understand the scheme of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0058] In some processes described in the specification and claims of the present application and the above-described drawings, a plurality of operations appearing in a specific order are included, but it should be clearly understood that these operations can be executed or in parallel without the order in which they appear in the text, and the serial numbers of the operations, such as 101, 102, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes can include more or fewer operations, and the operations can be executed in sequence or in parallel. It should be noted that the "first", "second", etc. in the text are used to distinguish different messages, devices, modules, etc., and do not represent the order, nor do "first" and "second" represent different types.

[0059] In the field of high-speed online detection of plastic packaging barrels, there are two key bottlenecks in the existing single-modal thermal imaging technology: on the one hand, the strong reflection of the plastic surface forms a super-high temperature artifact in the thermal image, which is seriously coupled with the real defect thermal characteristics, resulting in systematic missed detection of bubble, impurity and other structural defects in the high-reflectivity area; on the other hand, when the production line environment temperature gradually drifts, the thermal diffusion timing model cannot effectively distinguish between background temperature drift and defect characteristics, resulting in a cliff-like attenuation of the recognition sensitivity of crack-type linear defects. The superimposed effect of these two types of interference is essentially a material structure defect tracing failure caused by the lack of single data modal and environmental adaptability mechanism.

[0060] In view of the defect detection and misjudgment problem caused by coupling of high light reflection artifact and temperature drift interference in the prior art, the application innovatively proposes a dynamic decoupling mechanism based on visible light-thermal imaging dual-mode cooperation: firstly, high light area is compensated in real time through physical mapping of thermal image stable area and visible light reflection noise (breaks reflection pollution), and the temperature reference of the fusion image is dynamically calibrated based on material thermal conductivity and environmental temperature fluctuation (cuts off temperature drift interference); then a multi-modal fusion image after reflection suppression and thermal expansion processing is generated, and abnormal area topological contour features (morphological structure) and temperature diffusion features (thermodynamic behavior) are extracted synchronously; finally, the deep learning model is used for joint analysis of the two features, and the material structure attributes such as bubbles, cracks and impurities and their sub-millimeter level spatial positions are accurately output, which systematically solves the defect essence recognition failure problem of plastic packaging barrels in strong reflection light and gradually changing temperature drift environment, and realizes the synchronous and accurate detection of physical property tracing and position positioning.

[0061] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the application.

[0062] Figure 1 A flowchart of a plastic packaging barrel online defect detection method based on machine vision and deep learning is provided for the embodiments of the application, as shown in Figure 1 The method comprises the following steps.

[0063] 101. The visible light sensor and the thermal image sensor are controlled by a synchronous triggering mechanism to collect time-aligned visible light image data and thermal image data of the surface of the plastic packaging barrel, and the thermal image data is processed by dynamic range expansion to enhance the visual distinguishability of temperature distribution.

[0064] In the above scheme, the synchronous triggering mechanism refers to a technical means of starting the data collection of the visible light sensor and the thermal image sensor at the same time through a unified electronic signal; time alignment refers to that the two sensors complete image capture within one thousandth of a second to ensure that the positions of the photographed objects are completely consistent; dynamic range expansion processing is a process of amplifying the original temperature difference in the thermal image through mathematical methods, so that the human eye or computer can clearly identify the subtle temperature changes.

[0065] In this embodiment, firstly, a central controller sends synchronously triggered pulse signals to the visible light sensor and the thermal image sensor to ensure that both start capturing images simultaneously within a thousandth of a second. For example, when a conveyor belt transports a plastic bucket past the detection station at a speed of 1.5 meters per second, the photoelectric switch detects the bucket's position and immediately issues a command. While the visible light camera captures a surface texture image, the thermal imager captures a temperature distribution map of the corresponding area, ensuring that the buckets in the two images are perfectly aligned in time, avoiding misalignment due to movement. Secondly, the thermal image undergoes dynamic range expansion processing: firstly, the highest and lowest temperature values ​​of the entire image are identified, for example, the measured bucket surface temperature range is 28.1℃ to 32.8℃; then, a linear transformation formula is used to proportionally map the original temperature range to a visual scale range of 0-100℃. For example, a pixel with an original temperature of 29.6℃ will be reassigned a value of 38.3 units after calculating its correspondence with the new temperature range; finally, an enhanced thermal image with significantly improved visual contrast is generated, making the originally minute temperature difference of only 0.5℃ present a clear grayscale step change.

[0066] In practical application, this step is implemented in the plastic packaging drum production line at location A. When the conveyor belt transports the packaging drums to the detection area at standard speed, the trigger unit simultaneously activates two types of sensors to complete synchronous imaging. The measured thermal image shows that the temperature distribution of a certain drum surface is between 29.2℃ and 33.5℃. The system automatically maps the lowest temperature of 29.2℃ to 0 units and the highest temperature of 33.5℃ to 100 units. For example, the original temperature of the central area of ​​the drum surface is 31.0℃, which is displayed as 48.8 units after calculation and mapping. After this conversion, the originally invisible temperature anomaly areas, such as the temperature difference at the edge of a microbubble with a diameter of 1 mm, are transformed into obvious annular color band differences.

[0067] This solution eliminates image misalignment caused by high-speed motion through hardware synchronous control, and then enhances the thermal image by expanding the temperature range, transforming the originally imperceptible subtle temperature differences into clear image grayscale levels, providing a visualized thermal distribution basis for subsequent identification of material structural defects.

[0068] 102. Perform surface reflection suppression processing on the visible light image data to compensate for the mapping relationship between the visible light reflection noise region and the thermal image stable region, and compensate for the highlight region in the visible light image data according to the temperature distribution information of the thermal image data;

[0069] Optionally, step 102 may specifically include the following steps:

[0070] 1021. Extract the highlight region from the visible light image data as the visible light reflection noise region, wherein the pixel value of the highlight region is higher than a preset brightness threshold;

[0071] 1022、In the thermal image stable area, the spatial position corresponding to the visible light reflection noise area is located;

[0072] 1023、Based on the spatial position, a temperature reference value is obtained from the thermal image stable area, a corresponding conversion relationship between the pixel value of the visible light reflection noise area and the temperature reference value of the thermal image stable area is established, and a mapping compensation relationship composed of a linear conversion function is obtained;

[0073] 1024、The mapping compensation relationship is applied to adjust the pixel value of the visible light reflection noise area, so that the pixel value and the temperature reference value of the thermal image stable area remain coordinated and matched in the compensated image.

[0074] 1025、From the thermal image data, a temperature value corresponding to the highlight area in the visible light image data is obtained;

[0075] 1026、Based on the temperature value, a brightness adjustment coefficient of the highlight area is calculated, wherein the brightness adjustment coefficient is inversely proportional to the temperature value;

[0076] 1027、The brightness adjustment coefficient is applied to directly compensate the scaling operation of the pixel value of the highlight area, to ensure that the compensated highlight area is smoothly transitioned in brightness with the non-highlight area, and the reflection interference is eliminated in the visible light image data.

[0077] In the above scheme, the visible light reflection noise area refers to the over-bright white patch area formed by the reflection of the plastic surface in the visible light image; the thermal image stable area refers to the uniform material area in the thermal imaging image with a temperature fluctuation of less than ±0.5℃; the mapping compensation relationship refers to the conversion rule of the high light brightness value and the thermal image temperature established by a mathematical function; the brightness adjustment coefficient is a pixel value scaling factor calculated according to the thermal image temperature, which is used to reduce the exposure intensity of the over-bright area.

[0078] The embodiment of the present application first automatically identifies the area with abnormally high brightness, i.e. the highlight area, in the visible light image data through an image analysis algorithm, as the reflection noise area, i.e. when the pixel brightness value of some position on the surface of the plastic packaging barrel exceeds the set threshold value, the system marks it as a highlight interference point. For example, there is a bright white patch with a diameter of 5 mm on the surface of the barrel due to strong light irradiation, and the center brightness reaches 245, where the range is 0-255, which is much higher than the brightness value 180 of the normal area around it. At this time, the system accurately frames the overexposure area. Then, the stable area in the time-aligned thermal image is used to find the corresponding temperature distribution area at the same spatial position. Based on the spatial position, the system detects the temperature fluctuation in the 3x3 pixel range around the corresponding area and selects the stable area with a temperature change less than 0.5°C as the temperature reference value. For example, it is detected that the temperature of the bright spot in the corresponding position of the thermal image is 34.8°C, and the average temperature of the surrounding stable area is 31.5°C. At this time, 31.5°C will be used as the compensation reference value. Then the brightness and temperature conversion relationship is established: based on the temperature reference value of the thermal stable area and the actual temperature difference of the highlight area, the brightness adjustment ratio is calculated. The compensation is realized by the linear conversion formula "new brightness = original brightness x (reference temperature / actual temperature)". For example, the original brightness of the highlight point is 240, the corresponding temperature of the thermal image is 34.8°C, and the reference temperature is 31.5°C. Therefore, the adjusted brightness is 240x(31.5 / 34.8)≈217. This calculation process is applied to the entire highlight area pixel by pixel, so that the original dazzling bright spot is changed to a gray scale similar to the surrounding material, like restoring the overexposed flash photo to natural light effect. In an optional implementation, the system directly calculates the temperature offset and generates a brightness adjustment coefficient. For example, when the temperature of the highlight area 34.8°C and the reference temperature 31.5°C differ by 3.3°C, the brightness adjustment coefficient is calculated by the formula "1 / (1+temperature difference)", which is 0.23, i.e. 1 / (1+3.3)≈0.23. Then the original brightness 240 is multiplied by the brightness adjustment coefficient to become 55.2. The compensation of the scaling operation on the pixel value of the highlight area ensures that the highlight area after compensation is smoothly transitioned in brightness with the non-highlight area, and the reflection interference is eliminated in the visible light image data. Finally, the image equalization processing makes the details of the area appear. After the whole process is completed, the scratches or bubble structures on the barrel surface that were hidden by strong light are clearly revealed.

[0079] In practical application, in the quality inspection link of plastic packaging barrels of enterprise A, when the barrel surface forms a high light area with a diameter of 5 mm due to strong light irradiation, the system first extracts the pixel area with brightness exceeding 220 in the visible light image and marks it as a reflection noise area; then, a stable area with temperature fluctuation less than 0.4℃ is positioned around the same position of the synchronous thermal image, and the average temperature of the stable area is measured as 32.0℃ as a reference benchmark; a linear conversion function "new brightness = original brightness x (32.0 / actual temperature)" is established, and the original brightness 238 of the high light point is compensated and calculated: 238 x (32.0 / 36.5)≈209; at the same time, the temperature 36.5℃ of the corresponding position of the thermal image is read through the alternative scheme, the temperature difference 4.5℃ from the benchmark value is calculated, the scaling coefficient 1 / (1+4.5)≈0.18 is generated, the same point brightness is adjusted to 238 x 0.18≈43, and then it is corrected to a reasonable value through gray scale equalization; finally, after all the high light spots are eliminated, the 3 bubble defects with a diameter of 0.3 mm originally hidden by strong reflection are clearly displayed.

[0080] The scheme generates a pixel compensation strategy dynamically through intelligent detection of high light area and accurate mapping of thermal physical information, effectively eliminates the shielding effect of plastic surface reflection pollution on the true structure, restores the micro-defect features swallowed by strong light, and at the same time, completely retains the material texture of non-interference area, providing distortion-free data basis for defect physical property analysis.

[0081] 103、Superimpose and integrate the thermal image data after dynamic range expansion processing and the visible light image data after surface reflection suppression processing to generate a multi-modal thermal and visual fusion image;

[0082] Optionally, step 103 can specifically include the following steps:

[0083] 1031、Convert the thermal image data into a first channel, and convert the visible light image data into a second channel;

[0084] 1032、Take the temperature value of the first channel and the pixel value of the second channel as input sources to perform overlapping integration according to the same pixel position;

[0085] 1033、Perform fusion calculation on the overlapped data by using a simple average method or a maximum value selection method, so that the multi-modal thermal and visual fusion image simultaneously reflects temperature information and visual information, and the multi-modal thermal and visual fusion image is generated.

[0086] In the above scheme, the multi-modal thermal and visual fusion image refers to a composite image generated by combining thermal imaging temperature information and visible light texture information; channel conversion is the process of converting thermal image data into a temperature value channel, i.e., the first channel, and converting visible light data into a gray value channel, i.e., the second channel; overlapping integration refers to matching and superimposing pixel values at the same coordinate positions of the two channels; and fusion calculation is an operation of combining the two-channel information into a single image by a mathematical method, such as taking the average of the two channels or taking the maximum value of the two channels.

[0087] In the embodiment of the present application, the thermal image data after dynamic range expansion processing is first converted into a temperature value matrix of the first channel, where the numerical value of each pixel point represents the expanded temperature intensity, for example, the original temperature of 32°C at the position of the barrel surface is represented as 80 unit numerical value after mapping. At the same time, the visible light image after surface reflection suppression processing is converted into a gray value matrix of the second channel, for example, the gray value at the same position after processing is 125. Then, all the pixel points of the two channels are superimposed according to the one-to-one correspondence of the coordinates: when the simple average method is used, the gray value of the second channel is first adjusted to the same numerical range as the first channel, for example, the 125 gray value is adjusted to about 49 units, and then the fusion value of this point is calculated as the average of 80 and 49, which is 64.5; if the maximum value selection method is used, the higher value in the two channels is directly selected as the fusion result, for example, the temperature value of 80 units. Finally, the fusion calculation results of all the pixel points are integrated to generate a composite image, so that the surface of the plastic barrel not only presents the characteristics of the high temperature region, but also clearly displays the texture details, for example, the surface scratches originally covered by the high temperature signal present a mixed feature form in the average method.

[0088] In actual application, in the online detection system of plastic packaging barrel production enterprise A, for the target region of the barrel surface, the thermal image data after dynamic range expansion is first converted into a temperature feature channel, i.e., the first channel, for example, the original temperature value of 33°C at a point on the barrel surface is mapped to 85 units after expansion; the visible light image data after reflection suppression processing is converted into a gray feature channel, i.e., the second channel, and the gray value at the same point is 215; through accurate coordinate matching, the two channels are overlapped and integrated, the gray value of the light channel is normalized using the simple average method, for example, 215 ÷ 2.55 ≈ 84 units, and then the fusion value of this point is calculated as (85+84) ÷ 2 = 84.5 units; if the maximum value method is used, 85 units is directly selected as the fusion result; in the finally generated fusion image, the 0.3 mm micro-crack originally covered by the high temperature signal on the barrel wall is clearly presented due to the 84.5 unit composite feature value, and the material layering structure in the reflective region of the barrel bottom is visualized and identified through the 85 unit high temperature signal, which completely retains the cooperative features of temperature abnormalities and surface topography.

[0089] The scheme generates a composite image with temperature anomaly characteristics and surface morphology details by unifying and intelligently fusing the scales of thermal and optical information, effectively breaking through the perception limitations of single detection mode, and providing key information foundation for cross-dimensional collaborative identification of physical defects.

[0090] 104. Based on the thermal conductivity of the plastic packaging barrel material, and combined with the production line environment temperature fluctuation state, adjust the temperature reference value of the multi-modal thermal and visual fusion image, identify the abnormal temperature area in the multi-modal thermal and visual fusion image under the temperature reference value, and extract the topological contour feature and temperature diffusion feature of the abnormal temperature area;

[0091] Optionally, step 104 can specifically include the following steps:

[0092] 1041. Real-time acquisition of the monitoring value of the production line environment temperature fluctuation state through the set temperature sensor;

[0093] 1042. Analyze the material characteristics of the plastic packaging barrel, and set a temperature correction factor based on the monitoring value according to the inherent thermal conductivity of the material in the material characteristics;

[0094] 1043. Combined with the data of the multi-modal thermal and visual fusion image, the temperature reference value is calculated through the preset calculation rule;

[0095] 1044. Based on the combination function of the inherent thermal conductivity and the temperature correction factor, adjust the temperature reference value to obtain the adjusted temperature reference value;

[0096] 1045. Update the temperature value in the multi-modal thermal and visual fusion image according to the temperature reference value, so that all pixel values are re-aligned with reference to the temperature reference value.

[0097] 1046. Analyze the temperature value in the multi-modal thermal and visual fusion image, and mark the area where the temperature value deviates from the temperature reference value by a preset deviation as an abnormal temperature area;

[0098] 1047. Boundary positioning is performed on the edge shape of the abnormal temperature area, and the edge pixel point coordinate set is tracked to obtain the topological contour feature by converting the coordinate set;

[0099] 1048. Measure the gradient change pattern of the temperature value inside the abnormal temperature area from the center to the outside, and analyze the gradient change pattern to obtain the temperature diffusion feature;

[0100] 1049. Output the coordinate set of the topological contour feature and the numerical sequence of the temperature diffusion feature.

[0101] In the above scheme, the temperature reference value refers to the reference standard line used to judge temperature anomalies; the temperature correction factor is an adjustment coefficient calculated based on the thermal conductivity of the material and environmental changes; the topological profile feature refers to the boundary shape description of the abnormal temperature region; and the temperature diffusion feature refers to the gradient change law of heat transfer from the anomaly center to the outside.

[0102] In this embodiment, the ambient temperature fluctuation is first monitored in real time using a temperature sensor in the production line environment. For example, if the temperature in the production workshop is detected to be 3.5°C higher than the standard operating conditions, the thermal conductivity parameters of the container model are retrieved from a pre-stored database of plastic packaging drum materials, such as the thermal conductivity parameter of HDPE material being 0.42 W / m·K. A temperature correction factor is then calculated based on the material's thermal conductivity and the ambient temperature rise data. The specific formula is: Correction factor = 1 - (Temperature rise × Thermal conductivity) ÷ Reference constant. For example, when the temperature rise is 3.5℃ and the thermal conductivity is 0.42, if the reference constant is set to 30, the correction factor is calculated as 1 - (3.5 × 0.42) / 30 ≈ 0.95. Then, the median of the temperature distribution in the multimodal fusion map is read as the initial reference value, such as 68 units. After adjusting the formula, the calibrated temperature reference value is calculated as 68 × 0.95 ≈ 64.6 units. Subsequently, all pixel values ​​in the multimodal thermal and visual fusion map are updated by subtracting the calibrated temperature reference value from the original temperature value to achieve data alignment. For example, the original temperature of a region of 72 units is updated to an offset value of 72 - 64.6 = 7.4 units. After temperature baseline calibration is completed, the system scans the updated fused image and identifies all areas where the temperature offset exceeds a set threshold. For example, areas with a temperature offset of ±5 units are marked as abnormal temperature areas. For instance, the system detects that the shoulder area of ​​a container maintains an offset of +12.3 units. Then, the abnormal temperature areas are processed by boundary tracking. The edge detection algorithm connects the points one by one to form a set of closed contour coordinates. For example, tracking a bubble defect yields a near-circular contour composed of 126 coordinate points, and its geometric features are encoded as topological contour features. Next, the temperature diffusion gradient from the center to the periphery of the abnormal temperature area is measured. Temperature values ​​are sampled at millimeter intervals to form a numerical sequence. For example, 12.3 units at the center, 9.2 units at 1 mm from the center, 3.7 units at 2 mm, and 0 units at the edge, forming a temperature diffusion feature sequence of [12.3, 9.2, 3.7, 0]. Finally, the system outputs the topological contour coordinate set and the temperature gradient data package representing the numerical sequence of the temperature diffusion features, realizing a complete quantitative expression of the physical characteristics of the defect.

[0103] In practical applications, the detection system on the plastic packaging drum production line detected an ambient temperature increase of 4℃ and simultaneously obtained the thermal conductivity parameter of PP, the material of the current batch of containers, as 0.24 W / m·K. The system calculated a correction factor of 1 - (4 × 0.24) / 30 ≈ 0.97; read the median temperature of 70 units from the fusion image, and adjusted the baseline value to 70 × 0.97 = 67.9 after calibration; after updating the pixel values ​​of the fusion image, a temperature shift of +15.6 units (exceeding the threshold ±6) was detected in a certain area at the bottom of the drum, which was marked as an abnormal area; 189 coordinate points of a near-circular contour with a diameter of 2.8 mm were obtained through boundary tracking; the diffusion sequence of temperature gradient sampling [15.6, 12.1, 7.8, 1.3, 0] was recorded; the output data was used for subsequent defect classification analysis.

[0104] This solution updates the temperature baseline in real time through an adaptive calibration mechanism based on material physical properties and environmental conditions, effectively eliminating the interference of environmental fluctuations on defect detection. Combined with dual-dimensional quantitative analysis of geometric profile and thermal diffusion characteristics, it provides a physical basis for the accurate identification of different types of defects, such as bubbles, cracks, and impurities.

[0105] 105. Input the topological contour features and the temperature diffusion features into a deep learning neural network model to determine the material structure properties and spatial location of the defects on the surface of the plastic packaging barrel, and output the material structure properties and spatial location information of the defects to realize online defect detection of the plastic packaging barrel.

[0106] Optionally, step 105 may specifically include the following steps:

[0107] 1051. Based on the material thickness and defect size range of the plastic packaging barrel, select a deep learning neural network model that satisfies the requirements of supporting the simultaneous processing of the total boundary length, region coverage area, and shape regularity of the shape feature group, as well as supporting the simultaneous processing of the temperature feature group.

[0108] 1052. The neural network model is pre-trained, and then labeled defect feature data is used on the trained neural network model, with topological contour features and temperature diffusion features combined as input;

[0109] 1053. Analyze the shape of the topological contour features and the distribution pattern of the temperature diffusion features using the neural network model, and determine whether the defect is a bubble or a crack based on whether the distribution pattern meets the preset shape feature triggering conditions and temperature feature verification conditions.

[0110] 1054. Based on the analysis results, output the classification identifier of the structural attribute and the position coordinates of the defect on the surface of the plastic packaging barrel.

[0111] In the above scheme, the total boundary length refers to the total distance of the connecting line of the pixel points on the edge of the defect area profile; the area coverage is the total number of pixels occupied by the defect area; the shape regularity describes the degree of the profile approaching the standard geometric shape, such as a circle with a value of 1 and an irregular shape approaching 0; the temperature diffusion feature records the numerical sequence of the temperature decay from the abnormal center to the outside; the shape feature trigger condition refers to the requirement that the neural network judges that the bubble needs to meet the circular profile, the regularity is greater than 0.8, and the symmetric boundary; the temperature feature verification condition refers to the requirement that the bubble needs to have a high temperature at the center and a uniform temperature pattern, such as a smooth temperature difference drop.

[0112] In the embodiment of the present application, first, a neural network structure suitable for the common material thickness range and typical defect size of plastic packaging barrels is selected, for example, a fully connected neural network model with double branch input is selected for a barrel wall thickness of 1.5 to 4 mm and a defect size of 0.1 to 5 mm. The neural network model has the ability to simultaneously process the total boundary length, area coverage, shape regularity of the shape feature group, and the temperature feature group. Then, the neural network model is pre-trained using a historical labeled defect data set, for example, 2000 groups of labeled defect features are input to optimize the weights, so that the neural network model masters typical feature combinations of bubbles such as circular profile, uniform temperature diffusion, and linear profile of cracks, and local high temperature aggregation patterns. Then, the topological profile features and temperature diffusion features obtained online are jointly input into the trained neural network model, for example, an abnormal temperature area input boundary length 35 pixels, area 120 pixels², shape regularity 0.88, and temperature gradient sequence feature parameters. The trained neural network model analyzes and determines that the feature conditions of the bubble are met, that is, the shape regularity is greater than 0.8 and the temperature uniformly decreases from the center to the edge, through the activation function. Finally, the material structure attribute classification identifier of the corresponding defect is output, such as bubble category code C005 and its spatial position coordinates on the surface of the plastic packaging barrel.

[0113] In actual application, the detection system of a medium-sized plastic packaging barrel production line extracts the total boundary length 42 pixels, the area 95 pixels², the shape regularity 0.92, and the temperature diffusion sequence of the abnormal area on the barrel bottom. After receiving the feature group, the pre-trained neural network model analyzes and determines that the shape regularity exceeds the threshold value of 0.8 and the temperature gradient presents a smooth decay mode with high center and low edge, meeting the preset bubble determination condition. The system outputs the bubble attribute identifier and spatial coordinate information, which is verified on site as a 1.2 mm diameter bubble defect with a coordinate positioning error of less than 0.3 mm.

[0114] The present scheme realizes the essence identification of the material structure defects of the plastic packaging barrel under complex working conditions through the intelligent analysis of the neural network model on the two-dimensional geometry and thermodynamic features of the material, accurately determines the physical attribute category of the defect, and locates the spatial position.

[0115] Figure 2 A scene diagram of a plastic packaging barrel online defect detection method based on machine vision and deep learning is provided for an embodiment of the present application, as shown in Figure 2 For a complete embodiment of steps 101-105, it includes:

[0116] In the online detection system of the plastic packaging barrel C production line, when the conveying belt transports the container through the detection station, the system first controls the visible light camera and the thermal imager to complete the time alignment of image acquisition within 0.5 milliseconds through a synchronous triggering mechanism (101), and performs dynamic range expansion processing on the thermal image: detects the barrel surface temperature range 28.1-32.8℃ (temperature difference 4.7℃), and through linear mapping, the lowest temperature 28.1℃ corresponds to 0 unit, and the highest temperature 32.8℃ corresponds to 100 units, so that the original 30.0℃ area is converted by (30.0-28.1)×(100 / 4.7)≈40.4 units, and the temperature recognition degree is significantly enhanced (101); then the visible light image is subjected to reflection suppression processing: identifying the 6mm diameter bright spot (brightness 248) on the barrel shoulder, based on the difference between the stable zone temperature 31.8℃ and the highlight zone temperature 35.6℃ of the thermal image, the main compensation scheme is used to calculate 248×(31.8 / 35.6)≈221 to adjust the brightness (102); then the processed dual-mode data is superimposed to generate a fusion image: the thermal channel point value 85 units and the light channel normalized value 84 are superimposed, and the average method is used to obtain the fusion value 84.5 units (103); then based on the material thermal conductivity (PP material 0.24 W / m·K) and the environmental temperature rise 4℃, the temperature reference value is adjusted to 67.9 units, the +15.6 offset area of the barrel bottom is identified (104), and the 2.8mm diameter circular contour and temperature gradient sequence are extracted; finally, the topological contour and temperature diffusion characteristics are input into the pre-trained neural network, the model determines it as a bubble defect according to the shape regularity 0.92 and uniform temperature decay, and outputs the material attribute identification and spatial positioning coordinates (105), and the actual measurement is a 1.2mm diameter bubble with a positioning error less than 0.3mm.

[0117] The method solves the core problem of high light interference and environmental temperature drift coupling and superposition in online detection of plastic packaging barrels through multi-modal data collaborative processing and dynamic compensation mechanism. First, the physical mapping relationship between visible light and thermal imaging is used to break the shielding of surface details by light pollution. Second, based on the material thermal conductivity and environmental state, the temperature reference value is dynamically calibrated to eliminate the interference of gradual temperature drift on abnormal area identification. Then, the generated fusion image synchronously contains material thermodynamic behavior and surface topography features, making the physical nature of defects such as bubbles, cracks, and impurities fully presented. Finally, with the help of deep learning model, the joint analysis of geometric topology and temperature diffusion features breaks through the limitations of traditional single-mode detection on material structure properties, and realizes the precise judgment and sub-millimeter spatial positioning of defect physical nature such as bubbles, cracks, and impurities under high-speed production line conditions, significantly improving the detection reliability and process consistency in complex lighting and temperature fluctuation scenarios.

[0118] Figure 3 A structure diagram of a plastic packaging barrel online defect detection system based on machine vision and deep learning is provided for the embodiments of the present application, as shown in Figure 3 The system comprises:

[0119] The acquisition module 31 is used to control the visible light sensor and the thermal image sensor through a synchronous triggering mechanism to acquire time-aligned visible light image data and thermal image data of the surface of the plastic packaging barrel, and to perform dynamic range expansion processing on the thermal image data to enhance the visual distinguishability of temperature distribution.

[0120] The compensation module 32 is used to perform surface reflection suppression processing on the visible light image data through the mapping relationship between the visible light reflection noise area and the thermal image stable area, and to compensate the high light area in the visible light image data according to the temperature distribution information of the thermal image data.

[0121] The generation module 33 is used to superimpose and integrate the thermal image data after dynamic range expansion processing and the visible light image data after surface reflection suppression processing to generate a multi-modal thermal and visual fusion image.

[0122] The identification module 34 is used to adjust the temperature reference value of the multi-modal thermal and visual fusion image based on the thermal conductivity of the plastic packaging barrel material and the temperature fluctuation state of the production line environment, identify the abnormal temperature area in the multi-modal thermal and visual fusion image under the temperature reference value, and extract the topological contour features and local temperature diffusion features of the abnormal temperature area.

[0123] The output module 35 is configured to input the topological contour feature and the local temperature diffusion feature into a neural network model, determine material structure attributes and spatial positions of surface defects of the plastic packaging barrel, output material structure attribute and spatial position information of the defects, and realize online defect detection of the plastic packaging barrel.

[0124] Figure 3 The plastic packaging barrel online defect detection system based on machine vision and deep learning can perform Figure 1 The plastic packaging barrel online defect detection method based on machine vision and deep learning of the embodiment has the same implementation principles and technical effects as the plastic packaging barrel online defect detection system based on machine vision and deep learning. The specific operation modes of each module and unit of the plastic packaging barrel online defect detection system based on machine vision and deep learning in the above embodiment have been described in detail in the embodiment related to the method, and will not be described in detail here.

[0125] In one possible design, Figure 3 The plastic packaging barrel online defect detection system based on machine vision and deep learning of the embodiment can be implemented as a computing device, such as Figure 4 The computing device can include a storage component 41 and a processing component 42.

[0126] The storage component 41 stores one or more computer instructions, wherein the one or more computer instructions are called and executed by the processing component 42.

[0127] The processing component 42 is configured to perform the above Figure 1 The plastic packaging barrel online defect detection method based on machine vision and deep learning of the embodiment.

[0128] The processing component 42 can include one or more processors to execute computer instructions to complete all or part of the steps in the above method. Of course, the processing component can also be one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components, for executing the above method.

[0129] The storage component 41 is configured to store various types of data to support the operation of the terminal. The storage component can be realized by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0130] Of course, the computing device can also include other components, such as input / output interfaces, display components, communication components, etc.

[0131] The input / output interface provides an interface between the processing component and peripheral interface modules, which can be output devices, input devices, etc.

[0132] The communication component is configured to facilitate wired or wireless communication between the computing device and other devices, etc.

[0133] The computing device can be a physical device or an elastic computing host provided by a cloud computing platform, and the computing device can be a cloud server, and the processing component, the storage component, etc. can be a basic server resource rented or purchased from the cloud computing platform.

[0134] The embodiment of the application also provides a computer storage medium storing a computer program, and the computer program can implement the above-mentioned Figure 1 A plastic packaging barrel online defect detection method based on machine vision and deep learning is provided.

[0135] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-mentioned system, device and unit can refer to the corresponding process in the foregoing method embodiment, and will not be repeated here.

[0136] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment scheme according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0137] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and the necessary general hardware platform, and of course, can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of software products, which can be stored in a computer readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and include a plurality of instructions to make a computer device (which can be a personal computer, a server, etc.) execute the methods described in each embodiment or some parts of the embodiments.

[0138] Finally, it should be noted that the above examples are only used to illustrate the technical solutions of the present application, and are not intended to limit the same; although the present application has been described in detail with reference to the foregoing examples, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for online defect detection of plastic packaging drums based on machine vision and deep learning, characterized in that, include: The visible light sensor and the thermal image sensor are controlled by a synchronous triggering mechanism to collect time-aligned visible light image data and thermal image data of the surface of the plastic packaging barrel, and the thermal image data is subjected to dynamic range expansion processing to enhance the visual recognition of temperature distribution. The visible light image data is subjected to surface reflection suppression processing to compensate for the mapping relationship between the visible light reflection noise region and the thermal image stable region, and the highlight region in the visible light image data is compensated according to the temperature distribution information of the thermal image data. The thermal image data after dynamic range expansion processing is superimposed and integrated with the visible light image data after surface reflection suppression processing to generate a multimodal thermal and visual fusion map; Based on the thermal conductivity of the plastic packaging barrel material, and combined with the temperature fluctuation of the production line environment, the temperature reference value of the multimodal thermal and visual fusion map is adjusted. Abnormal temperature areas are identified in the multimodal thermal and visual fusion map under the temperature reference value, and the topological contour features and temperature diffusion features of the abnormal temperature areas are extracted. The topological contour features and the temperature diffusion features are input into a deep learning neural network model to determine the material structure properties and spatial location of surface defects in plastic packaging barrels, and output the material structure properties and spatial location information of the defects to achieve online defect detection of plastic packaging barrels. The surface reflection suppression processing, which compensates for the visible light image data by mapping the visible light reflection noise region to the thermal image stable region, and the compensation for the highlight region in the visible light image data based on the temperature distribution information of the thermal image data, includes: The highlight region in the visible light image data is extracted as the visible light reflection noise region, wherein the pixel value of the highlight region is higher than a preset brightness threshold; In the stable region of the thermal image, locate the spatial position corresponding to the visible light reflection noise region; Based on the spatial location, a temperature reference value is obtained from the stable region of the thermal image, and a corresponding conversion relationship is established between the pixel value of the visible light reflection noise region and the temperature reference value of the stable region of the thermal image, resulting in a mapping compensation relationship composed of a linear conversion function. By applying the mapping compensation relationship, the pixel values ​​of the visible light reflection noise region are adjusted so that the pixel values ​​and the temperature reference values ​​of the thermal image stable region remain coordinated and matched in the compensated image. Obtain the temperature value corresponding to the highlight area in the visible light image data from the thermal image data; Based on the temperature value, the brightness adjustment coefficient of the highlight area is calculated, wherein the brightness adjustment coefficient is inversely proportional to the temperature value; By applying the brightness adjustment coefficient, the pixel values ​​of the highlight area are directly compensated by scaling, ensuring that the compensated highlight area has a smooth transition in brightness with the non-highlight area, and eliminating reflection interference in the visible light image data.

2. The method according to claim 1, characterized in that, The topological contour features and the temperature diffusion features are input into a deep learning neural network model to determine the material structure properties and spatial location of defects on the surface of the plastic packaging bucket, and the material structure properties and spatial location information of the defects are output, including: Based on the material thickness and defect size range of the plastic packaging barrel, a neural network model in deep learning is selected that satisfies the requirements of supporting the simultaneous processing of the total boundary length, region coverage area, and shape regularity of the shape feature group, as well as supporting the simultaneous processing of the temperature feature group. The neural network model is pre-trained, and then labeled defect feature data is used on the trained neural network model, with topological contour features and temperature diffusion features combined as input. The neural network model is used to analyze the shape of the topological contour features and the distribution pattern of the temperature diffusion features. Based on whether the distribution pattern meets the preset shape feature triggering conditions and temperature feature verification conditions, the structural properties of the defect are determined to be bubbles or cracks. Based on the analysis results, the classification identifier of the structural attribute and the location coordinates of the defect on the surface of the plastic packaging barrel are output.

3. The method according to claim 1, characterized in that, Based on the thermal conductivity of the plastic packaging barrel material, and combined with the temperature fluctuations in the production line environment, the temperature reference value of the multimodal thermal and visual fusion map is adjusted, including: The system uses a set temperature sensor to monitor the fluctuations in the ambient temperature of the production line in real time. Analyze the material properties of the plastic packaging drum, and set a temperature correction factor based on the monitored value according to the inherent thermal conductivity of the material. By combining data from multimodal thermal and visual fusion maps, a temperature baseline value is calculated using preset calculation rules. The temperature reference value is adjusted based on the combination function of the inherent thermal conductivity and the temperature correction factor to obtain the adjusted temperature reference value. The temperature values ​​in the multimodal thermal and visual fusion map are updated based on the temperature reference value, so that all pixel values ​​are realigned with reference to the temperature reference value.

4. The method according to claim 1, characterized in that, Identify anomalous temperature regions in the multimodal thermal and visual fusion map under the stated temperature reference value, and extract the topological contour features and temperature diffusion features of the anomalous temperature regions, including: Analyze the temperature values ​​in the multimodal thermal and visual fusion map, and mark the areas where the temperature values ​​deviate from the preset deviation of the temperature reference value as abnormal temperature areas; The edge shape of the abnormal temperature region is localized, the coordinate set of edge pixels is tracked, and the coordinate set is transformed to obtain the topological contour feature; The gradient change pattern of temperature values ​​within the abnormal temperature region from the center to the outside is measured, and the temperature diffusion characteristics are obtained by analyzing the gradient change pattern. Output the coordinate set of the topological profile feature and the numerical sequence of the temperature diffusion feature.

5. The method according to claim 1, characterized in that, The thermal image data after dynamic range extension processing is superimposed and integrated with the visible light image data after surface reflection suppression processing to generate a multimodal thermal-visual fusion map, including: The thermal image data is converted into a first channel, and the visible light image data is converted into a second channel; Using the temperature value of the first channel and the pixel value of the second channel as input sources, overlapping integration is performed based on the same pixel position; The overlapping data are subjected to a fusion calculation using either a simple averaging method or a maximum value selection method, so that the multimodal thermal and visual fusion map simultaneously reflects both temperature and visual information, thus generating the multimodal thermal and visual fusion map.

6. An online defect detection system for plastic packaging drums based on machine vision and deep learning, characterized in that, include: The visible light sensor and the thermal image sensor are controlled by a synchronous triggering mechanism to collect time-aligned visible light image data and thermal image data of the surface of the plastic packaging barrel, and the thermal image data is subjected to dynamic range expansion processing to enhance the visual recognition of temperature distribution. The visible light image data is subjected to surface reflection suppression processing to compensate for the mapping relationship between the visible light reflection noise region and the thermal image stable region, and the highlight region in the visible light image data is compensated according to the temperature distribution information of the thermal image data. The thermal image data after dynamic range expansion processing is superimposed and integrated with the visible light image data after surface reflection suppression processing to generate a multimodal thermal and visual fusion map; Based on the thermal conductivity of the plastic packaging barrel material, and combined with the temperature fluctuation of the production line environment, the temperature reference value of the multimodal thermal and visual fusion map is adjusted. Abnormal temperature areas are identified in the multimodal thermal and visual fusion map under the temperature reference value, and the topological contour features and local temperature diffusion features of the abnormal temperature areas are extracted. The topological contour features and local temperature diffusion features are input into a neural network model to determine the material structure properties and spatial location of surface defects in plastic packaging barrels, and output the material structure properties and spatial location information of the defects to achieve online defect detection of plastic packaging barrels. The surface reflection suppression processing, which compensates for the visible light image data by mapping the visible light reflection noise region to the thermal image stable region, and the compensation for the highlight region in the visible light image data based on the temperature distribution information of the thermal image data, includes: The highlight region in the visible light image data is extracted as the visible light reflection noise region, wherein the pixel value of the highlight region is higher than a preset brightness threshold; In the stable region of the thermal image, locate the spatial position corresponding to the visible light reflection noise region; Based on the spatial location, a temperature reference value is obtained from the stable region of the thermal image, and a corresponding conversion relationship is established between the pixel value of the visible light reflection noise region and the temperature reference value of the stable region of the thermal image, resulting in a mapping compensation relationship composed of a linear conversion function. By applying the mapping compensation relationship, the pixel values ​​of the visible light reflection noise region are adjusted so that the pixel values ​​and the temperature reference values ​​of the thermal image stable region remain coordinated and matched in the compensated image. Obtain the temperature value corresponding to the highlight area in the visible light image data from the thermal image data; Based on the temperature value, the brightness adjustment coefficient of the highlight area is calculated, wherein the brightness adjustment coefficient is inversely proportional to the temperature value; By applying the brightness adjustment coefficient, the pixel values ​​of the highlight area are directly compensated by scaling, ensuring that the compensated highlight area has a smooth transition in brightness with the non-highlight area, and eliminating reflection interference in the visible light image data.

7. A computing device, characterized in that, It includes a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are invoked and executed by the processing component to implement the online defect detection method for plastic packaging drums based on machine vision and deep learning as described in any one of claims 1 to 5.

8. A computer storage medium, characterized in that, The device contains a computer program that, when executed by a computer, implements an online defect detection method for plastic packaging drums based on machine vision and deep learning as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Image fusion method and device, image processing equipment and binocular system

    CN112614164A

  • Outer wall thermal insulation defect diagnosis method and system based on artificial intelligence

    CN120198396A