Electrical fire hazard sensing method based on infrared thermal imaging

By performing median filtering and sliding window processing on the thermal image image of the infrared thermal imager, combined with the support vector machine classification, the false alarm and missed alarm problems of traditional infrared thermal imaging ball machines in electrical fire hazard monitoring are solved, and the correct Accurate identification of different types of equipment and accurate perception of electrical fire hazards.

CN119251595AInactive Publication Date: 2025-01-03成都市消防安全治理技术保障中心

Patent Information

Application Number
CN202411765121.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-01-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional infrared thermal imaging ball machines are prone to false alarms and missed reports when monitoring electrical fire hazards, especially in complex temperature environments, which are difficult to accurately identify the high temperature warning thresholds and fault temperatures of different types of equipment, resulting in missed reports and missed reports and missed reports.

Method used

By obtaining the thermal image map taken by the infrared thermal imager, performing median filtering and sliding window processing, aggregation classification and support vector machine classification, setting alarm temperature thresholds, achieving accurate identification of different types of equipment and accurate perception of electrical fire hazards.

Benefits of technology

It effectively eliminates noise in thermal image images, improves temperature perception accuracy, realizes accurate identification of different types of equipment and real-time automatic alarms, and reduces the false alarm and missed rate of electrical fire hazards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251595A_ABST
    Figure CN119251595A_ABST
Patent Text Reader

Abstract

The invention discloses an electrical fire hazard sensing method based on infrared thermal imaging, and belongs to the technical field of fire-fighting early warning, and the method comprises the following steps: obtaining a thermogram shot by an infrared thermal imager; constructing a sliding window, and carrying out median filtering on the thermogram to obtain a thermogram after median filtering; performing pixel feature aggregation classification based on the thermal image after median filtering to obtain a thermal image classification result; and based on a thermogram classification result, respectively setting alarm temperature thresholds of corresponding areas of various monitoring devices, and obtaining an electrical fire hazard sensing result. According to the invention, the problems of false alarm and missing alarm when electrical fire hazard alarm is carried out through infrared thermal imaging are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of fire warning, and in particular relates to an electrical fire hazard perception method based on infrared thermal imaging. Background Art

[0002] At present, electrical fires are on the rise, ranking first among all types of fires. Electrical fires refer to fires caused by the release of heat energy and increased temperature due to faults in electrical lines and equipment, which ignite the body or other combustibles when the combustion conditions are met. The main causes of electrical fires are short circuits, leakages, arcs, and overloads caused by faults in electrical lines and electrical equipment. The fire department needs to conduct pre-detection and in-process monitoring of electrical fire hazards on site during various large-scale mass activities or major security tasks. However, due to the complexity of the electrical lines and equipment on site, especially in high altitudes, hidden places and other places that are difficult for people to access, there is a lack of effective perception of electrical fire hazards.

[0003] Traditional infrared thermal imaging cameras can basically measure the internal temperature of a site, and they mainly issue alarms based on the set alarm temperature threshold. However, the temperature environment on site is complex, and the temperature of various types of equipment varies greatly when they are working. Different types of equipment have different high temperature warning thresholds and fault temperatures, which can easily lead to false alarms and missed alarms. Traditional infrared thermal imaging cameras are difficult to trigger alarms when the temperature of individual devices of the same type of equipment increases, and are prone to missed alarms. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, the electrical fire hazard perception method based on infrared thermal imaging provided by the present invention solves the problems of false alarm and missed alarm when performing electrical fire hazard alarm through infrared thermal imaging.

[0005] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is:

[0006] The present invention provides an electrical fire hazard perception method based on infrared thermal imaging, comprising the following steps:

[0007] S1, obtaining a thermal image taken by an infrared thermal imager;

[0008] S2, constructing a sliding window, performing median filtering on the thermal image, and obtaining a thermal image after median filtering;

[0009] S3, performing pixel feature aggregation classification based on the thermal image after median filtering to obtain a thermal image classification result;

[0010] S4. Based on the classification results of the thermal images, the alarm temperature thresholds of the corresponding areas of various types of monitoring equipment are set respectively to obtain the electrical fire hazard perception results.

[0011] The beneficial effects of the present invention are as follows: the present invention provides an electrical fire hazard perception method based on infrared thermal imaging, which makes the pixels in the thermal image closer to the true value after median filtering the thermal image taken by the infrared thermal imager, eliminates isolated noise points, and improves the perception ability of the temperature characteristics of the thermal image based on the grayscale attribute; by aggregating and classifying the thermal image after the median filtering, the accurate identification and division of the corresponding areas of different types of monitoring equipment is realized, providing a basis for targeted electrical fire hazard monitoring and early warning of various types of monitoring equipment; by setting the alarm temperature threshold for the corresponding area of ​​each type of monitoring equipment respectively, it is possible to effectively compare the pixel temperature with the alarm temperature threshold corresponding to the area to which the pixel belongs according to the temperature information of each pixel in the thermal image taken by the infrared thermal imager, obtain the temperature comparison result, and thus generate an accurate electrical fire hazard perception result; the present invention realizes the accurate identification and classification of different types of equipment in the thermal image taken by the infrared thermal imager, and can realize real-time automatic and accurate alarm when any device of the same type exceeds the alarm temperature threshold of the device of this type.

