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

By using a synchronous trigger mechanism and deep learning to combine visible light and thermal image data in the inspection of plastic packaging barrels, a multimodal fusion image is generated and topological contours and temperature diffusion features are extracted. This solves the problem of missed defects caused by high light reflection and temperature drift, and achieves accurate detection of surface defects of plastic packaging barrels.

CN120726012AActive Publication Date: 2025-09-30JIANGSHAN XINBAIFENG PLASTIC PACKAGE CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

In the field of automated quality inspection technology for plastic packaging barrels, in the existing technology, during the high-speed continuous production process of the automated production line for plastic packaging barrels, the detection of subtle structural defects on the surface of the plastic packaging barrels (such as bubbles, embedded impurities, and local uneven thickness) must meet millisecond-level real-time response requirements. At the same time, it must overcome the high light pollution caused by the strong reflection of the plastic material, the drift of thermal imaging features caused by temperature fluctuations in the production line environment, and the need for accurate identification of the physical properties of the defects.

Method used

Visible light sensors and thermal image sensors are controlled by a synchronous trigger mechanism to collect time-aligned visible light image data and thermal image data of the surface of plastic packaging barrels, and the thermal image data is dynamically expanded to enhance the visual recognizability of the temperature distribution. Surface reflection suppression is performed on the visible light image data, and the highlight areas in the visible light image data are compensated based on the temperature distribution information of the thermal image data. The thermal image data after dynamic range expansion and the visible light image data after surface reflection suppression are superimposed and integrated to generate a multimodal thermal and visual fusion image. Based on the thermal conductivity of the plastic packaging barrel material and in combination with the ambient temperature fluctuation state of the production line, the temperature reference value of the multimodal thermal and visual fusion image is adjusted to identify abnormal temperature areas and extract topological contour features and temperature diffusion features. The topological contour features and temperature diffusion features are input into a deep learning neural network model to determine the material structural properties and spatial positions of surface defects of the plastic packaging barrels.

Benefits of technology

It significantly reduces the interference of high-light reflection artifacts and gradual temperature drift, improves the accuracy and sensitivity of defect detection, realizes the precise identification and positioning of surface defects of plastic packaging barrels, and reduces the missed detection rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120726012A_ABST
    Figure CN120726012A_ABST
Patent Text Reader

Abstract

The invention provides a plastic packaging barrel online defect detection method and system based on machine vision and deep learning. According to the method, visible light and thermal image data, aligned in time, of the surface of the plastic packaging barrel are collected, the dynamic range of a thermal image is expanded to enhance the identification degree, then highlight interference is compensated through the mapping relation between a thermal image stable area and a visible light reflection area, and surface reflection suppression is achieved; superposing the processed dual-mode data to generate a multi-mode fusion image, dynamically adjusting the temperature reference value of the fusion image based on the thermal conductivity of the material and the environment temperature of the production line, and positioning an abnormal temperature region; and finally, extracting topological contours and temperature diffusion characteristics of the regions, and inputting a deep learning model to judge material structure attributes and spatial positions of the defects so as to finish online detection. According to the method, thermal and visual data are fused to enhance the perception capability on fine structure defects, and the precision and robustness of online detection of the plastic packaging barrel in a complex illumination environment are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of industrial automation quality inspection technology, and in particular to an online defect detection method and system for plastic packaging barrels based on machine vision and deep learning. Background Art

[0002] In the high-speed continuous production scenario of an automated production line for plastic packaging barrels, the detection of subtle structural defects on the barrel surface (such as bubbles, embedded impurities, and local uneven thickness) must meet millisecond-level real-time response requirements. At the same time, three key interferences must be overcome: high light pollution caused by strong reflections from the plastic material, thermal imaging feature drift caused by temperature fluctuations in the production line environment, and the need for accurate identification of the physical properties of the defects (abnormal material structure).

[0003] The current advanced solution uses single-modal thermal imaging fusion time series analysis technology: the temperature field distribution on the barrel surface is captured by an infrared thermal imager and input into a deep learning model that integrates a convolutional neural network (CNN) and a long short-term memory network (LSTM). The former locates areas with abnormal temperature, and the latter analyzes the time series characteristics of heat diffusion under continuous motion to suppress instantaneous environmental noise.

[0004] This solution has two essential bottlenecks: First, highly reflective areas on the plastic surface produce ultra-high temperature artifacts in thermal imaging, such as instantaneous peaks >150°C. These artifacts, coupled with the microscale thermal characteristics of real defects, cause the model to mistakenly identify reflected noise as defects, resulting in a measured missed detection rate of >18%. Second, when the production line environment experiences a gradual temperature drift exceeding ±5°C / h, LSTM time series analysis has difficulty distinguishing between systematic thermal offsets and the local thermal diffusion characteristics of defects, resulting in a decrease in sensitivity. Summary of the Invention

[0005] The present application provides an online defect detection method and system for plastic packaging barrels based on machine vision and deep learning, which is used to solve the problems in the prior art of high defect missed detection rate and sudden drop in thermal feature recognition sensitivity caused by the coupling interference of high light reflection artifacts and gradual temperature drift.

[0006] In a first aspect, the present application provides an online defect detection method for plastic packaging barrels based on machine vision and deep learning, comprising: A visible light sensor and a thermal image sensor are controlled by a synchronous trigger mechanism to collect time-aligned visible light image data and thermal image data of the plastic packaging barrel surface. The thermal image data is then subjected to dynamic range expansion processing to enhance the visual recognizability of the temperature distribution. performing surface reflection suppression processing on the visible light image data to achieve compensation by mapping a visible light reflection noise region with a thermal image stabilization region, and compensating for highlight regions in the visible light image data based on 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 image; Based on the thermal conductivity of the plastic packaging barrel material and the ambient temperature fluctuation of the production line, the temperature reference value of the multimodal thermal and visual fusion image is adjusted. Abnormal temperature areas are identified in the multimodal thermal and visual fusion image under the temperature reference value, and the topological contour features and temperature diffusion features of the abnormal temperature areas are extracted. The topological profile features and the temperature diffusion features are input into a deep learning neural network model to determine the material structure properties and spatial positions of surface defects of plastic packaging barrels, and the material structure properties and spatial position information of the defects are output to achieve online defect detection of the plastic packaging barrels.

