A Valve Heat Seal Defect Classification Method and System Based on Infrared Image Region Analysis

By using infrared image region analysis and probability models, and dynamically absorbing interference from environmental temperature and material differences, effective classification of valve heat-sealing defects is achieved, solving the problem of inaccurate classification in complex workshop environments and improving the robustness of detection.

CN122493373APending Publication Date: 2026-07-31QINGDAO LAF TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QINGDAO LAF TECHNOLOGY CO LTD
Filing Date
2026-07-02
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In complex workshop environments, existing technologies suffer from inaccurate classification of valve heat-sealing defects due to environmental temperature fluctuations, differences in film material thickness, and high-speed turbulence interference in infrared video stream data.

Method used

By acquiring the core and extended areas of the target heat-sealed region in infrared images, calculating the thermal field diffusion contrast and successive difference ratio, constructing a probability distribution model, and combining Gaussian parameters and linear regression equations, dynamic feature analysis and soft decision-making are performed to reduce environmental interference and achieve effective classification of valve heat-sealing defects.

Benefits of technology

In complex workshops operating at high speeds, it improves the accuracy of screening and classifying valve heat-sealing defects, enhances the reliability of quality control, and reduces the misjudgment rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122493373A_ABST
    Figure CN122493373A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of image processing and pattern recognition technology, specifically relating to a method and system for classifying valve heat-sealing defects based on infrared image region analysis. The method includes: acquiring the core and extended regions of the target heat-sealed area in the infrared image, constructing a core spatial point set and an extended spatial point set; calculating the thermal field diffusion contrast based on the temperature distribution differences of the point sets; constructing a one-dimensional discrete temperature sequence by arranging the temperature values ​​of the core spatial point sets in a circumferential order, and calculating the successive difference ratio based on the temperature difference between adjacent pixels and the global temperature dispersion; substituting the diffusion contrast and successive difference ratio into an offline constructed probability distribution model and linear regression equation to solve for the basic likelihood score and conditional likelihood score; combining the prior probability to calculate the conditional joint convergence probability of each classification, selecting the classification corresponding to the maximum value as the result, and executing the instruction. This invention effectively decouples features and improves classification reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing and pattern recognition technology. More specifically, this invention relates to a method and system for classifying valve heat-sealing defects based on infrared image region analysis. Background Technology

[0002] In the field of modern industrial logistics packaging, the valve heat sealing process of container liquid packaging bags is a key process that determines the sealing reliability of the entire packaging system. In order to ensure that no defects are missed when the production line is running at high speed, infrared thermal imagers are usually used in industrial sites to monitor the spatial temperature field of the annular heat seal after the heat sealing process in real time without contact. Through dynamic analysis and pattern recognition of the continuous infrared video stream of heat distribution, it is theoretically possible to conduct full inspection online and automatically classify various heat sealing defects.

[0003] Currently, the monitoring of target infrared temperature and defect status mostly adopts theoretical evaluation methods based on static image segmentation and comparison with fixed empirical thresholds. For example, Chinese patent document CN116883979B discloses a comprehensive evaluation method for tension clamps based on semantic segmentation and infrared analysis. It extracts the target contour using a semantic segmentation model and maps it to a temperature matrix, calculates the highest temperature and relative temperature difference, and then determines the defect level based on preset absolute temperature values ​​and temperature difference thresholds. However, when making status determination, this patent document relies on the independent analysis of static single-frame images and idealized fixed threshold rules, ignoring the dynamic evolution of the thermal field distribution under high-speed continuous operation of the actual production line and the thermodynamic changes under complex disturbances, resulting in unreliable evaluation results.

[0004] However, in actual continuous production scenarios, infrared video stream data is highly susceptible to combined interference from ambient temperature fluctuations, differences in film material thickness, and high-speed turbulence. Normal valve heat-sealing areas undergo natural heat conduction and cooling after being removed from the heating mechanism. This normal heat dissipation distribution in the spatiotemporal dimension is often intertwined with temperature differences caused by minor defects. The aforementioned existing technologies are limited by the inherent models of static feature extraction and rigid threshold cutting, lacking physical decoupling of thermodynamic diffusion mechanisms and continuous spatiotemporal fluctuations, and thus cannot identify real defects from such combined interference. Summary of the Invention

[0005] To address the technical problem of inaccurate classification of valve heat sealing defects caused by the cross-interference of multiple features and the lack of physical decoupling in video stream classification models in complex workshop environments, the present invention provides solutions in the following aspects.

