Abnormal state monitoring method of communication cabinet based on Internet of Things and visual perception
Through methods based on the Internet of Things and visual perception, component image processing and filter kernel optimization are performed on the infrared image of the communication cabinet, which solves the problem of white noise interference in the infrared image and improves the accuracy of temperature abnormality monitoring.
Patent Information
- Application Number
- CN202410379064.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-29
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-03-29
AI Technical Summary
During the long-term operation and heating process of existing infrared thermal imaging cameras, there is a large amount of white noise in the infrared image, which leads to poor monitoring accuracy in abnormal temperature areas of communication cabinets. Conventional filtering algorithms such as Gaussian filtering or mean filtering will cause infrared temperature The expansion or contraction of the area affects the monitoring effect.
Using a method based on the Internet of Things and visual perception, by obtaining the infrared image of the communication cabinet, performing grayscale change sequence curve fitting and decomposition, obtaining several layers of component images, and filtering the component images with filter kernels of different sizes, using the size of the filter kernel The objective function obtains the denoised and smoothed image for abnormality monitoring.
It greatly improves the denoising and smoothing effect of infrared images, reduces the interference of noise on abnormal monitoring results, and improves the accuracy of abnormal monitoring of communication cabinets.
Smart Images

Figure CN118279262B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image data processing, and in particular to a method for monitoring abnormal states of communication cabinets based on the Internet of Things and visual perception. Background Art
[0002] A communications cabinet is a device used to install and store communications equipment and network equipment. It provides a safe, clean and controllable environment for the communications equipment and network equipment inside. Communications cabinets are usually made of metal and have a reliable structure and protective functions to protect internal equipment from physical damage and external interference.
[0003] In order to meet the spatial layout, heat dissipation and cooling requirements of the equipment inside the communication cabinet, it usually has an open or sealed structure and is equipped with a heat dissipation system such as vents, fans and heat sinks to ensure the normal operation of the communication equipment. At the same time, in order to grasp the operating temperature inside the communication cabinet to provide early warning and solve potential problems, the temperature monitoring of the communication cabinet is usually carried out using an infrared thermal imager.
[0004] Due to the long-term operation of the infrared thermal imager and the heating problem, there is a large amount of white noise in the obtained infrared image, which affects the monitoring of the abnormal temperature area of the communication cabinet. Using conventional filtering algorithms such as Gaussian filtering or mean filtering to filter the image globally will cause different infrared temperature areas to expand or shrink, making the monitoring accuracy of the abnormal area poor. If there is no timely warning response to solve the abnormal problem, it is easy to cause damage to the internal equipment of the communication cabinet. Summary of the invention
[0005] The present invention provides a method for monitoring the abnormal state of a communication cabinet based on the Internet of Things and visual perception to solve the existing problem: the temperature monitoring of the communication cabinet generally adopts an infrared thermal imager. Due to long-term operation and heating problems, there is a large amount of white noise in the infrared thermal image, which affects the monitoring and identification of abnormal temperature areas of the communication cabinet, and the global filtering and smoothing process will cause different infrared temperature areas to expand or contract, resulting in poor monitoring accuracy of abnormal areas.
[0006] The abnormal state monitoring method of a communication cabinet based on the Internet of Things and visual perception of the present invention adopts the following technical solutions:
[0007] An embodiment of the present invention provides a method for monitoring abnormal status of a communication cabinet based on the Internet of Things and visual perception, the method comprising the following steps:
[0008] Acquire infrared images of the communication cabinet;
[0009] Obtain a sequence formed by the grayscale values of all pixels in any row of the infrared image of the communication cabinet, recorded as a grayscale change sequence; curve fitting is performed on the grayscale change sequence to obtain a grayscale change curve, and any grayscale change curve is decomposed to obtain several layers of component curves, and corresponding component images are obtained according to the component curves of the same layer corresponding to all rows in the infrared image of the communication cabinet, and a set formed by the grayscale values of all pixels in any layer of component image is recorded as a grayscale value set; the grayscale value sets of component images of each layer are merged layer by layer to obtain a new grayscale value set, and the optimal segmentation determination factor of the component image is obtained according to the number of types of grayscale values in the new grayscale value set and the grayscale values of the pixels in the component image, and the optimal segmentation image is obtained according to the size of the optimal segmentation determination factor, and the component image is divided according to the number of layers where the optimal segmentation image is located to obtain several first component images and a baseline image;
[0010] Filtering any first component image using a filter kernel of a preset size to obtain a convolution image corresponding to the first component image;
[0011] Iterate the filter kernel to obtain the convolution image corresponding to the first component image during the iterative increase of the filter kernel, obtain the filter kernel size target function of the first component image according to the gray value of the pixel in the convolution image and the size of the filter kernel corresponding to the pixel as the center point of the filter kernel, obtain the denoised and smoothed infrared image of the communication cabinet through the filter kernel size target function, and perform abnormal monitoring on the denoised and smoothed infrared image of the communication cabinet.
[0012] Furthermore, the specific method of obtaining the sequence formed by the grayscale values of all pixels in any row of the infrared image of the communication cabinet includes:
[0013] The pixels and grayscale values of any row in the infrared image of the communication cabinet are obtained from left to right, and the grayscale values corresponding to all pixels in any row of the communication cabinet image are recorded as a grayscale change sequence in a sequence from left to right.
[0014] Furthermore, the grayscale change sequence is subjected to curve fitting to obtain a grayscale change curve, and any grayscale change curve is decomposed to obtain several layers of component curves, including the following specific methods:
[0015] Firstly, a two-dimensional rectangular coordinate system is constructed with the number of pixel columns as the horizontal axis and the grayscale value of the pixel as the vertical axis. The grayscale change sequence is placed in the two-dimensional rectangular coordinate system, and the grayscale change sequence in the two-dimensional rectangular coordinate system is fitted using the least squares method. The fitted curve is recorded as the grayscale change curve.
[0016] Furthermore, the method of decomposing the arbitrary grayscale change curve to obtain several layers of component curves and obtaining the corresponding component image according to the same layer of component curves corresponding to all rows in the infrared image of the communication cabinet includes the following specific methods:
[0017] Firstly, the EMD decomposition algorithm is used to perform EMD decomposition on the grayscale change curve corresponding to each row in the infrared image of the communication cabinet. In the decomposition process, when the extreme value point of the last component curve is less than or equal to 1, the decomposition is terminated to obtain several layers of component curves of the grayscale change curve, and the vertical coordinate of the data point in the component curve is marked as the component grayscale value of the pixel point corresponding to the data point in the component curve in the infrared image of the communication cabinet; the component curves belonging to the same layer in the component curves of all rows in the infrared image of the communication cabinet are recorded as the same-layer component curves, and several same-layer component curves are obtained. The number of component curves contained in any same-layer component curve is equal to the number of rows of the infrared image of the communication cabinet;
[0018] Then, the number of columns and component grayscale values of the pixels corresponding to all data points in any component curve of the same layer in the infrared image of the communication cabinet are obtained, and the image is reconstructed according to the number of rows corresponding to each component curve in the component curve of the same layer in the infrared image of the communication cabinet, and the number of columns and component grayscale values of the pixels corresponding to all data points in the component curve in the infrared image of the communication cabinet. The reconstructed image is recorded as the component image corresponding to the component curve of the same layer.
[0019] Furthermore, the grayscale value sets of the component images of each layer are merged layer by layer to obtain a new grayscale value set, and the optimal segmentation determination factor of the component image is obtained according to the number of types of grayscale values in the new grayscale value set and the grayscale values of the pixels in the component image, including the specific method of:
[0020] First, the grayscale value sets corresponding to the component images are merged in the order of the corresponding layer numbers of the component images, and the set obtained after each merging into a grayscale value set is recorded as a new grayscale value set, and several new grayscale value sets are obtained in the merging process;
[0021] Then, the number of types, average value and standard deviation of the grayscale values in any new grayscale value set are obtained; according to several new grayscale value sets obtained in the process of merging grayscale value sets, the optimal segmentation determination factor of the component image is obtained. The specific calculation method is:
[0022]
[0023] in, Indicates Optimal segmentation decision factor for layer component images; Indicates The grayscale values of the classes are merged into The probability of occurrence of the gray value set of the component image in the new gray value set obtained; Indicates merging to When there are 1 component image, the number of types of gray values in the new gray value set; Represents the average value of the grayscale value in the new grayscale value set obtained when merging into the nth component image; Indicates merging to When there are component images, the standard deviation of the grayscale values in the new grayscale value set is obtained; Indicates the number of pixels in the infrared image of the communication cabinet; Indicates The first layer component image The gray value of each pixel; Indicates The first layer component image The gray value of a pixel.
[0024] Furthermore, the specific calculation method of the occurrence probability is:
[0025] The number of any type of grayscale values in any new grayscale value set is obtained as the first number, the number of elements in the new grayscale value set is recorded as the second number, and the ratio of the first number to the second number is recorded as the probability of occurrence of the type of grayscale value in the new grayscale set.
[0026] Furthermore, the optimal segmentation image is obtained according to the size of the optimal segmentation determination factor, and the component image is divided according to the number of layers where the optimal segmentation image is located to obtain a plurality of first component images and a baseline image, including the specific method of:
[0027] The component image corresponding to the maximum optimal segmentation determination factor is recorded as the optimal segmentation image, the number of layers of the optimal segmentation image is recorded as the optimal segmentation layer, the component image between the first layer and the optimal segmentation layer is recorded as the first component image, and several first component images are obtained. The grayscale values of the pixels at the same position in all component images except the first component image are accumulated, and the image obtained after the accumulation is recorded as the baseline image.
[0028] Furthermore, the method of filtering any first component image using a filter kernel of a preset size to obtain a convolution image corresponding to the first component image includes the following specific methods:
[0029] The specific method of obtaining the convolution image is:
[0030]
[0031] in, Indicates The first component image of the layer corresponds to the convolution image The gray value of each pixel; Indicates In the first component image of the layer The gray value of each pixel; Indicates the first component image The pixel points correspond to the size of the convolution kernel. Representative In the first component image of the layer The convolution kernel range of pixels The gray value of the neighboring pixels.
[0032] Furthermore, the filter kernel is iteratively increased to obtain a convolution image corresponding to the first component image during the iterative increase of the filter kernel, and a filter kernel size objective function of the first component image is obtained according to the gray value of the pixel point in the convolution image and the size of the filter kernel corresponding to the pixel point as the center point of the filter kernel, including the specific method of:
[0033] First, the initial size of the filter kernel corresponding to any pixel point as the center point of the filter kernel is preset to be , with step length Initial size parameter for the filter kernel Iterate and increase, and the filter kernel size is less than or equal to , any pixel corresponds to a number of filter kernels of different sizes, where , as well as are the preset hyperparameters;
[0034] Then, get the standard deviation of the grayscale values of all pixels in any first component image , and the standard deviation of the grayscale values of all pixels in the corresponding convolution image ; Construct the filter kernel size objective function of the first component image:
[0035]
[0036] in, Indicates The filter kernel size objective function of the first component image of the layer; Indicates The first component image of the layer corresponds to the convolution image The gray value of each pixel; Indicates In the first component image of the layer The gray value of a pixel, Indicates obtaining covariance; Indicates The first component image of the layer corresponds to the standard deviation of the grayscale values of all pixels in the convolution image; Indicates The standard deviation of the grayscale values of all pixels in the first component image of the layer; Indicates the number of pixels in the infrared image of the communication cabinet; Indicates The average size of all filter kernels in the first component image of the layer; Indicates In the first component image of the layer The filter kernel size of pixels; represents the hyperbolic tangent function.
[0037] Furthermore, the denoised and smoothed infrared image of the communication cabinet is obtained by filtering the kernel size objective function, and abnormal monitoring is performed on the denoised and smoothed infrared image of the communication cabinet, including the specific method of:
[0038] First, when the value of the filter kernel size objective function is the largest, the sizes of the filter kernels corresponding to all pixels in all first component images are obtained, recorded as the optimal filter kernel size of the first component image, the first component image is mean filtered using the optimal filter kernel size of the first component image, and the convolution images of all first component images are obtained until the convolution image of the optimal segmentation image is obtained, the convolution image of the optimal segmentation image is recorded as the final convolution image, and the image obtained by adding the final convolution image to the baseline image is recorded as the denoised and smoothed infrared image of the communication cabinet;
[0039] Then, the grayscale values of all pixels in the denoised and smoothed infrared image of the communication cabinet are obtained. When the grayscale value of a pixel is greater than a preset grayscale threshold, the corresponding pixel is marked as having a temperature anomaly.
[0040] The beneficial effects of the technical solution of the present invention are: obtaining multiple component images by decomposing the infrared image of the communication cabinet, obtaining several first component images and a baseline image according to the division of the component images, filtering the first component image with filter kernels of different sizes to obtain a convolution image of the first component image, obtaining the optimal filter kernel size corresponding to the pixel points in the first component image in combination with the filter kernel size objective function obtained by the gray value distribution characteristics of the pixel points in the convolution image, filtering all the first component images by the optimal filter kernel size corresponding to each pixel point, and obtaining the denoised and smoothed infrared image of the communication cabinet in combination with the baseline image, and performing abnormal monitoring on the denoised and smoothed infrared image of the communication cabinet, which greatly improves the denoising and smoothing effect of the infrared image of the communication cabinet, reduces the interference of noise on the abnormal monitoring results, and further improves the accuracy of abnormal monitoring of the communication cabinet. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 It is a flowchart of the steps of the abnormal state monitoring method of a communication cabinet based on the Internet of Things and visual perception of the present invention;
[0043] Figure 2 An infrared image of a communication cabinet according to an embodiment of the present invention;
[0044] Figure 3 The infrared image of the communication cabinet after denoising and smoothing according to an embodiment of the present invention;
[0045] Figure 4 This is the grayscale change curve corresponding to the 115th row in the infrared image of the communication cabinet in the embodiment of the present invention;
[0046] Figure 5 This is a decomposition result curve graph obtained by performing EMD decomposition on the grayscale change curve corresponding to the 115th row of the infrared image of the communication cabinet in an embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of the abnormal state monitoring method of the communication cabinet based on the Internet of Things and visual perception proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0048] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0049] The specific scheme of the abnormal state monitoring method of a communication cabinet based on the Internet of Things and visual perception provided by the present invention is described in detail below with reference to the accompanying drawings.
[0050] See also Figure 1 , which shows a flowchart of a method for monitoring abnormal status of a communication cabinet based on the Internet of Things and visual perception provided by an embodiment of the present invention, the method comprising the following steps:
[0051] Step S001: Acquire an infrared image of a communication cabinet.
[0052] Specifically, in order to implement the abnormal state monitoring method of the communication cabinet based on the Internet of Things and visual perception proposed in this embodiment, it is first necessary to collect infrared images of the communication cabinet. The specific process is as follows:
[0053] A thermal infrared imager is installed in the communication cabinet, and the image acquisition frequency of the thermal infrared imager is set. The infrared image inside the communication cabinet is obtained by the thermal infrared imager, which is recorded as the infrared image of the communication cabinet, such as Figure 2 shown.
[0054] It should be noted that the image acquisition frequency of the thermal infrared imager can be preset to once every 2 seconds based on experience, and can be adjusted according to actual conditions, and is not specifically limited in this embodiment.
[0055] So far, the infrared image of the communication cabinet is obtained through the above method.
[0056] Step S002: Decompose the infrared image of the communication cabinet to obtain several component images, obtain the optimal segmentation determination factor according to the gray value set formed by the gray values of the pixels in the component images, and obtain several first component images and a baseline image according to the size of the optimal segmentation determination factor.
[0057] It should be noted that white noise is one of the common noise types in infrared images. Its characteristics are that the noise value follows Gaussian distribution, the average noise intensity is zero and the spatial distribution is random. Since the noise value and distribution position of white noise are random, the noise can only be suppressed by smoothing the image globally. In the infrared image of the communication cabinet, it is necessary to accurately locate the area with abnormal temperature in different devices or lines, but due to the large amount of low-frequency information in the infrared image, it is impossible to accurately obtain the area with abnormal temperature.
[0058] In addition, there is a large amount of low-frequency information in the infrared image, and the grayscale changes between adjacent pixels are gentle, while white noise will have frequent grayscale changes at continuous positions. Therefore, according to the low-frequency characteristics of the infrared image itself and the high-frequency characteristics of white noise, the infrared image of the communication cabinet is decomposed to obtain information of different components.
[0059] Specifically, step (1) first obtains the pixel points and grayscale values of any row in the infrared image of the communication cabinet in order from left to right, records the sequence of grayscale values corresponding to all pixel points in any row in the communication cabinet image in order from left to right as a grayscale change sequence, constructs a two-dimensional rectangular coordinate system with the number of columns of pixel points as the horizontal axis and the grayscale value of the pixel points as the vertical axis, places the grayscale change sequence in the two-dimensional rectangular coordinate system, and uses the least squares method to fit the grayscale change sequence in the two-dimensional rectangular coordinate system, and records the curve obtained by fitting as a grayscale change curve, such as Figure 4As shown in the figure, the part with larger fluctuations belongs to the change curve formed by the grayscale value of the pixels in the 115th row of the infrared image of the communication cabinet, and the curve with smaller fluctuations and smoother belongs to the curve after fitting the grayscale change sequence, that is, the grayscale change curve.
[0060] It should be noted that the grayscale change curve in this embodiment is a quintic polynomial curve, and other types of curves may be selected in other real-time processes, which is not specifically limited in this embodiment.
[0061] It should be noted that due to the randomness of white noise, the distribution power of white noise in each row and column in the image is the same. Therefore, to obtain the grayscale change curve, you can choose to obtain the grayscale change curve corresponding to each row or each column in the infrared image of the communication cabinet. This embodiment does not make specific restrictions, and in this embodiment, you choose to obtain the grayscale change curve corresponding to each row in the infrared image of the communication cabinet.
[0062] Then, the EMD decomposition algorithm is used to perform EMD decomposition on the grayscale change curve corresponding to each row in the infrared image of the communication cabinet, as shown in Figure 5 As shown, this is a decomposition result curve graph obtained by performing EMD decomposition on the grayscale change curve corresponding to the 115th row. EMD decomposition can obtain multiple IMF components. In the curve graph, the horizontal axis is time, and the vertical axis is component amplitude.
[0063] During the decomposition process, when the extreme value point of the last component curve decomposed is less than or equal to 1, the decomposition is terminated, and several layers of component curves of the grayscale change curve are obtained. The data points in the component curve with an integer horizontal coordinate correspond to the pixel points in the infrared image of the communication cabinet, and the horizontal coordinate is the number of columns of the pixel points in the infrared image of the communication cabinet. The vertical coordinate of the data point in the component curve is marked as the component grayscale value of the pixel point corresponding to the data point in the component curve in the infrared image of the communication cabinet; the component curves of the same layer in the component curves of all rows in the infrared image of the communication cabinet are recorded as the same-layer component curves, and several same-layer component curves are obtained. The number of component curves contained in any same-layer component curve is equal to the number of rows of the infrared image of the communication cabinet; the number of columns and component grayscale values of the pixel points corresponding to all data points in any same-layer component curve in the infrared image of the communication cabinet are obtained, and the image is reconstructed according to the number of rows corresponding to each component curve in the same-layer component curve in the infrared image of the communication cabinet, the number of columns and component grayscale values of the pixel points corresponding to all data points in the component curve in the infrared image of the communication cabinet, and the image obtained after reconstruction is recorded as the component image corresponding to the same-layer component curve; several layers of component images are obtained.
[0064] It should be noted that the component curve of each layer corresponds to a component image. In several layers of component images, the distribution amount of white noise gradually decreases from top to bottom with the number of layers of component images, and the non-noise information gradually increases.
[0065] It should be noted that the Chinese name of the EMD decomposition algorithm is the empirical mode decomposition algorithm. The EMD algorithm is an existing algorithm, so this embodiment will not be described in detail.
[0066] Step (2), first, obtain the grayscale values and types of grayscale values of all pixels in all component images, record the set formed by the grayscale values of all pixels in any layer of component images as a grayscale value set; merge the grayscale value sets corresponding to the component images in the order of the corresponding layer numbers of the component images, record the set obtained after each merging into a grayscale value set as a new grayscale value set, and obtain several new grayscale value sets in the merging process.
[0067] Take an example to illustrate the merging process of grayscale value sets: there are grayscale value sets 1, 2, 3 and 4. First, set 1 and set 2 are merged to obtain a new grayscale value set A1, and then set 3 is merged into the new grayscale value set A1 to obtain a new grayscale value set A2, and so on to obtain several new grayscale value sets.
[0068] Then, the number of types, average values and standard deviations of grayscale values in any new grayscale value set are obtained, the number of any type of grayscale values in any new grayscale value set is obtained, recorded as the first number, the number of elements in the new grayscale value set is recorded as the second number, and the ratio of the first number to the second number is recorded as the occurrence probability of the type of grayscale value in the new grayscale set; according to several new grayscale value sets obtained in the process of merging grayscale value sets, the optimal segmentation determination factor of the component image is obtained, and the specific calculation method is:
[0069]
[0070] in, Indicates Optimal segmentation decision factor for layer component images; Indicates The grayscale values of the classes are merged into The probability of occurrence of the gray value set of the component image in the new gray value set obtained; Indicates merging to When there are 1 component image, the number of types of gray values in the new gray value set; Represents the average value of the grayscale value in the new grayscale value set obtained when merging into the nth component image; Indicates merging to When there are component images, the standard deviation of the grayscale values in the new grayscale value set is obtained; Indicates the number of pixels in the infrared image of the communication cabinet; Indicates The first layer component image The gray value of each pixel; Indicates The first layer component image The gray value of a pixel.
[0071] It should be noted that is the kurtosis of the new gray value set, that is, the kurtosis of the gray value distribution in the new gray value set obtained when the gray value sets are merged layer by layer. The kurtosis reflects the degree to which the distribution of gray values in the new gray value set obeys the Gaussian distribution. When the gray value of the pixel in the merged component image is the component of white noise, the gray value in the new gray value set obtained will present a Gaussian distribution. When more low-frequency information is merged in the merging process, that is, the non-noise information in the infrared image, the kurtosis of the new gray value set decreases. Therefore, when the kurtosis is the highest, it can be considered that the white noise is concentrated in the merged component image.
[0072] It should be noted that when The grayscale values of pixels in the component images are mostly white noise components, and When the grayscale values of pixels in a component image are mostly components of non-noise information, according to the decomposition process of the EMD algorithm, the flatter the envelope, the fewer times it can be decomposed and the more components it can obtain each time. That is, when decomposing irregular burr noise and the gradient points of the image itself, the envelope is extremely uneven, and multiple layers will be decomposed to obtain multiple components; however, when decomposing low-frequency image information, fewer components are obtained after decomposition, so the information contained in each component will become more; grayscale ratio Indicates The first layer component image The gray value of the pixel is The first layer component image The ratio between the gray values of pixels. Layer and When there are more white noise components in the component images of the first layer, the grayscale ratio value will fluctuate around 1. Layer and When there are white noise components and non-noise information components in the component image of the layer, the grayscale ratio will be much greater than 1. By squaring the grayscale ratio, the value is enlarged. Indicates Layer and The average difference value of all pixels in the layer component image. The larger the average difference value, the higher the The greater the probability that the layer component image is a segmentation layer.
[0073] Finally, the component image corresponding to the maximum optimal segmentation determination factor is recorded as the optimal segmentation image, the number of layers of the optimal segmentation image is recorded as the optimal segmentation layer, the component image between the first layer and the optimal segmentation layer is recorded as the first component image, and several first component images are obtained. The grayscale values of the pixels at the same position in all component images except the first component image are accumulated, and the image obtained after the accumulation is recorded as the baseline image.
[0074] So far, several first component images and one baseline image are obtained through the above method.
[0075] Step S003: Filter the first component image using a plurality of filter kernels of different sizes to obtain a convolution image corresponding to the first component image.
[0076] It should be noted that by convolving the first component image, the white noise in the first component image is suppressed after multiple downward convolutions without damaging the real EMD decomposition in the lower component image. The white noise will be concentrated in the component image on the upper layer, while the real infrared thermal map information will be concentrated in the component image on the lower layer.
[0077] It should be noted that the real infrared information, whether white noise or non-noise, is not distributed in only one component image, so denoising cannot be performed directly by screening the component images. However, after separating the noise and real infrared information in the infrared image of the communication cabinet, the infrared image of the communication cabinet can be smoothed and denoised without losing the real infrared information.
[0078] First, the initial size of the filter kernel corresponding to any pixel point as the center point of the filter kernel is preset to be , with step length Initial size parameter for the filter kernel Iterate and increase, and the filter kernel size is less than or equal to , any pixel corresponds to a number of filter kernels of different sizes, where , as well as are the preset hyperparameters.
[0079] It should be noted that, in the process of iteratively increasing the filter kernel size, the filter kernel size of each pixel in the first component image is not iteratively increased synchronously.
[0080] It should be noted that the hyperparameters are preset based on experience. is 3, is 2, is 11, which can be adjusted according to the actual situation, and this implementation does not make specific restrictions; in addition, the filter kernel size Should be an odd number and the step length Should be an even number.
[0081] Then, the first component image is mean filtered using a filter kernel of any size to obtain the corresponding convolution image. The specific calculation method of the convolution image is:
[0082]
[0083] in, Indicates The first component image of the layer corresponds to the convolution image The gray value of each pixel; Indicates In the first component image of the layer The gray value of each pixel; Indicates the first component image The pixel points correspond to the size of the convolution kernel. Representative In the first component image of the layer The convolution kernel range of pixels The gray value of the neighboring pixels.
[0084] It should be noted that Indicates that in the mean filtering process, the The first component image of the layer is When the pixel point is the center of the filter kernel, the corresponding output value of the mean filter algorithm is obtained by comparing the output value with the In the first component image of the layer Add the gray values of pixels to get The first component image of the layer corresponds to the convolution image The gray value of a pixel.
[0085] So far, the convolution image corresponding to any first component image under a filter kernel of any size is obtained through the above method.
[0086] Step S004: Obtain the filter kernel size target function of the first component image according to the convolution images obtained under filter kernels of different sizes, obtain the optimal filter kernel size according to the size of the filter kernel size target function, and complete the abnormality detection of the infrared image of the communication cabinet through the optimal filter kernel size.
[0087] It should be noted that when the size of the filter kernel in step S003 is iterated, when each pixel in the first component image is used as the center point of the filter kernel, the corresponding filter kernel size is an autonomous iteration process, rather than the synchronous iteration of the filter kernel sizes of all pixels. When the size of the filter kernel is large and the filter kernel sizes corresponding to different pixels are very different, the result obtained by mean filtering the first component image will inevitably be distorted. Therefore, it is necessary to reduce the number of iterations of the filter kernel and reduce the difference in the size of the filter kernel while ensuring that the mean filtering result is not distorted.
[0088] Specifically, first, obtain the standard deviation of the grayscale values of all pixels in any first component image , and the standard deviation of the grayscale values of all pixels in the corresponding convolution image ; Construct the filter kernel size objective function of the first component image:
[0089]
[0090] in, Indicates The filter kernel size objective function of the first component image of the layer; Indicates The first component image of the layer corresponds to the convolution image The gray value of each pixel; Indicates In the first component image of the layer The gray value of a pixel, Indicates obtaining covariance; Indicates The first component image of the layer corresponds to the standard deviation of the grayscale values of all pixels in the convolution image; Indicates The standard deviation of the grayscale values of all pixels in the first component image of the layer; Indicates the number of pixels in the infrared image of the communication cabinet; Indicates The average size of all filter kernels in the first component image of the layer; Indicates In the first component image of the layer The filter kernel size of pixels; represents the hyperbolic tangent function.
[0091] It should be noted that Indicates The first component image of the layer corresponds to all pixels in the convolution image and the The correlation between the gray values of all pixels in the first component image of the layer. The greater the correlation, the The first component image of the layer corresponds to the convolution image and the The less noise there is in the image obtained by superimposing the first component images of the layer, that is, The first component image of the layer corresponds to the convolution image and the The higher the chiasm between the first component images of the layer.
[0092] It should be noted that It represents the variance of all filter kernel sizes during the iteration process. The average size of the filter kernel is added to the variance of the filter kernel size, and the variance is normalized using the hyperbolic tangent function. This is used as the penalty term of the filter kernel size objective function. Different filter kernel sizes are obtained during the iteration process, and different filter kernel size objective functions are obtained. The higher the value of the filter kernel size objective function, the penalty term is used to constrain the iteration upper limit of the filter kernel size. When the filter kernel size is large and the standard deviation of the sizes of all filter kernels in the first component image is large, even if the first component image is large, the filter kernel size objective function is large. The first component image of the layer corresponds to the convolution image and the The degree of fit between the first component images of the layer is high, and the value of the filter kernel size objective function will not be the highest. At the same time, after adding the penalty term, the number of iterations of the filter kernel size is reduced, avoiding the problem of local optimal solution.
[0093] Then, when the value of the filter kernel size objective function is the largest, the size of the filter kernel corresponding to all pixels in all first component images is obtained, recorded as the optimal filter kernel size of the first component image, the first component image is mean filtered using the optimal filter kernel size of the first component image, and the convolution images of all first component images are obtained until the convolution image of the optimal segmentation image is obtained, and the convolution image of the optimal segmentation image is recorded as the final convolution image, and the image obtained by adding the final convolution image to the baseline image is recorded as the denoised and smoothed communication cabinet infrared image, as shown in FIG. Figure 3 shown.
[0094] It should be noted that when the value of the filter kernel size objective function of the first component image of the n-1th layer is the largest, the size of the filter kernel of all pixels in the first component image of the n-1th layer is optimal, and a convolution image with the best denoising effect can be obtained.
[0095] Finally, the grayscale values of all pixels in the denoised and smoothed infrared image of the communication cabinet are obtained. When the grayscale value of a pixel is greater than the preset grayscale threshold, the corresponding pixel is marked as having a temperature anomaly to achieve visual monitoring and labeling.
[0096] It should be noted that the grayscale value of a pixel in an infrared image corresponds to the surface temperature of an object in the image. The higher the surface temperature of the object, the higher the temperature of the corresponding pixel in the image.
[0097] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A communication cabinet abnormal state monitoring method based on the Internet of Things and visual perception, characterized in that: The method comprises the following steps: Acquire infrared images of the communication cabinet; Obtain a sequence formed by the grayscale values of all pixels in any row of the infrared image of the communication cabinet, recorded as a grayscale change sequence; curve fitting is performed on the grayscale change sequence to obtain a grayscale change curve, and any grayscale change curve is decomposed to obtain several layers of component curves, and corresponding component images are obtained according to the component curves of the same layer corresponding to all rows in the infrared image of the communication cabinet, and a set formed by the grayscale values of all pixels in any layer of component image is recorded as a grayscale value set; the grayscale value sets of component images of each layer are merged layer by layer to obtain a new grayscale value set, and the optimal segmentation determination factor of the component image is obtained according to the number of types of grayscale values in the new grayscale value set and the grayscale values of the pixels in the component image, and the optimal segmentation image is obtained according to the size of the optimal segmentation determination factor, and the component image is divided according to the number of layers where the optimal segmentation image is located to obtain several first component images and a baseline image; Filtering any first component image using a filter kernel of a preset size to obtain a convolution image corresponding to the first component image; Iteratively increase the filter kernel to obtain the convolution image corresponding to the first component image during the iterative increase of the filter kernel, obtain the filter kernel size target function of the first component image according to the gray value of the pixel point in the convolution image and the size of the filter kernel corresponding to the pixel point as the center point of the filter kernel, obtain the denoised and smoothed infrared image of the communication cabinet through the filter kernel size target function, and perform abnormal monitoring on the denoised and smoothed infrared image of the communication cabinet; The grayscale value sets of the component images of each layer are merged layer by layer to obtain a new grayscale value set, and the optimal segmentation determination factor of the component image is obtained according to the number of types of grayscale values in the new grayscale value set and the grayscale values of the pixels in the component image, including the specific method of: First, the grayscale value sets corresponding to the component images are merged in the order of the corresponding layer numbers of the component images, and the set obtained after each merging into a grayscale value set is recorded as a new grayscale value set, and several new grayscale value sets are obtained in the merging process; Then, the number of types, average value and standard deviation of the grayscale values in any new grayscale value set are obtained; according to several new grayscale value sets obtained in the process of merging grayscale value sets, the optimal segmentation determination factor of the component image is obtained. The specific calculation method is: in, Indicates Optimal segmentation decision factor for layer component images; Indicates The grayscale values of the classes are merged into The probability of occurrence of the gray value set of the component image in the new gray value set obtained; Indicates merging to When there are 1 component image, the number of types of gray values in the new gray value set; Represents the average value of the grayscale value in the new grayscale value set obtained when merging into the nth component image; Indicates merging to When there are component images, the standard deviation of the grayscale values in the new grayscale value set is obtained; Indicates the number of pixels in the infrared image of the communication cabinet; Indicates The first layer component image The gray value of each pixel; Indicates The first layer component image The gray value of each pixel; The filter kernel is iteratively increased to obtain a convolution image corresponding to the first component image during the iterative increase of the filter kernel, and the filter kernel size target function of the first component image is obtained according to the gray value of the pixel point in the convolution image and the size of the filter kernel corresponding to the pixel point as the center point of the filter kernel, including the specific method of: First, the initial size of the filter kernel corresponding to any pixel point as the center point of the filter kernel is preset to be , with step length Initial size parameter for the filter kernel Iterate and increase, and the filter kernel size is less than or equal to , any pixel corresponds to a number of filter kernels of different sizes, where , as well as are the preset hyperparameters; Then, get the standard deviation of the grayscale values of all pixels in any first component image , and the standard deviation of the grayscale values of all pixels in the corresponding convolution image ; Construct the filter kernel size objective function of the first component image: in, Indicates The filter kernel size objective function of the first component image of the layer; Indicates The first component image of the layer corresponds to the convolution image The gray value of each pixel; Indicates In the first component image of the layer The gray value of a pixel, Indicates obtaining covariance; Indicates The first component image of the layer corresponds to the standard deviation of the grayscale values of all pixels in the convolution image; Indicates The standard deviation of the grayscale values of all pixels in the first component image of the layer; Indicates the number of pixels in the infrared image of the communication cabinet; Indicates The average size of all filter kernels in the first component image of the layer; Indicates In the first component image of the layer The filter kernel size of pixels; represents the hyperbolic tangent function; The specific method of obtaining the denoised and smoothed infrared image of the communication cabinet by filtering the kernel size objective function and performing abnormal monitoring on the denoised and smoothed infrared image of the communication cabinet includes: First, when the value of the filter kernel size objective function is the largest, the sizes of the filter kernels corresponding to all pixels in all first component images are obtained, recorded as the optimal filter kernel size of the first component image, the first component image is mean filtered using the optimal filter kernel size of the first component image, and the convolution images of all first component images are obtained until the convolution image of the optimal segmentation image is obtained, the convolution image of the optimal segmentation image is recorded as the final convolution image, and the image obtained by adding the final convolution image to the baseline image is recorded as the denoised and smoothed infrared image of the communication cabinet; Then, the grayscale values of all pixels in the denoised and smoothed infrared image of the communication cabinet are obtained. When the grayscale value of a pixel is greater than a preset grayscale threshold, the corresponding pixel is marked as having a temperature anomaly.
2. According to claim 1, the abnormal state monitoring method of a communication cabinet based on the Internet of Things and visual perception is characterized in that: The specific method of obtaining the sequence formed by the grayscale values of all pixels in any row of the infrared image of the communication cabinet includes: The pixels and grayscale values of any row in the infrared image of the communication cabinet are obtained from left to right, and the grayscale values corresponding to all pixels in any row of the communication cabinet image are recorded as a grayscale change sequence in a sequence from left to right.
3. According to the method for monitoring abnormal status of a communication cabinet based on the Internet of Things and visual perception according to claim 1, it is characterized in that: The grayscale change sequence is subjected to curve fitting to obtain a grayscale change curve, and any grayscale change curve is decomposed to obtain several layers of component curves, including the following specific methods: Firstly, a two-dimensional rectangular coordinate system is constructed with the number of pixel columns as the horizontal axis and the grayscale value of the pixel as the vertical axis. The grayscale change sequence is placed in the two-dimensional rectangular coordinate system, and the grayscale change sequence in the two-dimensional rectangular coordinate system is fitted using the least squares method. The fitted curve is recorded as the grayscale change curve.
4. According to claim 1, the abnormal state monitoring method of a communication cabinet based on the Internet of Things and visual perception is characterized in that: The method of decomposing any grayscale change curve to obtain several layers of component curves and obtaining corresponding component images according to the same layer of component curves corresponding to all rows in the infrared image of the communication cabinet includes the following specific methods: Firstly, the EMD decomposition algorithm is used to perform EMD decomposition on the grayscale change curve corresponding to each row in the infrared image of the communication cabinet. In the decomposition process, when the extreme value point of the last component curve is less than or equal to 1, the decomposition is terminated to obtain several layers of component curves of the grayscale change curve, and the vertical coordinate of the data point in the component curve is marked as the component grayscale value of the pixel point corresponding to the data point in the component curve in the infrared image of the communication cabinet; the component curves belonging to the same layer in the component curves of all rows in the infrared image of the communication cabinet are recorded as the same-layer component curves, and several same-layer component curves are obtained. The number of component curves contained in any same-layer component curve is equal to the number of rows of the infrared image of the communication cabinet; Then, the number of columns and component grayscale values of the pixels corresponding to all data points in any component curve of the same layer in the infrared image of the communication cabinet are obtained, and the image is reconstructed according to the number of rows corresponding to each component curve in the component curve of the same layer in the infrared image of the communication cabinet, and the number of columns and component grayscale values of the pixels corresponding to all data points in the component curve in the infrared image of the communication cabinet. The reconstructed image is recorded as the component image corresponding to the component curve of the same layer.
5. According to the method for monitoring abnormal status of a communication cabinet based on the Internet of Things and visual perception according to claim 1, it is characterized in that: The specific calculation method of the occurrence probability is: The number of any type of grayscale values in any new grayscale value set is obtained as the first number, the number of elements in the new grayscale value set is recorded as the second number, and the ratio of the first number to the second number is recorded as the probability of occurrence of the type of grayscale value in the new grayscale set.
6. The abnormal state monitoring method of a communication cabinet based on the Internet of Things and visual perception according to claim 1 is characterized in that: The method of obtaining the optimal segmentation image according to the size of the optimal segmentation determination factor, dividing the component image by the number of layers where the optimal segmentation image is located, and obtaining a plurality of first component images and a baseline image includes the following specific methods: The component image corresponding to the maximum optimal segmentation determination factor is recorded as the optimal segmentation image, the number of layers of the optimal segmentation image is recorded as the optimal segmentation layer, the component image between the first layer and the optimal segmentation layer is recorded as the first component image, and several first component images are obtained. The grayscale values of the pixels at the same position in all component images except the first component image are accumulated, and the image obtained after the accumulation is recorded as the baseline image.
7. The abnormal state monitoring method of a communication cabinet based on the Internet of Things and visual perception according to claim 1 is characterized in that: The specific method of filtering any first component image using a filter kernel of a preset size to obtain a convolution image corresponding to the first component image includes: The specific method of obtaining the convolution image is: in, Indicates The first component image of the layer corresponds to the convolution image The gray value of each pixel; Indicates In the first component image of the layer The gray value of each pixel; Indicates the first component image The pixel points correspond to the size of the convolution kernel. Representative In the first component image of the layer The convolution kernel range of pixels The gray value of the neighboring pixels.