[0007] Optionally, the topological profile features and the temperature diffusion features are input into a deep learning neural network model to determine the material structure attributes and spatial location of the surface defects of the plastic packaging barrel, and output the material structure attributes and spatial location information of the defects, including: Based on the material thickness and defect size range of the plastic packaging barrel, a neural network model was selected that could simultaneously process the shape feature group's total boundary length, area coverage, and shape regularity, as well as the temperature feature group. Pre-training the neural network model, and then using the labeled defect feature data on the trained neural network model, with the topological profile feature and the temperature diffusion feature jointly used as input; The neural network model is used to analyze the shape of the topological profile feature and the distribution pattern of the temperature diffusion feature, and the structural properties of the defect are judged to be bubbles or cracks based on whether the distribution pattern meets the preset shape feature trigger condition and temperature feature verification condition.

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

[0009] Optionally, adjusting the temperature reference value of the multimodal thermal and visual fusion image based on the thermal conductivity of the plastic packaging barrel material and in combination with the ambient temperature fluctuation of the production line includes: The monitoring value of the production line ambient temperature fluctuation state is obtained in real time through the set temperature sensor; Analyze the material properties of the plastic packaging barrel, and set a temperature correction factor based on the monitored value according to the inherent thermal conductivity of the material in the material properties; Combining the data of multimodal thermal and visual fusion images, the temperature reference value is calculated using preset calculation rules; 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; The temperature values ​​in the multimodal thermal and visual fusion image are updated according to the temperature reference value, so that all pixel values ​​are realigned with reference to the temperature reference value.

[0010] Optionally, identifying an abnormal temperature area in the multimodal thermal and visual fusion image under the temperature base reference value, and extracting topological contour features and temperature diffusion features of the abnormal temperature area includes: Analyzing temperature values ​​in the multimodal thermal and visual fusion image, and marking areas where the temperature values ​​deviate from the temperature reference value by a preset deviation as abnormal temperature areas; Performing boundary positioning on the edge shape of the abnormal temperature area, tracking the edge pixel point coordinate set, and converting the coordinate set to obtain a topological contour feature; Measuring a gradient change pattern of temperature values ​​within the abnormal temperature region from the center to the outside, and analyzing the gradient change pattern to obtain a temperature diffusion characteristic; The coordinate set of the topological profile feature and the numerical sequence of the temperature diffusion feature are output.

[0011] 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 image, including: Converting the thermal image data into a first channel and the visible light image data into a second channel; Using the temperature value of the first channel and the pixel value of the second channel as input sources, performing overlapping integration at the same pixel position; A fusion calculation using a simple averaging method or a maximum value selection method is performed on the overlapped data, so that the multimodal thermal and visual fusion image simultaneously reflects temperature information and visual information, thereby generating the multimodal thermal and visual fusion image.

[0012] Optionally, performing surface reflection suppression processing on the visible light image data to achieve compensation through a mapping relationship between a visible light reflection noise area and a thermal image stabilization area includes: 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; locating a spatial position corresponding to the visible light reflection noise region in a thermal image stabilization region; Based on the spatial position, a temperature reference value is obtained from the thermal image stabilization area, and a corresponding conversion relationship is established between the pixel value of the visible light reflection noise area and the temperature reference value of the thermal image stabilization area to obtain a mapping compensation relationship formed by a linear conversion function; The mapping compensation relationship is applied to adjust the pixel values ​​of the visible light reflection noise area so that the pixel values ​​and the temperature reference value of the thermal image stabilization area maintain a coordinated match in the compensated image.

[0013] Optionally, compensating for highlight areas in the visible light image data according to temperature distribution information of the thermal image data includes: Acquire a temperature value corresponding to a highlight area in the visible light image data from the thermal image data; Calculating a brightness adjustment coefficient of the highlight area based on the temperature value, wherein the brightness adjustment coefficient is inversely proportional to the temperature value; The brightness adjustment coefficient is applied to directly perform scaling compensation on the pixel values ​​of the highlight area, ensuring a smooth transition in brightness between the compensated highlight area and the non-highlight area, and eliminating reflection interference in the visible light image data.

[0014] In a second aspect, the present application provides an online defect detection system for plastic packaging barrels based on machine vision and deep learning, comprising: An acquisition module, configured to control a visible light sensor and a thermal image sensor through a synchronous trigger mechanism to acquire time-aligned visible light image data and thermal image data of the surface of the plastic packaging barrel, and perform dynamic range expansion processing on the thermal image data to enhance the visual recognizability of the temperature distribution; a compensation module configured to perform surface reflection suppression processing on the visible light image data by using a mapping relationship between a visible light reflection noise region and a thermal image stabilization region to achieve compensation, and to compensate for highlight regions in the visible light image data based on temperature distribution information of the thermal image data; A generation module 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 multimodal thermal and visual fusion image; An identification module is configured to adjust a temperature base reference value of the multimodal thermal and visual fusion image based on the thermal conductivity of the plastic packaging barrel material and in combination with ambient temperature fluctuations of the production line, identify abnormal temperature areas in the multimodal thermal and visual fusion image under the temperature base reference value, and extract topological contour features and local temperature diffusion features of the abnormal temperature areas; The output module is used to input the topological profile features and local temperature diffusion features into a neural network model, determine the material structure properties and spatial positions of surface defects of the plastic packaging barrel, output the material structure properties and spatial position information of the defects, and realize online defect detection of the plastic packaging barrel.

[0015] In a third aspect, the present application provides a computing device comprising a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement an online defect detection method for plastic packaging barrels based on machine vision and deep learning as described in the first aspect above.

[0016] In a fourth aspect, the present application provides a computer storage medium storing a computer program. When the computer program is executed by a computer, it implements an online defect detection method for plastic packaging barrels based on machine vision and deep learning as described in the first aspect.

[0017] This application ensures the time alignment of visible light and thermal image data through a synchronous trigger mechanism, significantly reducing image misalignment interference caused by high-speed production line movement; performs dynamic range expansion processing on thermal images to effectively enhance the recognizability of subtle temperature distribution differences; utilizes the mapping relationship between the stable area of ​​the thermal image and the visible light reflection area to compensate for the highlight area, significantly suppressing the masking of real defects by surface reflection noise; generates a multimodal thermal and visual fusion image from the fused dual-mode data after processing, fully integrating the complementary information of the material surface morphology and thermal conductivity characteristics; dynamically adjusts the temperature reference of the fusion image based on the thermal conductivity of the material and the ambient temperature, significantly improving the recognition stability of temperature anomaly areas under complex working conditions; jointly extracts the topological contour features and temperature diffusion features of the abnormal area, and deeply decouples the physical structure nature and thermodynamic behavior of the defect; and finally synchronously outputs the material structure properties and spatial position information of the defect through a deep learning model, comprehensively solving the problem of detection failure under the coupling interference of high reflection and temperature drift.