[0006] In a first aspect, the present invention provides a method for classifying valve heat-sealing defects based on infrared image region analysis, comprising: acquiring the core area and extended area of ​​the target heat-sealing region in the infrared image, and constructing a core spatial point set and an extended spatial point set; calculating the thermal field diffusion contrast based on the temperature distribution difference between the core spatial point set and the extended spatial point set; constructing a one-dimensional discrete temperature sequence by arranging the temperature values ​​of the core spatial point set in a circumferential order; calculating the successive difference ratio based on the temperature difference between adjacent pixels in the one-dimensional discrete temperature sequence and the global temperature dispersion; and substituting the thermal field diffusion contrast into the probability constructed offline based on the Gaussian parameters of each classification. The distribution model is used to obtain the basic likelihood score for each category. The successive difference ratio is substituted into the linear regression equation fitted offline for each category to obtain the theoretical expected value under the thermal field diffusion contrast constraint. The residual between the successive difference ratio and the theoretical expected value is substituted into the Gaussian probability density function scaled by the standard deviation of the regression residual to calculate the conditional likelihood score for each category. Combining the highest priority probability, basic likelihood score, and conditional likelihood score of each category in the offline optimization, the conditional joint convergence probability for each category is calculated. The category corresponding to the maximum conditional joint convergence probability is selected as the pattern recognition result, and the corresponding hardware closed-loop control command is executed.

[0007] This invention integrates thermodynamic diffusion mechanisms and spatiotemporal laws. By extracting the thermal field diffusion contrast and successive difference ratio, it weakens the underlying interference of environmental temperature changes and thin film material fluctuations. On this basis, it constructs a probabilistic model based on physical causal decoupling, transforming multidimensional continuous features into soft decision-making based on conditional joint convergence probability. This improves the problem of easy failure of single threshold cutting, and enables effective screening and classification of valve heat sealing defects under high-speed operating conditions in complex workshops, thereby improving the reliability of quality control.

[0008] Preferably, the calculated thermal field diffusion contrast satisfies the expression: In the formula, Indicates the thermal field diffusion contrast of the target heat-sealed region; The core average temperature of the target heat-sealing area is the average temperature of all pixels in the core spatial point set. The average temperature of the target heat-sealed area is the average temperature of all pixels in the extended space point set.

[0009] This invention utilizes a relative difference expression constructed from the core uniform temperature and the extension uniform temperature to reflect the physical driving difference of heat diffusion outward, thereby better capturing the disordered heat diffusion phenomenon caused by over-soldering, making up for the shortcomings of static absolute temperature difference assessment which is susceptible to environmental fluctuations, and improving the reliability of feature extraction.

[0010] Preferably, the step of constructing a one-dimensional discrete temperature sequence by arranging the temperature values ​​of the core spatial point set in a circular order includes: establishing a polar coordinate system with the geometric center of the core area as the origin, and sampling the pixels in the core area at equal intervals along the circumference in a counterclockwise direction with the horizontal ray directly to the right of the origin as the polar axis; after sampling, storing the pixel temperature values ​​corresponding to each sampling point into a one-dimensional array in order of increasing polar angle to obtain a one-dimensional discrete temperature sequence.

[0011] Preferably, the calculation of the successive difference ratio includes: calculating the sum of squares of the temperature differences between all adjacent pixels in the one-dimensional discrete temperature sequence as the successive difference term; calculating the sum of squares of the differences between the temperature values ​​of all pixels in the one-dimensional discrete temperature sequence and the average value as the total variance; and taking the ratio of the successive difference term to the total variance as the successive difference ratio.

[0012] This invention utilizes the difference term to capture the microscopic step jump caused by poor soldering and broken soldering, and uses the total variance to effectively absorb the macroscopic temperature change noise caused by material inhomogeneity. This ratio achieves effective separation of high-frequency anomalies and slow temperature changes, enhances the anti-interference ability of feature indicators, and improves the extraction effect of local abrupt change features.

[0013] Preferably, the method for obtaining the probability distribution model is as follows: An offline historical video stream benchmark training library is constructed, including four categories: normal heat sealing, over-welding, cold welding, and broken welding. The thermal field diffusion contrast feature set and the successive difference ratio feature set under steady-state operation for each category are extracted. The mean and standard deviation of the thermal field diffusion contrast corresponding to each category are calculated using standard statistical moment analysis, and used as Gaussian parameters to construct the probability distribution model. The method for obtaining the linear regression equation is as follows: A univariate linear regression analysis is performed on the above two feature sets under each category using the least squares method. The regression slope coefficient, regression intercept constant, and standard deviation of the regression residuals for each category are fitted and obtained. A linear regression equation is constructed using the regression slope coefficient and regression intercept constant.