[0012] Furthermore, S2 comprises the following steps:

[0013] S21, construct a sliding window of size N×N;

[0014] S22, sliding the sliding window on the thermal image row by row from left to right, so that the center of the sliding window coincides with each pixel in the thermal image;

[0015] S23, when the center of the sliding window coincides with different pixels in the thermal image, extract the grayscale value of each pixel in the sliding window, and obtain the central grayscale value of the sliding window based on a median filter;

[0016] S24, assigning the grayscale value of the center of the sliding window to the pixel at the center of the sliding window until the center of the sliding window traverses all pixels in the thermal image, thereby obtaining a thermal image after median filtering.

[0017] The beneficial effect of adopting the above further scheme is: the present invention provides a method for performing traversal median filtering on thermal images through a sliding window, and the thermal images obtained after median filtering effectively eliminate noise, improve the authenticity and temperature perception of the thermal images, and provide a basis for accurately classifying different types of monitoring equipment in thermal images and identifying electrical fire hazards.

[0018] Furthermore, the calculation expression of the median filter is as follows:

[0019] ,

[0020] in, Indicates the pixel position of the thermal image after median filtering The gray value at represents the median operation, Indicates the thermal image at the pixel position The gray value at Indicates the thermal image at the pixel position The gray value at , i represents the pixel in the i-th row of the thermal image, j represents the pixel in the j-th column of the thermal image, r represents the pixel row offset, s represents the pixel column offset, A represents the filter window offset set, Represents the set of all pixel locations in the thermal image.

[0021] The beneficial effect of adopting the above-mentioned further scheme is as follows: the present invention provides a method for calculating the median filter, which performs median filtering on the pixels in the sliding window and assigns the grayscale median, so that the grayscale value of the neighborhood pixels of the center pixel of the window is closer to the true value, and effectively eliminates noise points, thereby improving the temperature perception accuracy of the thermal image, and providing a basis for accurately identifying and dividing different types of monitoring equipment in the thermal image.

[0022] Furthermore, S3 comprises the following steps:

[0023] S31, constructing an initial cluster center based on the thermal image after median filtering according to the number of categories of monitoring equipment in the thermal image;

[0024] S32, according to the gray value pixel distribution sequence, based on the Tanimoto measurement method and the maximum similarity principle, the initial cluster center is iterated to obtain the target cluster center;

[0025] S33. According to the target cluster center, the monitoring equipment in the thermal image is classified by using a support vector machine to obtain a classification result of the thermal image monitoring equipment.

[0026] The beneficial effects of adopting the above-mentioned further scheme are as follows: the present invention constructs the initial cluster center according to the category data of the monitoring equipment in the thermal image, which can effectively ensure the accuracy of the final identification of different categories of monitoring equipment, thereby providing a basis for setting the alarm temperature threshold in a targeted manner to perceive electrical fire hazards of different types of monitoring equipment; the initial cluster center is iterated by the Tanimoto measure method and the maximum similarity principle to obtain the target cluster center, and the different types of monitoring equipment in the thermal image are efficiently and accurately identified and classified based on the characteristics of the pixel gray value in the thermal image by using the Tanimoto measure method and the maximum similarity principle; the monitoring equipment in the thermal image is classified by using a support vector machine according to the target cluster center, and the pixels in the thermal image are divided into regions according to the shape characteristics of different types of equipment, providing a basis for accurately and targetedly identifying equipment with electrical fire hazards in different types of equipment in the thermal image.

[0027] Furthermore, the S31 includes the following steps:

[0028] S311, according to the gray value of each pixel in the thermal image after median filtering, obtain the number of pixels corresponding to each gray value by counting;

[0029] S312, arranging the grayscale values ​​and their corresponding pixel numbers in order from small to large or from large to small to obtain a grayscale value pixel distribution sequence;

[0030] The calculation expression of the gray value pixel distribution sequence is as follows:

[0031] ,

[0032] in, represents the gray value pixel distribution sequence, represents the i-th gray value, Represents the number of pixels corresponding to the i-th gray value, where , N is the length of the gray value pixel distribution sequence;

[0033] S313, constructing a grayscale histogram according to the grayscale value pixel distribution sequence, and selecting m grayscale categories to obtain a pixel set corresponding to each grayscale category;

[0034] S314, respectively obtaining the median grayscale value in the pixel set corresponding to each grayscale classification as the initial cluster center;

[0035] S315, obtaining the number k of categories of monitoring equipment in the thermal image;

[0036] S316, determine whether k is less than or equal to m, if so, proceed to S318, otherwise proceed to S317;