[0018] Furthermore, by selecting a neural network model that combines topological contour features (total boundary length / area / shape regularity) with temperature diffusion features based on material thickness and defect size, and performing two-factor cross-validation using pre-set shape feature trigger conditions and temperature feature verification conditions, we can accurately distinguish the physical properties of similar defects such as bubbles and cracks. In the case of multi-layer composite structures of plastic packaging barrels, the confusion rate between bubbles (e.g., internal gas causing rapid heat conduction) and cracks (e.g., material fracture causing heat conduction blockage) is significantly reduced compared to traditional single-model systems, and the system supports attribute tracing of even the smallest defects.

[0019] These and other aspects of the present application will become more readily apparent from the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0021] Figure 1 A flowchart of a method for online defect detection of plastic packaging barrels based on machine vision and deep learning is shown in this application; Figure 2 A schematic diagram of a scenario illustrating an online defect detection method for plastic packaging barrels based on machine vision and deep learning provided by the present application is shown; Figure 3 A schematic diagram of the structure of an online defect detection system for plastic packaging barrels based on machine vision and deep learning is shown in the present application; Figure 4 A schematic structural diagram of a computing device provided by the present application is shown. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution 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.

[0023] In some of the processes described in the specification and claims of this application and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any order of execution. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to being different types.

[0024] In the field of high-speed online inspection of plastic packaging barrels, existing single-modal thermal imaging technology faces two key bottlenecks: First, strong reflections from the plastic surface create ultra-high temperature artifacts in the thermal image, which severely couple with the thermal signature of the actual defect, leading to the systematic underdetection of structural defects such as bubbles and impurities in highly reflective areas. Second, when the production line's ambient temperature gradually drifts, the thermal diffusion time series model cannot effectively distinguish between background temperature drift and defect signatures, causing a sharp drop in the sensitivity of identifying linear defects such as cracks. The combined effect of these two types of interference essentially results in a failure in tracing material structural defects due to the singleness of the data modality and the lack of an environmental adaptability mechanism.

[0025] To address the problems of missed defect detection and misjudgment caused by the coupling of high-reflection artifacts and temperature drift interference in the existing technology, this application innovatively proposes a dynamic decoupling mechanism based on the dual-modality collaboration of visible light and thermal imaging: first, through the physical mapping of the thermal image stabilization area and the visible light reflection noise, real-time compensation of the high-light area is achieved (eliminating reflection pollution), and at the same time, the temperature benchmark of the fusion image is dynamically calibrated based on the thermal conductivity of the material and the ambient temperature fluctuation (cutting off the temperature drift interference); then, a multimodal fusion image is generated after reflection suppression and thermal expansion processing, and the topological contour features (morphological structure) and temperature diffusion features (thermodynamic behavior) of the abnormal area are simultaneously extracted; finally, through the joint analysis of the dual features by a deep learning model, the material structural properties such as bubbles / cracks / impurities and their sub-millimeter spatial positions are accurately output, systematically solving the problem of failure in identifying the essence of defects in plastic packaging barrels in strong reflection and gradual temperature drift environments, and realizing the simultaneous and precise detection of physical property traceability and position positioning.

[0026] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0027] Figure 1 The present invention provides a flowchart of a method for online defect detection of plastic packaging barrels based on machine vision and deep learning, as shown in FIG. Figure 1 As shown, the method includes: 101. Control the visible light sensor and the thermal image sensor through a synchronous trigger mechanism to collect time-aligned visible light image data and thermal image data of the surface of the plastic packaging barrel, and perform dynamic range expansion processing on the thermal image data to enhance the visual recognizability of the temperature distribution; In the above scheme, the synchronous trigger mechanism refers to the technical means of simultaneously starting the visible light sensor and thermal image sensor to collect data through a unified electronic signal; time alignment means that the two sensors complete image capture within one thousandth of a second to ensure that the position of the photographed object is completely consistent; dynamic range expansion processing is the process of amplifying the original temperature differences in the thermal image that are too small through mathematical methods, so that the human eye or computer can clearly identify subtle temperature changes.

[0028] In this embodiment, a central controller sends synchronized trigger pulse signals to both the visible light sensor and the thermal imager, ensuring that both sensors initiate capture within a thousandth of a second. For example, when a conveyor belt transports a plastic barrel through an inspection station at a speed of 1.5 meters per second, a photoelectric switch detects the barrel's position and immediately issues a command. The visible light camera simultaneously captures the surface texture image, while the thermal imager captures the temperature distribution of the corresponding area. This ensures that the two images of the barrel are perfectly aligned in time, avoiding misalignment due to motion. Secondly, the thermal image undergoes dynamic range expansion processing: First, the highest and lowest temperature values ​​in the entire image are identified. For example, if the barrel surface temperature range is measured to be 28.1°C to 32.8°C, a linear transformation formula is then used to geometrically map the original temperature range to a visual scale of 0-100°C. For example, a pixel originally at 29.6°C will be reassigned to 38.3 units by calculating its correspondence with the new temperature range. The resulting enhanced thermal image significantly improves visual contrast, allowing even subtle temperature differences of just 0.5°C to appear as distinct grayscale steps.

[0029] In actual application, this step is implemented in the plastic packaging barrel production line at site A. When the conveyor belt transports the packaging barrels to the detection area at a standard speed, the trigger unit simultaneously activates two types of sensors to complete synchronous shooting. The measured thermal image shows that the temperature distribution of a barrel surface is between 29.2°C and 33.5°C. The system automatically maps the lowest temperature of 29.2°C in this range to 0 units and the highest temperature of 33.5°C to 100 units. For example, the original temperature of the central area of ​​the barrel surface is 31.0°C, which is displayed as 48.8 units after calculation and mapping using the formula. After this conversion, the temperature anomalies that were originally invisible, 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.

[0030] This solution eliminates image misalignment caused by high-speed motion through hardware synchronization control, and then expands and enhances the temperature range of the thermal map, converting subtle temperature differences that were originally invisible to the naked eye into clear image grayscale levels, providing a visual thermal distribution basis for subsequent identification of material structural defects.