[0014] Preferably, the method for obtaining the highest priority prior probability for each category in offline optimization is as follows: constructing a historical verification video optimization sample set; constructing a historical verification video optimization sample set; combining the prior probabilities of each category into a four-dimensional optimization vector to maximize the defect classification accuracy of the optimization sample set and minimize the false alarm rate of normal products as a joint optimization objective function; using a grid search algorithm to perform step traversal and convergence iteration in the simplex space to obtain the combination of the highest priority prior probabilities of each category when the comprehensive classification error reaches the global minimum point.

[0015] Preferably, the conditional joint convergence probability of each classification satisfies the expression: In the formula, The first part represents the target heat-sealing area. The conditional joint convergence probability of each category; Indicates the first The highest priority probability of each category; Indicates the thermal field diffusion contrast of the target heat-sealed region In the The basic likelihood score for each category; Indicates the contrast of thermal diffusion in the target heat-sealed area. Successive difference ratio under constraints In the Conditional likelihood scores for each category; , An index representing the category; The total number of categories.

[0016] This invention constructs a full probability chain fraction to effectively map the unidirectional physical dependencies between features. It integrates prior probabilities and various likelihood scores, and uses a dynamically normalized baseline to make smooth soft decisions. This changes the traditional classification model that relies on the assumption of feature independence and the limitation of static empirical thresholds, and can provide a more robust basis for defect identification when faced with interference from complex variables.

[0017] Preferably, the execution of the corresponding hardware closed-loop control command includes: if the pattern recognition result is normal heat sealing, the industrial control computer issues a holding command; if the pattern recognition result is over-welding, cold welding, or broken welding defect, the physical coordinates of the defect are read by the servo encoder pulse lock, and the labeling system is driven to complete the label application at the defect location.

[0018] Preferably, the step of acquiring the core area and extended area of ​​the target heat-sealed region in the infrared image, and constructing the core spatial point set and the extended spatial point set, includes: A continuous video stream is acquired using an infrared thermal imager. The input video stream is matched frame by frame using a preset geometric template to identify two independent feature bands. The central feature band is defined as the core region, and the feature band located around the core region is defined as the extension region. The temperature values ​​of the pixels in the core region and the extension region are extracted respectively to construct the core spatial point set and the extension spatial point set.

[0019] This invention employs streaming media dynamic parsing and spatiotemporal topology alignment to decouple the two-level feature bands of the core region and the extension region. This mechanism separates the core gaps where heat is concentrated from the surrounding heat conduction area, reducing interference from high-speed motion and background disturbances. This provides a more reliable feature recognition data source for the subsequent pattern classifier and improves the stability of target locking.

[0020] Secondly, the present invention provides a valve heat-sealing defect classification system based on infrared image region analysis, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned valve heat-sealing defect classification method based on infrared image region analysis is implemented.

[0021] By adopting the above technical solution, the valve heat sealing defect classification method based on infrared image region analysis is generated into a computer program and stored in a memory for loading and execution by a processor. This allows for the creation of a terminal device based on the memory and processor, facilitating its use.

[0022] The beneficial effects of this invention are as follows: This invention achieves effective defect classification through infrared image region analysis and probabilistic models. It extracts thermal field diffusion contrast and successive difference ratio as feature indicators, realizing dimensionless feature processing and dynamically absorbing macroscopic background noise caused by drastic changes in ambient temperature and material differences, thus reducing visual disturbance interference. On this basis, it introduces probability distribution and conditional density models to restore the evolutionary relationship between defect state constraints on macroscopic diffusion and macroscopic diffusion dominating microscopic fluctuations. It replaces empirical distance measurement and static threshold with continuous joint probability soft decision, enhancing the robustness of high-speed video stream classification under dynamic conditions and improving the overall detection level of heat sealing process. Attached Figure Description

[0023] Figure 1 This is a flowchart illustrating the valve heat sealing defect classification method based on infrared image region analysis in this invention.

[0024] Figure 2 This is a schematic diagram showing a comparison of the classification accuracy of the method of the present invention and the traditional method under different valve heat-sealing conditions. Detailed Implementation