[0037] S317, according to the gray value pixel distribution sequence, based on the gray histogram, select m+1 grayscale categories, and obtain the pixel set corresponding to each grayscale category, and return to S314;

[0038] S318. According to the pixel sets corresponding to each grayscale classification, k median grayscale values ​​are selected to obtain k initial clustering centers.

[0039] The beneficial effects of adopting the above-mentioned further scheme are as follows: the present invention constructs a grayscale value pixel distribution sequence according to the grayscale value and its corresponding number of pixels, and realizes the grayscale classification of pixels in the thermal image by constructing a grayscale histogram. By effectively determining the initial clustering center according to the number of categories of monitoring equipment in the thermal image, it provides a basis for accurately identifying and classifying monitoring equipment of each category in the thermal image, and at the same time provides a guarantee for accurate perception of electrical fire hazards in various types of monitoring equipment.

[0040] Further, the S32 comprises the following steps:

[0041] S321, respectively calculating the first Tanimoto measure between the pixel corresponding to each gray value in the gray value pixel distribution sequence and each initial cluster center;

[0042] S322, according to the maximum similarity principle, assigning pixels corresponding to each gray value in the gray value pixel distribution sequence to the gray classification to which the initial cluster center having the smallest first Tanimoto measure with the gray value of the pixel belongs, to obtain the current classification result;

[0043] S323, taking the median of the grayscale values ​​of all pixels in each grayscale classification in the current classification result as a new cluster center;

[0044] S324, respectively calculating the first Tanimoto measure between the pixel corresponding to each gray value in the gray value pixel distribution sequence and each new cluster center;

[0045] S325. Use the new cluster center as the initial cluster center, and repeat S322-S324 to iterate the cluster center until the minimum second Tanimoto measure between the cluster centers after two adjacent cluster center iterations is greater than the preset Tanimoto measure threshold, stop the cluster center iteration, and obtain the target cluster center.

[0046] The beneficial effect of adopting the above further scheme is: the present invention realizes the preliminary classification of thermal image pixels through the first Tanimoto measure between the pixels corresponding to each grayscale value in the arc pixel distribution sequence and each initial cluster center, and the maximum similarity principle, and then redetermines the new cluster center based on the continuous internal determination of each grayscale classification, and determines the cluster center after two consecutive cluster center iterations with the minimum second Tanimoto measure, thereby determining the target cluster center, realizing accurate identification of different types of monitoring equipment, and providing a basis for accurately dividing the areas corresponding to different types of monitoring equipment in the thermal image.

[0047] Further, the S33 comprises the following steps:

[0048] S331, extracting the gray value of each pixel in the thermal image, and taking the gray value of each pixel as a sample;

[0049] S332, constructing an interval surface maximization model of support vector machine;

[0050] The calculation expression of the interval surface maximization model is as follows:

[0051] ,

[0052] ,

[0053] ,

[0054] in, represents the minimization function based on the weight vector, bias term and interval bound slack variables, represents the weight vector, b represents the bias term, represents the interval bounding slack variable, Indicates that, represents the distance from the sample to the interval boundary, represents the i-th sample, represents the dot product operation, l represents the total number of samples, represents the square of the Euclidean norm of the weight vector, represents the sample label of the i-th sample, Indicates belonging to;

[0055] S333, constructing a first Lagrangian parameter optimization model for the interval surface maximization model of the support vector machine;

[0056] The calculation expression of the first Lagrangian parameter optimization model is as follows:

[0057] ,

[0058] in, represents the first Lagrangian parameter optimization function, a represents the Lagrangian multiplier, represents the i-th Lagrange multiplier, represents the regularization parameter;

[0059] S334, setting optimization constraints of the first Lagrangian parameter optimization model;

[0060] The calculation expression of the optimization constraint of the Lagrangian parameter optimization model is as follows:

[0061] ,

[0062] ,

[0063]

[0064] in, It means that the Lagrangian parameter optimization function takes partial derivative of the weight vector. It means that the Lagrangian parameter optimization function takes partial derivative of the bias term. It represents the partial derivative of the Lagrangian parameter optimization function with respect to the interval boundary slack variables;

[0065] S335, substituting the optimization constraints of the Lagrangian parameter optimization model into the first Lagrangian parameter optimization model to obtain a second Lagrangian parameter optimization model;

[0066] The calculation expression of the second Lagrangian parameter optimization model is as follows:

[0067] ,

[0068] in, represents the second Lagrangian parameter optimization model, represents the jth Lagrange multiplier, represents the sample label of the jth sample, represents the i-th sample;

[0069] S336, optimizing the model according to the second Lagrangian parameter to obtain an optimal solution of the optimization model;

[0070] The calculation expression of the optimal solution of the optimization model is as follows:

[0071] ;

[0072] S337. Based on the optimal solution of the optimization model, a dual Lagrangian parameter optimization model is obtained;