[0031] 102. Performing surface reflection suppression processing on the visible light image data to achieve compensation by mapping a visible light reflection noise region with a thermal image stabilization region, and compensating for highlight regions in the visible light image data based on temperature distribution information of the thermal image data; Optionally, step 102 may specifically include the following steps: 1021. Extract 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; 1022. Locate a spatial position corresponding to the visible light reflection noise area in the thermal image stabilization area; 1023. Based on the spatial position, obtain a temperature reference value from the thermal image stabilization area, establish a corresponding conversion relationship between the pixel value of the visible light reflection noise area and the temperature reference value of the thermal image stabilization area, and obtain a mapping compensation relationship formed by a linear conversion function; 1024. Apply the mapping compensation relationship to adjust the pixel values ​​of the visible light reflection noise area so that the pixel values ​​and the temperature reference value of the thermal image stabilization area maintain a coordinated match in the compensated image.

[0032] 1025. Acquire a temperature value corresponding to a highlight area in the visible light image data from the thermal image data; 1026. Calculate a brightness adjustment coefficient of the highlight area based on the temperature value, wherein the brightness adjustment coefficient is inversely proportional to the temperature value; 1027. Apply the brightness adjustment coefficient to directly compensate for the scaling operation on the pixel values ​​of the highlight area, 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.

[0033] In the above scheme, the visible light reflection noise area refers to the overly bright white patch area formed by the reflection of the plastic surface in the visible light image; the thermal image stability area refers to the uniform material area in the thermal imaging image where the temperature fluctuation is less than ±0.5°C; the mapping compensation relationship refers to the conversion rule between the highlight brightness value and the thermal image temperature established by mathematical functions; the brightness adjustment coefficient is the pixel value scaling factor calculated based on the thermal image temperature, which is used to reduce the exposure intensity of the overly bright area.

[0034] In this embodiment, an image analysis algorithm is first used to automatically identify areas of abnormally elevated brightness, known as highlights, in visible light image data as areas of reflective noise. Specifically, when pixel brightness values ​​at certain locations on the surface of a plastic packaging barrel exceed a set threshold, the system marks them as highlights. For example, if a bright white patch with a diameter of 5 mm is formed on the barrel surface due to strong sunlight, its center reaches a brightness of 245, ranging from 0 to 255, significantly higher than the brightness of the surrounding normal area (180). The system then accurately selects this overexposed area. Next, the system uses the stable regions in the time-aligned thermal image to locate corresponding temperature distribution areas at the exact same spatial location. Based on this spatial location, the system detects temperature fluctuations within a 3×3 pixel range surrounding the corresponding region and selects stable regions with temperature fluctuations of less than 0.5°C as temperature reference values. For example, if the temperature of the bright spot corresponding to the thermal image is detected to be 34.8°C, while the average temperature of the surrounding stable areas is 31.5°C, 31.5°C will be used as the compensation reference value. A brightness-temperature conversion relationship is then established: the brightness adjustment ratio is calculated based on the difference between the temperature reference value of the thermally stable region and the actual temperature of the highlight region. Compensation is achieved using the linear conversion formula "new brightness = original brightness × (reference temperature / actual temperature)." For example, if a highlight spot has an original brightness of 240, its thermal image corresponds to a temperature of 34.8°C, and the reference temperature is 31.5°C, the adjusted brightness is 240 × (31.5 / 34.8) ≈ 217. This calculation is applied pixel by pixel across the entire highlight area, transforming the original harsh bright spot to a grayscale similar to the surrounding material, much like restoring an overexposed flash photo to natural light. In an optional embodiment, the system directly calculates the temperature offset and generates the brightness adjustment factor. For example, when the temperature of the highlight area is 34.8°C and the reference temperature is 31.5°C, which is 3.3°C different, the brightness adjustment coefficient calculation formula "1 / (1+temperature difference)" is used to obtain a brightness adjustment coefficient of 0.23, that is, 1 / (1+3.3)≈0.23. The original brightness of 240 is then multiplied by the brightness adjustment coefficient to become 55.2. The pixel values ​​of the highlight area are compensated by a scaling operation to ensure that the compensated highlight area has a smooth transition in brightness with the non-highlight area and eliminates reflection interference in the visible light image data. Finally, image equalization processing is performed to make the details of the area appear. After the entire process is completed, the scratches or bubble structures on the barrel surface that were originally obscured by strong light are clearly revealed.

[0035] In actual application, during the quality inspection of plastic packaging barrels at Company A, when strong light creates a 5mm diameter highlight on the barrel surface, the system first extracts pixels with a brightness exceeding 220 in the visible light image and marks them as reflective noise. It then locates a stable area with a temperature fluctuation of less than 0.4°C around the same location in the synchronized thermal image, and measures the average temperature of this stable area to be 32.0°C as a reference. A linear conversion function, "new brightness = original brightness × (32.0 / actual temperature)," is established to compensate the original brightness of the highlight point, 238, by calculating: 238 × (32.0 / 36.5) ≈ 209. Simultaneously, an alternative method is used to read the temperature of 36.5°C at the corresponding location in the thermal image. The temperature difference of 4.5°C from the reference value is calculated, generating a scaling factor of 1 / (1+4.5) ≈ 0.18. The brightness at the same point is adjusted to 238 × 0.18 ≈ 43, which is then corrected to a reasonable value through grayscale equalization. Finally, after all the highlight patches are eliminated, three 0.3mm diameter bubble defects, previously obscured by strong reflections, become clearly visible.

[0036] This solution dynamically generates pixel compensation strategies through intelligent detection of highlight areas and precise mapping of thermal physical information. This effectively eliminates the masking effect of reflective pollution on the plastic surface on the real structure, restores the characteristics of subtle defects swallowed by strong light, and completely preserves the material texture of non-interfering areas, providing a distortion-free data foundation for the analysis of the physical properties of defects.

[0037] 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 multimodal thermal and visual fusion image; Optionally, step 103 may specifically include the following steps: 1031. Convert the thermal image data into a first channel, and convert the visible light image data into a second channel; 1032. Using the temperature value of the first channel and the pixel value of the second channel as input sources, perform overlapping integration based on the same pixel position; 1033. Perform a fusion calculation on the overlapped data using a simple averaging method or a maximum value selection method, so that the multimodal thermal and visual fusion image simultaneously reflects temperature information and visual information, thereby generating the multimodal thermal and visual fusion image.