[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0027] This invention discloses a valve heat-sealing defect classification method based on infrared image region analysis, referring to... Figure 1 This includes steps S1-S5: S1. Obtain the core and extended spatial point set of the target heat-sealed area.

[0028] It should be noted that after the valve and diaphragm pass through the heat-sealing and pressing mechanism, under high-speed motion of 24 m / min, the residual energy will be transversely conducted to both the inner and outer sides from the closed annular heat-sealed seam. In order to achieve blind-spot-free classification and recognition, the limitations of low-level processing of single static images are abandoned. Instead, the spatiotemporal characteristics of continuous dynamic video streams are understood. Through frame-by-frame dynamic target tracking and topological analysis of high-speed video streams, the core gap area with the most concentrated heat is decoupled from the peripheral extended area affected by conduction, thereby providing a clean feature recognition data source for the subsequent pattern classifier.

[0029] Specifically, behind the heat sealing process of the upper and lower valves in the workshop, a pre-installed industrial infrared thermal imager is used to synchronously acquire a full-radiation infrared continuous video stream of a 2400mm wide thin-film area at a frame rate of 30Hz. As the production line runs, the system traverses the input video stream frame by frame. In this embodiment, an example is taken from any frame in the video stream for analysis: by performing spatiotemporal dynamic topological alignment and motion target locking with the preset annular valve geometric template inside the industrial control computer, two independent concentric closed feature bands are automatically locked in the dynamic analysis space of the streaming media: the closed annular trajectory center band facing the heat sealing strip is defined as the core area of ​​the target heat sealing area, and the concentric outer ring band with a fixed width close to the outer edge of the core area is defined as the extension area of ​​the target heat sealing area. Then, from the locked video frames, the temperature values ​​of each pixel in the core area are extracted to construct the core space point set, and the temperature values ​​of each pixel in the extension area are extracted simultaneously to construct the extension space point set.

[0030] At this point, the core spatial point set and extended spatial point set of the target heat-sealing area have been obtained.

[0031] S2. Obtain the thermal field diffusion contrast of the target heat-sealed area.

[0032] It should be noted that in the normal valve heat sealing process, heat is highly concentrated and confined within the core gap of the mechanical pressing, resulting in an extremely sharp and distinct temperature boundary between the core area and the unheated extension area. When over-welding defects occur, heat will be conducted uncontrollably to the outer membrane, causing the temperature of the extension area to rise abnormally, and the originally sharp thermal boundary becomes blurred. Traditionally, the absolute temperature difference is subtracted to assess this heat overflow, but this is easily affected by the base interference of the ambient temperature fluctuation in the workshop. Therefore, by projecting the local temperature difference characteristics onto the total heat base, the dimensionless extraction of the spatial temperature distribution characteristics is achieved to capture the phenomenon of blurred thermal boundaries.

[0033] Specifically, the average temperature of all pixels in the core spatial point set of the target heat-sealing region is calculated as the core average temperature, and the average temperature of all pixels in the extended spatial point set is calculated as the extended average temperature. Based on the ratio of the relative difference between the core average temperature and the extended average temperature to their sum, the thermal diffusion contrast of the target heat-sealing region is calculated. The specific calculation formula is as follows:

[0034] In the formula, Indicates the thermal field diffusion contrast of the target heat-sealed region; This indicates the core uniform temperature of the target heat-sealed area; This indicates the uniform temperature of the target heat-sealed area.

[0035] in, It reflects the relative concentration of heat energy distribution and the sharpness of heat dissipation boundaries within the target heat-sealing region. Its construction is based on the theory of relative difference normalization. It reflects the absolute thermal field mode gradient between the heat-sealed seam and the outer film, that is, the physical driving difference of heat diffusion outward; As a dynamic normalized benchmark for the current local thermal state, it effectively absorbs the background noise fluctuations caused by temperature changes in the overall workshop environment. During normal heat sealing, the core temperature is much higher than the extension temperature, and the numerator and denominator values ​​are close, indicating a large contrast value. This shows that the heat energy is successfully confined and highly concentrated in the core area, with a significant mode boundary. However, once an over-welding defect occurs, heat leaks and diffuses over a large area, leading to... abnormal rise and approach At this point, the numerator shrinks sharply while the denominator increases accordingly, causing a significant drop in the value of the entire expression. This means that the spatial constraint pattern of thermal energy is disrupted, and the regional thermal field exhibits obvious characteristics of disordered diffusion and thermal accumulation. It should be added that in a thermally heated scenario, the core temperature must be greater than or equal to the peripheral extension temperature. The value of is within the interval [0,1].