[0073] The calculation expression of the dual Lagrangian parameter optimization model is as follows:

[0074]

[0075] in, represents the dual Lagrangian parameter optimization function;

[0076] S338. Based on the dual Lagrangian parameter optimization model, an optimal Lagrangian parameter optimization model is obtained;

[0077] The calculation expression of the optimal Lagrangian parameter optimization model is as follows:

[0078] ,

[0079] ,

[0080] ,

[0081] in, represents the minimization function based on Lagrange multipliers;

[0082] S339. According to the optimal Lagrangian parameter optimization model, the pixels in the thermal image are classified using a support vector machine to obtain a thermal image classification result.

[0083] The beneficial effect of adopting the above further scheme is: the present invention provides optimization of the support vector machine using the Lagrangian optimization model to set a precise interval surface, thereby achieving accurate identification and division of pixel areas corresponding to different monitoring devices in the thermal image, and providing a basis for accurate electrical fire hazard perception of different types of monitoring equipment.

[0084] Furthermore, the S4 comprises the following steps:

[0085] S41. Based on the classification results of the thermal images, corresponding areas of various monitoring devices are obtained;

[0086] S42, setting alarm temperature thresholds for the corresponding areas of various monitoring devices;

[0087] S43, extracting the temperature value corresponding to each pixel in the thermal image, and comparing the temperature value of each pixel with the alarm temperature threshold of the corresponding area of ​​the monitoring device to which the pixel belongs, to obtain a temperature comparison result;

[0088] S44, if there is a pixel point whose temperature value is greater than or equal to the alarm temperature threshold of the area corresponding to the monitoring device to which the pixel point belongs, then based on the position information of the pixel, an electrical fire hazard perception result at the pixel position is generated as the existence of a fire hazard;

[0089] S45. If the temperature values ​​of the pixels are all less than the alarm temperature threshold of the area corresponding to the monitoring device to which the pixels belong, the electrical fire hazard perception result is that there is no fire hazard.

[0090] The beneficial effect of adopting the above-mentioned further scheme is as follows: the present invention utilizes the temperature information carried by each pixel in the thermal image, combined with the lower pixel area corresponding to each type of monitoring equipment identified, to realize differentiated temperature perception and early warning for different types of monitoring equipment in the thermal image, and can also realize accurate perception of electrical fire hazards existing in the same type of monitoring equipment according to the pixel position.

[0091] Other advantages of the present invention will be analyzed in more detail in subsequent embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0092] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0093] Figure 1 The block diagram is a method for sensing electrical fire hazards based on infrared thermal imaging in an embodiment of the present invention. DETAILED DESCRIPTION

[0094] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.

[0095] like Figure 1 As shown, in one embodiment of the present invention, the present invention provides an electrical fire hazard perception method based on infrared thermal imaging, comprising the following steps:

[0096] S1, obtaining a thermal image taken by an infrared thermal imager;

[0097] S2, constructing a sliding window, performing median filtering on the thermal image, and obtaining a thermal image after median filtering;

[0098] The S2 comprises the following steps:

[0099] S21, construct a sliding window of size N×N;

[0100] S22, sliding the sliding window on the thermal image row by row from left to right, so that the center of the sliding window coincides with each pixel in the thermal image;

[0101] S23, when the center of the sliding window coincides with different pixels in the thermal image, extract the grayscale value of each pixel in the sliding window, and obtain the central grayscale value of the sliding window based on a median filter;

[0102] In this embodiment, the center pixel value of the sliding window is the grayscale value located in the middle after the grayscale values ​​of the pixels in the sliding window are sorted in ascending order by the median filter, or the average of the two grayscale values ​​located in the middle. The grayscale value usually ranges from 0 to 255 and can be represented by 8-bit binary data.

[0103] The calculation expression of the median filter is as follows:

[0104] ,

[0105] in, Indicates the pixel position of the thermal image after median filtering The gray value at represents the median operation, Indicates the thermal image at the pixel position The gray value at Indicates the thermal image at the pixel position The gray value at , i represents the pixel in the i-th row of the thermal image, j represents the pixel in the j-th column of the thermal image, r represents the pixel row offset, s represents the pixel column offset, A represents the filter window offset set, Represents the set of all pixel locations in the thermal image.

[0106] S24, assigning the grayscale value of the center of the sliding window to the pixel at the center of the sliding window until the center of the sliding window traverses all pixels in the thermal image, thereby obtaining a thermal image after median filtering.

[0107] S3, performing pixel feature aggregation classification based on the thermal image after median filtering to obtain a thermal image classification result;

[0108] The S3 comprises the following steps:

[0109] S31, constructing an initial cluster center based on the thermal image after median filtering according to the number of categories of monitoring equipment in the thermal image;

[0110] The S31 comprises the following steps:

[0111] S311, according to the gray value of each pixel in the thermal image after median filtering, obtain the number of pixels corresponding to each gray value by counting;