[0038] In the above scheme, the multimodal thermal and visual fusion image refers to a composite image generated by merging thermal imaging temperature information with 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 visible light data into a grayscale value channel, i.e., the second channel; overlapping integration refers to matching and superimposing pixel values ​​at the same coordinate position of the two channels; fusion calculation is the operation of synthesizing dual-channel information into a single image through mathematical methods, such as taking the mean of the two channels by the averaging method or taking the highest value of the two channels by the maximum value method.

[0039] In this embodiment, the thermal image data, after dynamic range expansion, is first converted into a temperature matrix for the first channel, where each pixel represents the expanded temperature intensity. For example, the original temperature of 32°C at a location on the barrel surface is mapped to a value of 80 units. Simultaneously, the visible light image, after surface reflection suppression, is converted into a grayscale matrix for the second channel. For example, the grayscale value for the same location after processing is 125. All pixels in the two channels are then overlaid one-to-one based on their coordinates. When using a simple averaging method, the grayscale value of the second channel is first scaled to the same range as the first channel. For example, a grayscale value of 125 is adjusted to approximately 49 units. The fused value for that point is then calculated as the average of 80 and 49, which is 64.5. When using a maximum selection method, the higher value of the two channels is directly selected as the fused result, for example, a temperature value of 80 units. Finally, the fused results of all pixels are integrated to create a composite image, which clearly displays both the high-temperature region characteristics and texture details on the plastic barrel surface. For example, surface scratches, previously obscured by the high-temperature signal, appear as mixed features when the averaging method is used.

[0040] In actual applications, in the online inspection system of plastic packaging barrel manufacturer A, for the target area on the barrel surface, the thermal image data after dynamic range expansion is first converted into a temperature feature channel, namely the first channel. For example, the original temperature value of 33°C at a point on the barrel surface is expanded and mapped to 85 units. The visible light image data after reflection suppression processing is simultaneously converted into a grayscale feature channel, namely the second channel, corresponding to the grayscale value of 215 at the same point. The two channels are overlapped and integrated through precise coordinate matching. The simple averaging method is used to normalize the grayscale value of the optical channel first, for example, 215 ÷ 2.55 ≈ 84 units. The fusion value of the point is then calculated as (85 + 84) ÷ 2 = 84.5 units. If the maximum value rule is used, 85 units are directly selected as the fusion result. In the final fusion image, a 0.3 mm microcrack on the barrel wall that was originally obscured by the high temperature signal is clearly visible due to the composite feature value of 84.5 units, and the material layered structure in the reflective area of ​​the barrel bottom is visualized by the 85-unit high temperature signal, fully preserving the synergistic characteristics of temperature anomaly and surface morphology.

[0041] This solution generates a composite image that combines temperature anomaly characteristics and surface morphology details through the scale unification and intelligent fusion of thermal and optical information, effectively breaking through the perception limitations of a single detection modality and providing a key information basis for cross-dimensional collaborative identification of physical defects.

[0042] 104. Based on the thermal conductivity of the plastic packaging barrel material and in combination with the ambient temperature fluctuation of the production line, adjust the temperature reference value of the multimodal thermal and visual fusion image, identify abnormal temperature areas in the multimodal thermal and visual fusion image under the temperature reference value, and extract the topological contour features and temperature diffusion features of the abnormal temperature areas; Optionally, step 104 may specifically include the following steps: 1041. Obtain the monitoring value of the production line ambient temperature fluctuation state in real time through the set temperature sensor; 1042. Analyze the material properties of the plastic packaging barrel, and set a temperature correction factor based on the monitored value according to the inherent thermal conductivity of the material in the material properties; 1043. Combining the data of the multimodal thermal and visual fusion images, the temperature reference value is calculated using a preset calculation rule; 1044. Adjust 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; 1045. Update the temperature value in the multimodal thermal and visual fusion image according to the temperature reference value, so that all pixel values ​​are realigned with reference to the temperature reference value.

[0043] 1046. Analyze the temperature values ​​in the multimodal thermal and visual fusion image, and identify areas where the temperature values ​​deviate from the temperature reference value by a preset deviation as abnormal temperature areas; 1047. Locate the edge shape of the abnormal temperature area, track the edge pixel coordinate set, and convert the coordinate set to obtain a topological contour feature; 1048. Measure a gradient change pattern of temperature values ​​within the abnormal temperature region from the center to the outside, and analyze the gradient change pattern to obtain a temperature diffusion characteristic; 1049. Output the coordinate set of the topological profile feature and the numerical sequence of the temperature diffusion feature.

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

[0045] In the embodiment of the present application, the current ambient temperature fluctuation state is first monitored in real time by 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 working condition, the thermal conductivity parameters of the container of this model are obtained by calling the pre-stored plastic packaging barrel material database, such as the thermal conductivity parameter of HDPE material is 0.42W / m·K. The temperature correction factor is calculated based on the thermal conductivity characteristics of the material and the ambient temperature rise data. The specific formula is correction factor = 1-(temperature rise value × thermal conductivity coefficient) ÷ reference constant. For example, when the temperature rise is 3.5°C 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 of the multimodal fusion image is read as the initial reference value, such as 68 units. The calibrated temperature reference value is calculated as 68×0.95≈64.6 units by adjusting the formula: calibrated temperature reference value = initial reference value × correction factor. Then, all pixel values ​​in the multimodal thermal and visual fusion image are updated, and the calibrated temperature reference value is subtracted from the original temperature value to achieve data alignment. For example, the original temperature of 72 units in an area is updated to 72-64.6=7.4 units of offset. After completing the temperature benchmark calibration, the system scans the updated fusion map and identifies all areas where the temperature offset exceeds the set threshold. For example, areas with ±5 units are marked as abnormal temperature areas. For example, it is detected that the shoulder area of ​​the container maintains a continuous offset of +12.3 units. The abnormal temperature area is then subjected to boundary tracking processing. The edge detection algorithm is used to connect the points point by point to form a closed contour coordinate set. For example, a bubble defect is tracked to obtain a circular contour consisting of 126 coordinate points, and its geometric shape features are encoded as topological contour features. The temperature diffusion gradient of the abnormal temperature area from the center to the periphery is then measured, and the temperature values ​​are sampled at a spacing of one millimeter to form a numerical sequence. For example, the center point is 12.3 units, 1mm from the center is 9.2 units, 2mm from the center is 3.7 units, and the edge is 0 units, forming a temperature diffusion feature sequence of [12.3, 9.2, 3.7, 0]. Finally, the topological contour coordinate set and the temperature gradient data packet representing the numerical sequence of the temperature diffusion feature are output to achieve a complete quantitative expression of the physical characteristics of the defect.