[0036] Thus, the thermal field diffusion contrast of the target heat-sealed region is obtained.

[0037] S3. Obtain the successive difference ratio of the target heat-sealed area.

[0038] It should be noted that, under normal conditions, the heat-sealed seam of a valve exhibits a smooth, closed temperature curve in its continuous infrared video characteristic due to the uniform mechanical pressing force along its circumferential trajectory, with strong spatial autocorrelation between adjacent pixels. However, when a weld break or incomplete weld defect occurs on the production line, a sudden, segmented temperature drop occurs along the circular trajectory due to the loss of local pyrogenetic energy, disrupting the continuity of the sequence characteristics. Traditional difference methods are easily affected by visual interference from random surface jitter caused by the high-speed operation of the production line, resulting in false alarms. Therefore, this step introduces the Von Neumann Successive Difference Statistic, used to assess whether there are unknown structural mutation patterns in discrete sequence characteristics. By dynamically comparing the successive difference terms of the sequence with the global total variance of the sequence, it can automatically filter out the slow macroscopic temperature changes caused by differences in film material and extract the local energy tortuosity characteristics caused by incomplete welds or weld breaks.

[0039] Specifically, a polar coordinate system is established with the geometric center of the core area of ​​the target heat-sealing region as the origin. The horizontal ray to the right of the origin is used as the polar axis. The pixels in the core area are sampled at equal intervals along the circumference in a counterclockwise direction. After sampling, the system stores the temperature values ​​of the pixels corresponding to each sampling point into a one-dimensional array in order of increasing polar angle, thereby completing the dimensional transformation and obtaining a one-dimensional discrete temperature sequence of the target heat-sealing region.

[0040] In this embodiment, the sampling interval is set to That is, 360 data points are sampled for each closed trajectory. This sampling interval is set according to the Nyquist-Shannon Sampling Theorem. This angular resolution sampling can meet the reconstruction of the temperature frequency spectrum of the closed-loop heat sealing trajectory, ensuring that the high-frequency step characteristics caused by poor welding and broken welding can be completely preserved without producing aliasing effects. The implementers can fine-tune the sampling interval according to the optical imaging resolution of the infrared thermal imager, the physical width of the valve heat sealing seam, and the real-time monitoring needs of the production line.

[0041] The sum of squares of temperature differences between all adjacent pixels in the sequence is calculated as a difference-by-difference term characterizing local pattern anomalies. Simultaneously, the average temperature value of all pixels in the sequence is calculated, and the sum of squares of the differences between the temperature value of each pixel and the average value is used as the total variance characterizing global dispersion. The difference-by-difference ratio of the target heat-sealed area is calculated based on the difference-by-difference term and the total variance. The specific calculation formula is as follows:

[0042] In the formula, This represents the successive difference ratio of the target heat-sealed area; The first discrete temperature sequence representing the target heat-sealed region. Temperature value of each pixel at each location; The first discrete temperature sequence representing the target heat-sealed region. Temperature value of each pixel at each location; This represents the average temperature value of all pixels in a one-dimensional discrete temperature sequence of the target heat-sealed region. , This represents the position index and total number in a one-dimensional discrete temperature sequence of the target heat-sealed region.

[0043] The successive difference ratio of the target heat-sealed region is constructed based on the successive difference ratio statistic in the von Neumann successive difference test theorem. The successive difference ratio statistic is equal to the ratio of the successive difference terms of the sequence to the total global variance of the sequence, and is used to reflect whether there is a sudden change. Used to capture the microscopic step transition patterns between features of adjacent spatial nodes, in the core area of ​​normal heat sealing, the temperature difference between features of adjacent points is extremely small, and the numerator term remains at a low level; however, once a defect of broken weld or incomplete weld occurs, the temperature at the defect boundary drops sharply, causing the sum of squares of the differences between adjacent features to expand rapidly. As a benchmark regulator for global total mode variation, it effectively absorbs the macroscopic temperature change noise caused by the unevenness of the thin film material. In summary, the larger the value of the whole fraction, the more the high-frequency drastic anomalies in the one-dimensional discrete temperature sequence of the target heat-sealed region far exceed the normal macroscopic temperature change, which means that the target heat-sealed region may have experienced energy fault mode destruction in its physical structure.

[0044] At this point, the successive difference ratio of the target heat-sealed area is obtained.