[0112] S312, arranging the grayscale values ​​and their corresponding pixel numbers in order from small to large or from large to small to obtain a grayscale value pixel distribution sequence;

[0113] In this embodiment, the calculation expression of the gray value pixel distribution sequence is as follows:

[0114] ,

[0115] in, represents the gray value pixel distribution sequence, represents the i-th gray value, Represents the number of pixels corresponding to the i-th gray value, where , N is the length of the gray value pixel distribution sequence;

[0116] S313, constructing a grayscale histogram according to the grayscale value pixel distribution sequence, and selecting m grayscale categories to obtain a pixel set corresponding to each grayscale category;

[0117] S314, respectively obtain the median grayscale value in the pixel set corresponding to each grayscale classification as the initial cluster center; in this embodiment, at most one median grayscale value is selected from a pixel set of one grayscale classification.

[0118] S315, obtaining the number k of categories of monitoring equipment in the thermal image;

[0119] S316, determine whether k is less than or equal to m, if so, proceed to S318, otherwise proceed to S317;

[0120] S317, according to the gray value pixel distribution sequence, based on the gray histogram, select m+1 grayscale categories, and obtain the pixel set corresponding to each grayscale category, and return to S314;

[0121] In this embodiment, when the number of selected grayscale categories is less than the number of categories of monitoring devices in the thermal image, the number of selected grayscale categories is increased to meet the requirement of finally classifying and identifying the device category in the thermal image to be identified.

[0122] S318. According to the pixel sets corresponding to each grayscale classification, k median grayscale values ​​are selected to obtain k initial clustering centers.

[0123] In this embodiment, if k is less than or equal to m, the median grayscale value in the k pixel sets with the most uniform distribution of pixel grayscale values ​​is directly selected from the pixel sets corresponding to the m grayscale classifications, thereby obtaining k initial cluster centers; if k is greater than m, by adding grayscale classifications, when k is equal to m, exactly k grayscale classifications will be obtained, so that k median grayscale values ​​can be selected from the pixel sets corresponding to each grayscale classification as k initial cluster centers. The more uniform the distribution of pixel grayscale values ​​in the pixel set corresponding to the grayscale classification, the more likely it is that it is the same type of monitoring equipment monitored by the thermal image, thereby providing a basis for accurately identifying and segmenting the same type of monitoring equipment monitored in the thermal image, and k and m are both positive integers.

[0124] S32, according to the gray value pixel distribution sequence, based on the Tanimoto measurement method and the maximum similarity principle, the initial cluster center is iterated to obtain the target cluster center;

[0125] The S32 comprises the following steps:

[0126] S321, respectively calculating the first Tanimoto measure between the pixel corresponding to each gray value in the gray value pixel distribution sequence and each initial cluster center;

[0127] The Tanimoto measure is usually used to measure the similarity between two objects (sets, vectors, etc.). Compared with other similarity measures, the Tanimoto measure performs well when processing binary features or chemical molecular structures. The Tanimoto measure focuses more on the proportion of shared features between two objects rather than the distance or direction difference between the two objects. In this embodiment, the first Tanimoto measure is used as the similarity between the grayscale value of each pixel in the grayscale value pixel distribution sequence and the grayscale value of each initial cluster center.

[0128] S322, according to the maximum similarity principle, assigning pixels corresponding to each gray value in the gray value pixel distribution sequence to the gray classification to which the initial cluster center having the smallest first Tanimoto measure with the gray value of the pixel belongs, to obtain the current classification result;

[0129] In this embodiment, the current classification result is a set formed by each grayscale classification when the pixels corresponding to each grayscale value in the grayscale value pixel distribution sequence are respectively allocated in each grayscale classification.

[0130] S323. The median of the grayscale values ​​of all pixels in each grayscale classification in the current classification result is used as a new cluster center. In this embodiment, the number of new cluster centers is the same as the number of initial cluster centers, which is k.

[0131] S324, respectively calculating the first Tanimoto measure between the pixel corresponding to each gray value in the gray value pixel distribution sequence and each new cluster center;

[0132] S325. Use the new cluster center as the initial cluster center, and repeat S322-S324 to iterate the cluster center until the minimum second Tanimoto measure between the cluster centers after two adjacent cluster center iterations is greater than the preset Tanimoto measure threshold, stop the cluster center iteration, and obtain the target cluster center.

[0133] In this embodiment, the second Tanimoto measure refers to the Tanimoto measure between the cluster center after the first cluster center iteration and the cluster center after the second cluster center iteration in two adjacent cluster center iterations. When the minimum second Tanimoto measure between the cluster centers after two adjacent cluster center iterations is greater than the preset Tanimoto measure threshold, it indicates that the division and selection of the cluster centers has reached a stable state.

[0134] S33. According to the target cluster center, the monitoring equipment in the thermal image is classified by using a support vector machine to obtain a classification result of the thermal image monitoring equipment.