[0046] In practice, the inspection system on a plastic packaging barrel production line detected a 4°C rise in ambient temperature and simultaneously acquired the thermal conductivity parameter of 0.24 W / m·K for the PP material used in the current batch of containers. The system calculated a correction factor of 1-(4×0.24) / 30≈0.97, read the median temperature of the fused image as 70 units, and adjusted the baseline value to 70×0.97=67.9 after calibration. After updating the pixel values ​​of the fused image, a temperature offset of +15.6 units (exceeding the threshold of ±6) was detected in a certain area at the barrel bottom, which was marked as an abnormal area. Boundary tracing yielded 189 coordinate points of a quasi-circular contour with a diameter of 2.8 mm. The temperature gradient was sampled and recorded as a diffusion sequence of [15.6, 12.1, 7.8, 1.3, 0]. The output data was used for subsequent defect classification analysis.

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

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

[0049] Optionally, step 105 may specifically include the following steps: 1051. Based on the material thickness and defect size range of the plastic packaging barrel, select a neural network model that supports simultaneous processing of the shape feature group's total boundary length, area coverage, and shape regularity, as well as the temperature feature group, in deep learning. 1052. Pre-train the neural network model, and then use the labeled defect feature data on the trained neural network model, with the topology profile feature and the temperature diffusion feature jointly used as input; 1053. Analyze the shape of the topological profile feature and the distribution pattern of the temperature diffusion feature 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 condition and temperature feature verification condition.

[0050] 1054. Based on the analysis result, output the classification identification of the structural attribute and the position coordinates of the defect on the surface of the plastic packaging barrel.

[0051] In the above scheme, the total length of the boundary refers to the total distance between the pixel points at the edge of the defect area contour; the area coverage is the total number of pixels occupied by the defect area; the shape regularity describes the degree to which the contour is close to the standard geometric shape, such as a circle is 1 and an irregular shape is close to 0; the temperature diffusion feature records the numerical sequence of temperature decaying from the center of the anomaly to the outside; the shape feature triggering condition refers to the neural network judging that the bubble must meet the circular contour, regularity > 0.8 and symmetrical boundary; the temperature feature verification condition refers to the bubble must have a temperature pattern with high temperature in the center and uniform diffusion, such as a smooth decrease in temperature difference.

[0052] In this embodiment, a neural network architecture is first selected based on the common material thickness range and typical defect sizes of plastic packaging barrels. For example, for barrel wall thicknesses of 1.5 to 4 mm and defect sizes of 0.1 to 5 mm, a fully connected neural network model with a dual-branch input is selected. This neural network model is capable of simultaneously processing shape feature groups: total boundary length, area coverage, shape regularity, and temperature feature groups. The neural network model is then pre-trained using a historically annotated defect dataset. For example, 2000 annotated defect feature groups are input and weight optimization is performed to enable the neural network model to grasp typical bubble feature combinations, such as quasi-circular contours, uniform temperature diffusion and linear contours of cracks, and localized high-temperature clustering. The trained neural network model is then combined with topological contour features and temperature diffusion features acquired through online detection. For example, for an abnormal temperature region, characteristic parameters such as boundary length of 35 pixels, area of ​​120 pixels², shape regularity of 0.88, and a temperature gradient sequence are input. The trained neural network model, through activation function analysis, determines that the characteristic bubble conditions are met: shape regularity greater than 0.8 and a uniform temperature decrease from the center to the edge. The final output is the material structure property classification identification of the corresponding defect, such as the bubble category code C005 and its spatial position coordinates on the surface of the plastic packaging barrel and other parameters.

[0053] In actual application, the inspection system on a production line for medium-sized plastic packaging barrels extracts characteristic data from the abnormal area at the barrel bottom, including a total boundary length of 42 pixels, an area of ​​95 pixels², a shape regularity of 0.92, and a temperature diffusion sequence. After receiving this feature set, the pre-trained neural network model analyzes and determines that the shape regularity exceeds a threshold of 0.8 and that the temperature gradient exhibits a smooth decay pattern with a high center and a low edge, meeting the preset bubble detection criteria. The system outputs a bubble attribute identifier and spatial coordinate information, which was verified on-site as a bubble defect with a diameter of 1.2 mm, and a coordinate positioning error of less than 0.3 mm.

[0054] This solution uses a neural network model to intelligently analyze the two dimensions of material geometry and thermodynamic characteristics, accurately determine the physical property category of defects and locate their spatial positions, and achieve essential identification of structural defects in plastic packaging barrel materials under complex working conditions.

[0055] Figure 2 A scene diagram of an online defect detection method for plastic packaging barrels based on machine vision and deep learning is provided for the embodiment of this application, such as Figure 2 As shown, a complete embodiment of steps 101 to 105 includes: In the online inspection system of the plastic packaging barrel production line C, when the conveyor belt transports the container through the inspection station, the system first controls the visible light camera and the thermal imager through a synchronous trigger mechanism to complete the time-aligned image acquisition within 0.5 milliseconds (101), and performs dynamic range expansion processing on the thermal image: the barrel surface temperature range is detected to be 28.1-32.8℃ (temperature difference 4.7℃), and the lowest temperature 28.1℃ is corresponding to 0 units and the highest temperature 32.8℃ is corresponding to 100 units through linear mapping, so that the original 30.0℃ area is converted by (30.0-28.1)×(100 / 4.7)≈40.4 units. The temperature recognition is significantly enhanced (101); then, reflection suppression processing is performed on the visible light image: a bright spot with a diameter of 6 mm on the barrel shoulder (brightness 248) is identified, and based on the difference between the temperature of the stable area of ​​the thermal image of 31.8°C and the temperature of the highlight area of ​​35.6°C, the brightness is adjusted by calculating 248×(31.8 / 35.6)≈221 through the main compensation scheme (102); then, the processed dual-mode data are superimposed to generate a fusion image: the thermal channel point value 85 units is superimposed with the normalized value 84 of the optical channel, and the fusion value 84.5 units is obtained by the average method (103); then, based on the thermal conductivity of the material (PP material 0.24 W / m·K) and an ambient temperature rise of 4°C, the temperature reference value was adjusted to 67.9 units, the barrel bottom +15.6 offset area (104) was identified, and the 2.8 mm diameter circular contour and temperature gradient sequence were extracted; finally, the topological contour and temperature diffusion characteristics were input into the pre-trained neural network, and the model determined that it was a bubble defect based on the shape regularity of 0.92 and uniform temperature attenuation, and output the material property identification and spatial positioning coordinates (105). The actual measurement showed that the bubble was 1.2 mm in diameter and the positioning error was less than 0.3 mm.