[0045] S4. Construct a probabilistic model to solve for the conditional joint convergence probability of the classification.

[0046] It should be noted that in the actual thermodynamic evolution mechanism of valve heat sealing, various visual features are actually driven by underlying physical laws, and there are dependency chains among them: the defect classification state directly determines the strength of the macroscopic thermal field leakage constraint, that is, it determines the steady-state performance of the regional thermal field diffusion contrast; while the change of the macroscopic thermal constraint boundary, such as the thermal field spread caused by excessive melting of the film, serves as a prerequisite physical environment, further constraining the continuous fluctuation of energy along the gap, and thus dominating the change of the successive difference ratio; in order to map the above conditional dependency laws, this step introduces the classic Gaussian Bayesian Network. This network, in the form of a directed acyclic graph, transforms the above dependency chain into a fully probabilistic chain primitive, and combines the statistical parameters of the offline benchmark sample set for data-driven processing, transforming discrete features into continuous probabilistic soft decisions, thereby achieving high-confidence pattern classification under complex dynamic conditions.

[0047] Specifically, an offline historical video stream benchmark training library is constructed, including four categories: normal heat sealing, over-welding, cold welding, and broken welding. For each category, the thermal field diffusion contrast feature set and the successive difference ratio feature set under long-term steady-state operation are extracted. The following offline parameters are obtained: First, the mean and standard deviation of the thermal field diffusion contrast corresponding to each category are calculated through standard statistical moment analysis. Second, univariate linear regression analysis is performed on the two feature sets under each category using the least squares method, with thermal field diffusion contrast as the independent variable and successive difference ratio as the dependent variable, to obtain the regression slope coefficient, regression intercept constant, and standard deviation of the regression residuals for each category. Third, a set of historical verification video optimization sample sets independent of the above training library is constructed. The prior probabilities of each category are combined into a four-dimensional optimization vector to maximize the defect classification accuracy of the optimization sample set and minimize the false alarm rate of normal products as the joint optimization objective function. The well-known grid search algorithm for pattern recognition is used. Search performs stepwise traversal and convergence iterations within the simplex space to obtain the global highest priority probability combination when the comprehensive classification error reaches the global minimum point, which serves as a fixed constant for subsequent online decision-making.

[0048] For the thermal field diffusion contrast and successive difference ratio of the target heat-sealed region, the mapping and calculation of various real-time probability indices are performed: By using the well-known univariate normal distribution probability density function as a mapping tool, the thermal field diffusion contrast of the target heat-sealed region is substituted into the probability distribution model with the mean and standard deviation of the thermal field diffusion contrast calculated offline for each category as Gaussian parameters. The mapping calculation yields the basic likelihood score of the thermal field diffusion contrast for each category.

[0049] By invoking a well-known continuous linear Gaussian conditional density model, the successive difference ratio of the target heat-sealed region is substituted into the linear regression equation fitted offline for each category to obtain the theoretical expected value of the successive difference ratio under the thermal field diffusion contrast constraint. Subsequently, the residual between the successive difference ratio of the target heat-sealed region and the theoretical expected value is calculated, and this residual is used as the independent variable and substituted into the Gaussian probability density function scaled by the standard deviation of the regression residuals calculated offline for each category to solve for the conditional likelihood score of the successive difference ratio under the thermal field diffusion contrast constraint for each category.

[0050] Substituting the highest priority probability of each category, the basic likelihood score of thermal diffusion contrast for each category, and the conditional likelihood score of the difference ratio under the thermal diffusion contrast constraint for each category into the standard Bayesian network full probability chain model, we obtain the conditional joint convergence probability for each category; satisfying the expression:

[0051] In the formula, The first part represents the target heat-sealing area. The conditional joint convergence probability of each category; Indicates the first The highest priority probability of each category; Indicates the thermal field diffusion contrast of the target heat-sealed region In the The basic likelihood score for each category; Indicates the contrast of thermal diffusion in the target heat-sealed area. Successive difference ratio under constraints In the Conditional likelihood scores for each category; , An index representing the category; The total number of categories.

[0052] in, It maps the unidirectional classification feature chain of thermal field diffusion contrast performance in video mode features to the successive difference ratio; the denominator term serves as a dynamic normalization reference surface that satisfies the constraints of the total probability formula, and the final calculated value of the entire total probability chain fraction is... The larger the value, the more likely it is that, under the premise of following the characteristic constraints, the joint pattern evolution path of the target thermosynthetic region is similar to that of the first... The higher the statistical causal chain matching degree of the first category, the more likely it is that the target heat-seized region is identified as the first category. The highest confidence level is achieved for each category, thus enabling smooth conditional probability soft decision.