[0135] The S33 comprises the following steps:

[0136] S331, extracting the gray value of each pixel in the thermal image, and taking the gray value of each pixel as a sample;

[0137] S332, constructing an interval surface maximization model of support vector machine;

[0138] The calculation expression of the interval surface maximization model is as follows:

[0139] ,

[0140] ,

[0141] ,

[0142] in, represents the minimization function based on the weight vector, bias term and interval bound slack variables, represents the weight vector, b represents the bias term, represents the interval bounding slack variable, Indicates that, represents the distance from the sample to the interval boundary, represents the i-th sample, represents the dot product operation, l represents the total number of samples, represents the square of the Euclidean norm of the weight vector, represents the sample label of the i-th sample, Indicates belonging to;

[0143] When the number of sample types is only 2, the calculation expression of the sample label is as follows:

[0144] ,

[0145] in, Indicates the first category, Indicates the second category;

[0146] For example, the first category is spotlights, and the second category is ordinary incandescent lamps. There is a difference between their normal operating temperature and the temperature that requires high temperature warning. Based on this solution, after the pixel areas corresponding to the two monitoring devices, spotlights and incandescent lamps, are aggregated, split, identified and divided, the temperature information of the thermal image can be combined to achieve accurate electrical fire hazard perception for any of the two monitoring devices, spotlights and incandescent lamps. According to the actual situation, the corresponding number of sample markers and the interval surface of the support vector model can be set based on the number of sample types.

[0147] S333, constructing a first Lagrangian parameter optimization model for the interval surface maximization model of the support vector machine;

[0148] The calculation expression of the first Lagrangian parameter optimization model is as follows:

[0149] ,

[0150] in, represents the first Lagrangian parameter optimization function, a represents the Lagrangian multiplier, represents the i-th Lagrange multiplier, represents the regularization parameter;

[0151] S334, setting optimization constraints of the first Lagrangian parameter optimization model;

[0152] The calculation expression of the optimization constraint of the Lagrangian parameter optimization model is as follows:

[0153] ,

[0154] ,

[0155]

[0156] in, It means that the Lagrangian parameter optimization function takes partial derivative of the weight vector. It means that the Lagrangian parameter optimization function takes partial derivative of the bias term. It represents the partial derivative of the Lagrangian parameter optimization function with respect to the interval boundary slack variables;

[0157] S335, substituting the optimization constraints of the Lagrangian parameter optimization model into the first Lagrangian parameter optimization model to obtain a second Lagrangian parameter optimization model;

[0158] The calculation expression of the second Lagrangian parameter optimization model is as follows:

[0159] ,

[0160] in, represents the second Lagrangian parameter optimization model, represents the jth Lagrange multiplier, represents the sample label of the jth sample, represents the i-th sample;

[0161] S336, optimizing the model according to the second Lagrangian parameter to obtain an optimal solution of the optimization model;

[0162] The calculation expression of the optimal solution of the optimization model is as follows:

[0163] ;

[0164] S337. Based on the optimal solution of the optimization model, a dual Lagrangian parameter optimization model is obtained;

[0165] The calculation expression of the dual Lagrangian parameter optimization model is as follows:

[0166]

[0167] in, represents the dual Lagrangian parameter optimization function;

[0168] S338. Based on the dual Lagrangian parameter optimization model, an optimal Lagrangian parameter optimization model is obtained;

[0169] The calculation expression of the optimal Lagrangian parameter optimization model is as follows:

[0170] ,

[0171] ,

[0172] ,

[0173] in, represents the minimization function based on Lagrange multipliers;

[0174] S339. According to the optimal Lagrangian parameter optimization model, the pixels in the thermal image are classified using a support vector machine to obtain a thermal image classification result.

[0175] In this embodiment, the thermal image classification results realize accurate identification and classification of different types of monitoring equipment on the thermal image, which is convenient for targeted temperature monitoring perception and alarm according to different types of monitoring equipment and different fault combustion temperatures.

[0176] S4. Based on the classification results of the thermal images, the alarm temperature thresholds of the corresponding areas of various types of monitoring equipment are set respectively to obtain the electrical fire hazard perception results.

[0177] The S4 comprises the following steps:

[0178] S41. Based on the classification results of the thermal images, corresponding areas of various monitoring devices are obtained;

[0179] S42, setting alarm temperature thresholds for the corresponding areas of various monitoring devices;

[0180] S43, extracting the temperature value corresponding to each pixel in the thermal image, and comparing the temperature value of each pixel with the alarm temperature threshold of the corresponding area of ​​the monitoring device to which the pixel belongs, to obtain a temperature comparison result;

[0181] S44, if there is a pixel point whose temperature value is greater than or equal to the alarm temperature threshold of the area corresponding to the monitoring device to which the pixel point belongs, then based on the position information of the pixel, an electrical fire hazard perception result at the pixel position is generated as the existence of a fire hazard;