[0056] This method systematically addresses the core pain points caused by the coupling of high reflective interference and environmental temperature drift in the online inspection of plastic packaging barrels through the collaborative processing of multimodal data and a dynamic compensation mechanism: First, the physical mapping relationship between visible light and thermal imaging is used to eliminate the obstruction of surface details caused by reflective pollution; second, the temperature reference value is dynamically calibrated based on the thermal conductivity characteristics of the material and the environmental state to eliminate the interference of gradual temperature drift on the identification of abnormal areas; the generated fusion image simultaneously includes the thermodynamic behavior of the material and the surface morphology characteristics, so that the physical nature of structural defects such as bubbles and cracks can be fully presented; finally, with the help of a deep learning model, the two-dimensional characteristics of geometric topology and temperature diffusion are jointly analyzed, breaking through the limitations of traditional single-modal detection on the traceability of material structural properties, and realizing the precise determination of the physical nature of defects such as bubbles / cracks / impurities under high-speed production line conditions and the simultaneous output of sub-millimeter spatial positioning, significantly improving the detection reliability and process consistency in complex lighting and temperature fluctuation scenarios.

[0057] Figure 3 The present invention provides a structural diagram of an online defect detection system for plastic packaging barrels based on machine vision and deep learning, as shown in FIG. Figure 3 As shown, the system includes: An acquisition module 31 is configured to control the visible light sensor and the thermal image sensor through a synchronous trigger mechanism to acquire time-aligned visible light image data and thermal image data of the surface of the plastic packaging barrel, and perform dynamic range expansion processing on the thermal image data to enhance the visual recognizability of the temperature distribution; a compensation module 32 for performing surface reflection suppression processing on the visible light image data to achieve compensation by mapping the visible light reflection noise region with the thermal image stabilization region, and compensating for highlight regions in the visible light image data based on temperature distribution information of the thermal image data; A 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 multimodal thermal and visual fusion image; Identification module 34 is configured to adjust a temperature base reference value of the multimodal thermal and visual fusion image based on the thermal conductivity of the plastic packaging barrel material and in combination with ambient temperature fluctuations of the production line, identify abnormal temperature regions in the multimodal thermal and visual fusion image at the temperature base reference value, and extract topological contour features and local temperature diffusion features of the abnormal temperature regions; The output module 35 is used to input the topological profile features and local temperature diffusion features into the neural network model, determine the material structure properties and spatial location of the surface defects of the plastic packaging barrel, output the material structure properties and spatial location information of the defects, and realize online defect detection of the plastic packaging barrel.

[0058] Figure 3The online defect detection system for plastic packaging barrels based on machine vision and deep learning can perform Figure 1 The implementation principles and technical effects of the machine vision and deep learning-based online defect detection method for plastic packaging barrels described in the illustrated embodiment are not further elaborated. The specific manner in which each module and unit performs operations in the machine vision and deep learning-based online defect detection system for plastic packaging barrels described in the aforementioned embodiment has been described in detail in the related embodiments and will not be further elaborated here.

[0059] In one possible design, Figure 3 The embodiment shown is an online defect detection system for plastic packaging barrels based on machine vision and deep learning, which can be implemented as a computing device, such as Figure 4 As shown, the computing device may include a storage component 41 and a processing component 42; 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 .

[0060] The processing component 42 is used for the above Figure 1 The embodiment provides an online defect detection method for plastic packaging barrels based on machine vision and deep learning.

[0061] The processing component 42 may 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 may also be implemented as 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 to perform the above method.

[0062] The storage component 41 is configured to store various types of data to support operations at the terminal. The storage component can be implemented by any type of volatile or non-volatile memory device, or a combination thereof, 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 memory, flash memory, magnetic disk, or optical disk.

[0063] Of course, a computing device may also include other components, such as input / output interfaces, display components, communication components, etc.

[0064] The input / output interface provides an interface between the processing component and the peripheral interface module, which can be an output device, an input device, etc.

[0065] The communication component is configured to facilitate, among other things, wired or wireless communications between the computing device and other devices.

[0066] Among them, the computing device can be a physical device or an elastic computing host provided by a cloud computing platform, etc. In this case, the computing device can refer to a cloud server, and the above-mentioned processing components, storage components, etc. can be basic server resources rented or purchased from the cloud computing platform.

[0067] The present application also provides a computer storage medium storing a computer program, wherein the computer program can achieve the above-mentioned Figure 1 The illustrated embodiment provides an online defect detection method for plastic packaging barrels based on machine vision and deep learning.

[0068] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0069] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0070] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer or server) to execute the methods described in each embodiment or certain portions of the embodiments.

[0071] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions 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 barrels based on machine vision and deep learning, characterized in that: include: A visible light sensor and a thermal image sensor are controlled by a synchronous trigger mechanism to collect time-aligned visible light image data and thermal image data of the plastic packaging barrel surface. The thermal image data is then subjected to dynamic range expansion processing to enhance the visual recognizability of the temperature distribution. performing surface reflection suppression processing on the visible light image data to achieve compensation by mapping a visible light reflection noise region with a thermal image stabilization region, and compensating for highlight regions in the visible light image data based on 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 image; Based on the thermal conductivity of the plastic packaging barrel material and the ambient temperature fluctuation of the production line, the temperature reference value of the multimodal thermal and visual fusion image is adjusted. Abnormal temperature areas are identified in the multimodal thermal and visual fusion image under the temperature reference value, and the topological contour features and temperature diffusion features of the abnormal temperature areas are extracted. The topological profile features and the temperature diffusion features are input into a deep learning neural network model to determine the material structure properties and spatial positions of surface defects of plastic packaging barrels, and the material structure properties and spatial position information of the defects are output to achieve online defect detection of the plastic packaging barrels.