[0053] At this point, the conditional joint convergence probability of each category of the target heat-sealed region has been obtained.

[0054] S5. Classification and control are achieved based on the combined convergence probability of the conditions.

[0055] It should be noted that the mode conditional convergence probability classification of the video stream is directly converted into precise hardware driving instructions, ensuring that the classification results can accurately connect to the high-precision servo encoder and pneumatic labeler while triggering the audible and visual alarm, thus meeting the rigid requirements of continuous automated and safe production in the IBC workshop.

[0056] Specifically, for the target heat-sealed area, the conditional joint convergence probability of each category is obtained, and the category corresponding to the maximum value of the conditional joint convergence probability is selected as the final pattern recognition category of the target heat-sealed area. If the pattern recognition result is normal heat sealing, the industrial control computer issues a hold command, and the production line continues to operate smoothly. If the pattern recognition result is over-welding, cold welding, or broken welding defects, the industrial control computer software immediately pops up a window and generates a unique quality traceability code. Within 1 second, the system outputs a switch level signal through the PLC to trigger a three-color light alarm on site. At the same time, the system reads the servo encoder pulse in real time to lock the geometric and physical coordinates of the current category defect on the 2400mm wide film, and drives the pneumatic labeling system to automatically complete the defect label application within the physical accuracy range of the defect position.

[0057] For example, Figure 2 This graph compares the classification accuracy of the method of this invention with that of the traditional method under different valve heat-sealing states. The horizontal axis represents different valve heat-sealing classification states, specifically including normal heat-sealing, over-welding, cold welding, and broken welding. The vertical axis represents the percentage of classification accuracy of pattern recognition. The data in the graph is based on a large number of real infrared streaming video stream test sets collected from high-speed continuous operation production lines in industrial sites. The data was obtained through testing and statistics under actual working conditions with multiple complex composite interferences, including ambient temperature fluctuations, differences in film material thickness, and high-speed airflow disturbances. Under normal heat-sealing state, the accuracy of this invention steadily improves from 88.5% of the traditional method to 97.2%. In the detection of the three types of defects, namely over-welding, cold welding, and broken welding, the traditional method is limited by static hard thresholds and empirical distance measurements, which easily misjudge normal physical cooling and temperature differences and background disturbances as defects, resulting in a significant drop in its classification accuracy, which is only between 43% and 47%. However, the method of this invention uses conditional joint probability soft decision, which increases the identification accuracy of the three types of defects to 85.4%, 86.3%, and 89.1%, respectively.

[0058] This invention also discloses a valve heat-sealing defect classification system based on infrared image region analysis, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement the valve heat-sealing defect classification method based on infrared image region analysis according to this invention.

[0059] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.

Claims

1. A method for classifying valve heat-sealing defects based on infrared image region analysis, characterized in that, include: Obtain the core area and extended area of ​​the target heat-sealed region in the infrared image, and construct the core spatial point set and the extended spatial point set; The thermal field diffusion contrast is calculated based on the temperature distribution difference between the core spatial point set and the extended spatial point set. The temperature values ​​of the core spatial point set are arranged in a circular order to construct a one-dimensional discrete temperature sequence; the successive difference ratio is calculated based on the temperature difference between adjacent pixels in the one-dimensional discrete temperature sequence and the global temperature dispersion. Substitute the thermal field diffusion contrast into the probability distribution model constructed offline based on Gaussian parameters for each category to obtain the basic likelihood score for each category. Substitute the successive difference ratio into the linear regression equation of each category for offline fitting to obtain the theoretical expected value under the thermal field diffusion contrast constraint; substitute the residual between the successive difference ratio and the theoretical expected value into the Gaussian probability density function scaled by the standard deviation of the regression residual to calculate the conditional likelihood score of each category; combine the highest priority probability, basic likelihood score and conditional likelihood score of each category for offline optimization to calculate the conditional joint convergence probability of each category. The classification corresponding to the maximum joint convergence probability is selected as the pattern recognition result, and the corresponding hardware closed-loop control instructions are executed.

2. The valve heat-sealing defect classification method based on infrared image region analysis according to claim 1, characterized in that, The calculated thermal field diffusion contrast satisfies the expression: ; In the formula, Indicates the thermal field diffusion contrast of the target heat-sealed region; The core average temperature of the target heat-sealing area is the average temperature of all pixels in the core spatial point set. The average temperature of the target heat-sealed area is the average temperature of all pixels in the extended space point set.