[0182] S45. If the temperature values ​​of the pixels are all less than the alarm temperature threshold of the area corresponding to the monitoring device to which the pixels belong, the electrical fire hazard perception result is that there is no fire hazard.

[0183] The present invention realizes accurate perception of electrical fire hazards for different types of monitoring equipment in thermal images based on the temperature field of infrared thermal imagers and accurate identification and classification of different types of monitoring equipment. It can also accurately reflect the equipment with high-temperature fire hazard risks in the same type of monitoring equipment according to the pixel position, effectively improving the perception accuracy of electrical fire hazards and effectively reducing the risk of electrical fires. This case is based on the demand for major security equipment in the field of fire rescue, and solves the problem of difficulty in accurately distinguishing and monitoring electrical fire hazards in large-scale mass activities and major security tasks, which is of great significance.

[0184] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for sensing electrical fire hazards based on infrared thermal imaging, characterized in that: The steps include: S1, obtaining a thermal image taken by an infrared thermal imager; S2, constructing a sliding window, performing median filtering on the thermal image, and obtaining a thermal image after median filtering; S3, performing pixel feature aggregation classification based on the thermal image after median filtering to obtain a thermal image classification result; S4. Based on the classification results of the thermal images, the alarm temperature thresholds of the corresponding areas of various types of monitoring equipment are set respectively to obtain the electrical fire hazard perception results.

2. The method for sensing electrical fire hazards based on infrared thermal imaging according to claim 1 is characterized in that: The S2 comprises the following steps: S21, construct a sliding window of size N×N; S22, sliding the sliding window on the thermal image row by row from left to right, so that the center of the sliding window coincides with each pixel in the thermal image; S23, when the center of the sliding window coincides with different pixels in the thermal image, extract the grayscale value of each pixel in the sliding window, and obtain the central grayscale value of the sliding window based on a median filter; S24, assigning the grayscale value of the center of the sliding window to the pixel at the center of the sliding window until the center of the sliding window traverses all pixels in the thermal image, thereby obtaining a thermal image after median filtering.

3. The method for sensing electrical fire hazards based on infrared thermal imaging according to claim 2 is characterized in that: The calculation expression of the median filter is as follows: , in, Indicates the pixel position of the thermal image after median filtering The gray value at represents the median operation, Indicates the thermal image at the pixel position The gray value at Indicates the thermal image at the pixel position The gray value at , i represents the pixel in the i-th row of the thermal image, j represents the pixel in the j-th column of the thermal image, r represents the pixel row offset, s represents the pixel column offset, A represents the filter window offset set, Represents the set of all pixel locations in the thermal image.

4. The method for sensing electrical fire hazards based on infrared thermal imaging according to claim 3 is characterized in that: The S3 comprises the following steps: S31, constructing an initial cluster center based on the thermal image after median filtering according to the number of categories of monitoring equipment in the thermal image; S32, according to the gray value pixel distribution sequence, based on the Tanimoto measurement method and the maximum similarity principle, the initial cluster center is iterated to obtain the target cluster center; S33. According to the target cluster center, the monitoring equipment in the thermal image is classified by using a support vector machine to obtain a classification result of the thermal image monitoring equipment.

5. The method for sensing electrical fire hazards based on infrared thermal imaging according to claim 4 is characterized in that: The S31 comprises the following steps: S311, according to the gray value of each pixel in the thermal image after median filtering, obtain the number of pixels corresponding to each gray value by counting; S312, arranging the grayscale values ​​and their corresponding pixel numbers in order from small to large or from large to small to obtain a grayscale value pixel distribution sequence; The calculation expression of the gray value pixel distribution sequence is as follows: , in, represents the gray value pixel distribution sequence, represents the i-th gray value, Represents the number of pixels corresponding to the i-th gray value, where , N is the length of the gray value pixel distribution sequence; S313, constructing a grayscale histogram according to the grayscale value pixel distribution sequence, and selecting m grayscale categories to obtain a pixel set corresponding to each grayscale category; S314, respectively obtaining the median grayscale value in the pixel set corresponding to each grayscale classification as the initial cluster center; S315, obtaining the number k of categories of monitoring equipment in the thermal image; S316, determine whether k is less than or equal to m, if so, proceed to S318, otherwise proceed to S317; S317, according to the gray value pixel distribution sequence, based on the gray histogram, select m+1 grayscale categories, and obtain the pixel set corresponding to each grayscale category, and return to S314; S318. According to the pixel sets corresponding to each grayscale classification, k median grayscale values ​​are selected to obtain k initial clustering centers.