2. The method according to claim 1, characterized in that Inputting the topological profile features and the temperature diffusion features into a deep learning neural network model, determining the material structure attributes and spatial location of surface defects of the plastic packaging barrel, and outputting the material structure attributes and spatial location information of the defects, including: Based on the material thickness and defect size range of the plastic packaging barrel, a neural network model was selected that could simultaneously process the shape feature group's total boundary length, area coverage, and shape regularity, as well as the temperature feature group. Pre-training the neural network model, and then using the labeled defect feature data on the trained neural network model, with the topological profile feature and the temperature diffusion feature jointly used as input; The neural network model is used to analyze the shape of the topological profile feature and the distribution pattern of the temperature diffusion feature, and the structural properties of the defect are judged to be bubbles or cracks based on whether the distribution pattern meets the preset shape feature trigger condition and temperature feature verification condition. Based on the analysis results, a classification identifier of the structural attribute and the position 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 in combination with the ambient temperature fluctuation of the production line, the temperature reference value of the multimodal thermal and visual fusion image is adjusted, including: The monitoring value of the production line ambient temperature fluctuation state is obtained in real time through the set temperature sensor; Analyze the material properties of the plastic packaging barrel, and set a temperature correction factor based on the monitored value according to the inherent thermal conductivity of the material in the material properties; Combining the data of multimodal thermal and visual fusion images, the temperature reference value is calculated using preset calculation rules; 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; The temperature values ​​in the multimodal thermal and visual fusion image are updated according to 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, wherein Identifying abnormal temperature areas in the multimodal thermal and visual fusion image under the temperature benchmark reference value, and extracting topological contour features and temperature diffusion features of the abnormal temperature areas, including: Analyzing temperature values ​​in the multimodal thermal and visual fusion image, and marking areas where the temperature values ​​deviate from the temperature reference value by a preset deviation as abnormal temperature areas; Performing boundary positioning on the edge shape of the abnormal temperature area, tracking the edge pixel point coordinate set, and converting the coordinate set to obtain a topological contour feature; Measuring a gradient change pattern of temperature values ​​within the abnormal temperature region from the center to the outside, and analyzing the gradient change pattern to obtain a temperature diffusion characteristic; The coordinate set of the topological profile feature and the numerical sequence of the temperature diffusion feature are output.

5. The method according to claim 1, wherein 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 image, including: Converting the thermal image data into a first channel and the visible light image data into a second channel; Using the temperature value of the first channel and the pixel value of the second channel as input sources, performing overlapping integration at the same pixel position; A fusion calculation using a simple averaging method or a maximum value selection method is performed on the overlapped data, so that the multimodal thermal and visual fusion image simultaneously reflects temperature information and visual information, thereby generating the multimodal thermal and visual fusion image.

6. The method according to claim 1, characterized in that Performing surface reflection suppression processing on the visible light image data to achieve compensation through a mapping relationship between a visible light reflection noise area and a thermal image stabilization area, comprising: 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; locating a spatial position corresponding to the visible light reflection noise region in a thermal image stabilization region; Based on the spatial position, a temperature reference value is obtained from the thermal image stabilization area, and a corresponding conversion relationship is established between the pixel value of the visible light reflection noise area and the temperature reference value of the thermal image stabilization area to obtain a mapping compensation relationship formed by a linear conversion function; The mapping compensation relationship is applied to adjust the pixel values ​​of the visible light reflection noise area so that the pixel values ​​and the temperature reference value of the thermal image stabilization area maintain a coordinated match in the compensated image.

7. The method according to claim 1, characterized in that Compensating for highlight areas in the visible light image data according to temperature distribution information of the thermal image data, comprising: Acquire a temperature value corresponding to a highlight area in the visible light image data from the thermal image data; Calculating a brightness adjustment coefficient of the highlight area based on the temperature value, wherein the brightness adjustment coefficient is inversely proportional to the temperature value; The brightness adjustment coefficient is applied to directly perform scaling compensation on the pixel values ​​of the highlight area, ensuring a smooth transition in brightness between the compensated highlight area and the non-highlight area, and eliminating reflection interference in the visible light image data.

8. An online defect detection system for plastic packaging barrels based on machine vision and deep learning, characterized in that: include: A visible light sensor and a thermal image sensor are controlled by a synchronous trigger mechanism to collect time-aligned visible light image data and thermal image data of the plastic packaging barrel surface. The thermal image data is then subjected to dynamic range expansion processing to enhance the visual recognizability of the temperature distribution. performing surface reflection suppression processing on the visible light image data to achieve compensation by mapping a visible light reflection noise region with a thermal image stabilization region, and compensating for highlight regions in the visible light image data based on 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 image; Based on the thermal conductivity of the plastic packaging barrel material and the ambient temperature fluctuation of the production line, the temperature baseline reference value of the multimodal thermal and visual fusion image is adjusted. Abnormal temperature areas are identified in the multimodal thermal and visual fusion image under the temperature baseline reference value, and the topological contour features and local temperature diffusion features of the abnormal temperature areas are extracted. The topological profile features and local temperature diffusion features are input into a neural network model to determine the material structure properties and spatial positions of surface defects of plastic packaging barrels, and the material structure properties and spatial position information of the defects are output to achieve online defect detection of the plastic packaging barrels.

9. 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 used to be called and executed by the processing component to implement an online defect detection method for plastic packaging barrels based on machine vision and deep learning as described in any one of claims 1 to 7.

10. A computer storage medium, characterized in that A computer program is stored, and when the computer program is executed by a computer, an online defect detection method for plastic packaging barrels based on machine vision and deep learning as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

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

    CN112614164A

  • OCR (optical character recognition) method and system for PCB (printed circuit board) component printing and silk-screen printing

    CN119478644A

  • A smart camera control method and control system based on the Internet of Things

    CN119767137A

  • Intelligent cut tobacco drying process control method and system based on deep learning

    CN120113826A

  • Room obstacle detection optimization method and system based on cross-modal attention mechanism

    CN120178893A

Cited By

  • Online detection system and method for heat sealability of large flexible package

    CN121453843A

  • Tungsten steel die defect detection method and system based on visual inspection

    CN121582192A

  • Tungsten steel mold defect detection method and system based on visual detection

    CN121582192B