3. The valve heat-sealing defect classification method based on infrared image region analysis according to claim 1, characterized in that, The step of constructing a one-dimensional discrete temperature sequence by arranging the temperature values ​​of the core spatial point set in a circular order includes: A polar coordinate system is established with the geometric center of the core area as the origin, and the horizontal ray to the right of the origin is used as the polar axis. The pixels in the core area are sampled at equal intervals along the circumference in a counterclockwise direction. After sampling, the pixel temperature values ​​corresponding to each sampling point are stored in a one-dimensional array in order of increasing polar angle to obtain a one-dimensional discrete temperature sequence.

4. The valve heat-sealing defect classification method based on infrared image region analysis according to claim 1, characterized in that, The calculation of the successive difference ratio includes: Calculate the sum of squares of the temperature differences between all adjacent pixels in the one-dimensional discrete temperature sequence as the successive difference term; calculate the sum of squares of the differences between the temperature values ​​of all pixels in the one-dimensional discrete temperature sequence and the average value as the total variance; and use the ratio of the successive difference term to the total variance as the successive difference ratio.

5. The valve heat-sealing defect classification method based on infrared image region analysis according to claim 1, characterized in that, The method for obtaining the probability distribution model is as follows: An offline historical video stream benchmark training library was constructed, comprising four categories: normal heat sealing, over-welding, cold solder joint, and broken solder joint. The thermal field diffusion contrast feature set and successive difference ratio feature set under steady-state operation for each category were extracted. The mean and standard deviation of the thermal field diffusion contrast for each category were calculated using standard statistical moment analysis, and used as Gaussian parameters to construct a probability distribution model. The linear regression equation was obtained by performing univariate linear regression analysis on the two feature sets for each category using the least squares method, fitting and obtaining the regression slope coefficient, regression intercept constant, and standard deviation of the regression residuals for each category. A linear regression equation was constructed using the regression slope coefficient and regression intercept constant.

6. The valve heat-sealing defect classification method based on infrared image region analysis according to claim 1, characterized in that, The method for obtaining the highest priority probability of offline optimization for each category is as follows: Construct a historical verification video optimization sample set; combine the prior probabilities of each category into a four-dimensional optimization vector to maximize the defect classification accuracy of the optimization sample set and minimize the false alarm rate of normal products as a joint optimization objective function; use a grid search algorithm to perform step traversal and convergence iteration in the simplex space to obtain the highest priority prior probability combination of each category when the comprehensive classification error reaches the global minimum point.

7. The valve heat-sealing defect classification method based on infrared image region analysis according to claim 1, characterized in that, The conditional joint convergence probability of each classification satisfies the expression: ; In the formula, The first part represents the target heat-sealing area. The conditional joint convergence probability of each category; Indicates the first The highest priority probability of each category; Indicates the thermal field diffusion contrast of the target heat-sealed region In the The basic likelihood score for each category; Indicates the contrast of thermal diffusion in the target heat-sealed area. Successive difference ratio under constraints In the Conditional likelihood scores for each category; , An index representing the category; The total number of categories.

8. The valve heat-sealing defect classification method based on infrared image region analysis according to claim 1, characterized in that, The execution of the corresponding hardware closed-loop control instructions includes: If the pattern recognition result is normal heat sealing, the industrial control computer issues a hold command; if the pattern recognition result is over-welding, cold welding, or broken welding defects, the physical coordinates of the defect are locked by reading the servo encoder pulse, and the labeling system is driven to complete the label application at the defect location.

9. The valve heat-sealing defect classification method based on infrared image region analysis according to claim 1, characterized in that, The process of acquiring the core and extended regions of the target heat-sealed area in the infrared image and constructing the core spatial point set and the extended spatial point set includes: A continuous video stream is acquired using an infrared thermal imager. The input video stream is matched frame by frame using a preset geometric template to identify two independent feature bands. The central feature band is defined as the core region, and the feature band located around the core region is defined as the extension region. The temperature values ​​of the pixels in the core region and the extension region are extracted respectively to construct the core spatial point set and the extension spatial point set.

10. A valve heat-sealing defect classification system based on infrared image region analysis, characterized in that, include: A processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement the valve heat-sealing defect classification method based on infrared image region analysis according to any one of claims 1-9.