6. The method for sensing electrical fire hazards based on infrared thermal imaging according to claim 5 is characterized in that: The S32 comprises the following steps: S321, respectively calculating the first Tanimoto measure between the pixel corresponding to each gray value in the gray value pixel distribution sequence and each initial cluster center; S322, according to the maximum similarity principle, assigning pixels corresponding to each gray value in the gray value pixel distribution sequence to the gray classification to which the initial cluster center having the smallest first Tanimoto measure with the gray value of the pixel belongs, to obtain the current classification result; S323, taking the median of the grayscale values ​​of all pixels in each grayscale classification in the current classification result as a new cluster center; S324, respectively calculating the first Tanimoto measure between the pixel corresponding to each gray value in the gray value pixel distribution sequence and each new cluster center; S325. Use the new cluster center as the initial cluster center, and repeat S322-S324 to iterate the cluster center until the minimum second Tanimoto measure between the cluster centers after two adjacent cluster center iterations is greater than the preset Tanimoto measure threshold, stop the cluster center iteration, and obtain the target cluster center.

7. The method for sensing electrical fire hazards based on infrared thermal imaging according to claim 6 is characterized in that: The S33 comprises the following steps: S331, extracting the gray value of each pixel in the thermal image, and taking the gray value of each pixel as a sample; S332, constructing an interval surface maximization model of support vector machine; The calculation expression of the interval surface maximization model is as follows: , , , in, represents the minimization function based on the weight vector, bias term and interval bound slack variables, represents the weight vector, b represents the bias term, represents the interval bounding slack variable, Indicates that, represents the distance from the sample to the interval boundary, represents the i-th sample, represents the dot product operation, l represents the total number of samples, represents the square of the Euclidean norm of the weight vector, represents the sample label of the i-th sample, Indicates belonging to; S333, constructing a first Lagrangian parameter optimization model for the interval surface maximization model of the support vector machine; The calculation expression of the first Lagrangian parameter optimization model is as follows: , in, represents the first Lagrangian parameter optimization function, a represents the Lagrangian multiplier, represents the i-th Lagrange multiplier, represents the regularization parameter; S334, setting optimization constraints of the first Lagrangian parameter optimization model; The calculation expression of the optimization constraint of the Lagrangian parameter optimization model is as follows: , , in, It means that the Lagrangian parameter optimization function takes partial derivative of the weight vector. It means that the Lagrangian parameter optimization function takes partial derivative of the bias term. represents the partial derivative of the Lagrangian parameter optimization function with respect to the interval boundary slack variables; S335, substituting the optimization constraints of the Lagrangian parameter optimization model into the first Lagrangian parameter optimization model to obtain a second Lagrangian parameter optimization model; The calculation expression of the second Lagrangian parameter optimization model is as follows: , in, represents the second Lagrangian parameter optimization model, represents the jth Lagrange multiplier, represents the sample label of the jth sample, represents the i-th sample; S336, optimizing the model according to the second Lagrangian parameter to obtain an optimal solution of the optimization model; The calculation expression of the optimal solution of the optimization model is as follows: ; S337. Based on the optimal solution of the optimization model, a dual Lagrangian parameter optimization model is obtained; The calculation expression of the dual Lagrangian parameter optimization model is as follows: in, represents the dual Lagrangian parameter optimization function; S338. Based on the dual Lagrangian parameter optimization model, an optimal Lagrangian parameter optimization model is obtained; The calculation expression of the optimal Lagrangian parameter optimization model is as follows: , , , in, represents the minimization function based on Lagrange multipliers; S339. According to the optimal Lagrangian parameter optimization model, the pixels in the thermal image are classified using a support vector machine to obtain a thermal image classification result.

8. The method for sensing electrical fire hazards based on infrared thermal imaging according to claim 7, characterized in that: The S4 comprises the following steps: S41. Based on the classification results of the thermal images, corresponding areas of various monitoring devices are obtained; S42, setting alarm temperature thresholds for the corresponding areas of various monitoring devices; S43, extracting the temperature value corresponding to each pixel in the thermal image, and comparing the temperature value of each pixel with the alarm temperature threshold of the corresponding area of ​​the monitoring device to which the pixel belongs, to obtain a temperature comparison result; S44, if there is a pixel point whose temperature value is greater than or equal to the alarm temperature threshold of the area corresponding to the monitoring device to which the pixel point belongs, then based on the position information of the pixel, an electrical fire hazard perception result at the pixel position is generated as the existence of a fire hazard; S45. If the temperature values ​​of the pixels are all less than the alarm temperature threshold of the area corresponding to the monitoring device to which the pixels belong, the electrical fire hazard perception result is that there is no fire hazard.

Citation Information

Patent Citations

  • Temperature anomaly monitoring and early warning through object perception combining visual sensing and thermal sensing

    CN114093142A

  • Transformer substation alternating current power supply fire early warning method, monitoring terminal and system

    CN114821946A

  • Air conditioner for vehicle and method for controlling the same

    KR1020240039792A

Cited By

  • Infrared thermal imaging identification method and system based on neural network

    CN120259702A

  • Fire scene situation awareness and early warning method and system

    CN120894865A

  • Electrical fire hazard sensing method and system based on infrared thermal imaging

    CN120912994A