A waste oil utilization plant safety monitoring method and system based on image processing

By combining bilinear interpolation and texture/color interpolation in image processing, the problem of image blurring and detail loss in waste oil utilization plant safety monitoring is solved, and a more accurate safety monitoring effect is achieved.

CN119091371BActive Publication Date: 2025-04-18HUBEI ANNAIJI ENVIRONMENTAL PROTECTION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411051664.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2025-04-18
Estimated Expiration
2044-08-01

AI Technical Summary

Technical Problem

The prior art cannot accurately realize safety monitoring of waste oil utilization plants, mainly due to blur and detail loss caused by image preprocessing methods.

Method used

By obtaining the R, G, and B channel images of the original image of the hydrogen-sensing tape, scaling processing and synthesising the target map, combining bilinear interpolation method with texture interpolation and/or color interpolation, taking into account position, texture and color information, a clearer target map is obtained for accurate identification.

Benefits of technology

It effectively avoids blur and detail loss caused by bilinear interpolation, improves the accuracy of image recognition, and thus achieves effective support for safety monitoring of waste oil utilization plants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119091371B_ABST
    Figure CN119091371B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and in particular to a method and system for safety monitoring of a waste oil utilization plant based on image processing, the method comprising: obtaining R, G, and B channel images of the original image of the hydrogen-sensitive tape on each device in the waste oil utilization plant; scaling each channel image, synthesizing the scaled channel images into a target image; identifying the target image to obtain a target area, so as to achieve safety monitoring of the waste oil utilization plant. That is, the scheme of the present invention can achieve safety monitoring of the waste oil utilization plant more accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and more specifically, to a waste oil utilization plant safety monitoring method and system based on image processing. Background Art

[0002] In waste oil utilization plants, in order to improve the utilization rate of waste oil, hydrogenation process is usually used to recycle waste oil, so as to achieve the purpose of energy saving, environmental protection and resource recycling. However, during the waste oil hydrogenation process, hydrogen is prone to leakage when passing through different equipment. Hydrogen is a flammable and explosive gas. The leakage of hydrogen will cause certain safety hazards to the waste oil utilization plant. Therefore, it is necessary to conduct real-time safety monitoring in the waste oil utilization plant to ensure the safety of the waste oil utilization plant.

[0003] In order to improve the detection efficiency when conducting safety monitoring on the equipment in the waste oil utilization plant, the prior art uses image recognition technology to conduct safety monitoring of the equipment. Specifically, hydrogen-sensitive tape is usually pasted on a location where hydrogen leakage is likely to occur, and an image of the hydrogen-sensitive tape is collected. By recognizing the image of the hydrogen-sensitive tape, it is determined whether the hydrogen-sensitive tape changes color due to hydrogen leakage, and then whether hydrogen leakage occurs in the corresponding equipment.

[0004] Since the external environment, shooting equipment, etc. may affect the clarity of the collected image, resulting in image information loss and blurring, the collected image needs to be preprocessed when performing image recognition. Specifically, histogram equalization, mean filtering, bilinear interpolation and other methods can be used to improve the accuracy of the recognition results.

[0005] The above-mentioned methods for preprocessing the collected images will result in blurring and loss of details in the processed images, thereby failing to accurately realize the safety monitoring of the waste oil utilization plant. Summary of the invention

[0006] The purpose of the present invention is to propose a waste oil utilization plant safety monitoring method and system based on image processing, so as to solve the problem that the prior art cannot accurately realize the safety monitoring of waste oil utilization plants; to this end, the present invention provides solutions in the following two aspects.

[0007] In a first aspect, the present invention provides a waste oil utilization plant safety monitoring method based on image processing, comprising:

[0008] Obtain the R, G, and B channel images of the original images of the hydrogen-sensitive tapes on each device in the waste oil utilization plant; perform scaling processing on each channel image, and synthesize the scaled channel images into a target image;

[0009] Identify the target map and obtain the target area to achieve safety monitoring of the waste oil utilization plant;

[0010] The pixel value at each position in each channel image is obtained by weighting the first interpolation and the second interpolation; the first interpolation is obtained by using bilinear interpolation; the second interpolation includes texture interpolation and / or color interpolation;

[0011] Texture interpolation is obtained by weighted summing the pixel values ​​of the texture weight and its four neighboring points in any channel image; the texture weight is the normalized value of the texture degree of any neighboring point;

[0012] Color interpolation is obtained by weighted summing the pixel values ​​of four neighboring points in any channel image using color weights; the color weight is the normalized value of the color degree of any neighboring point; the neighboring points are the surrounding pixels of any pixel position in each channel image in the corresponding position of the original image.

[0013] Optionally, the texture degree is positively correlated with the ratio of the gradient amplitude of the corresponding neighboring point to the sum of the gradient amplitudes of the four neighboring points and the gradient degree; the gradient degree characterizes the fluctuation of the lateral gradient and the longitudinal gradient of the four neighboring points; the color degree is the sum of the product of the ratio of the pixel value of any neighboring point in three channels to the sum of the pixel values ​​of all channels and the variance; the variance characterizes the pixel volatility of all pixel points in the set range of any neighboring point in the corresponding channel.

[0014] Optionally, the texture level T ij,u for:

[0015]

[0016] in, is the gradient amplitude of the uth neighboring point among the four neighboring points of the pixel position (i, j) in the target image at the corresponding position in the original image, is the sum of the gradient amplitudes of the four neighboring points at the corresponding position of the pixel position (i, j) in the target image in the original image, G ij is the gradient degree, gx ij is the variance of the lateral gradient amplitude of the four neighboring points at the corresponding position of the pixel position (i, j) in the target image, gy ij is the variance of the longitudinal gradient amplitude of the four neighboring points at the corresponding position of the pixel position (i, j) in the target image in the original image. GX and GY are the variance of the transverse gradient amplitude and the variance of the longitudinal gradient amplitude of all pixels in the original image, respectively.

[0017] Optionally, when the second interpolation is texture interpolation and color interpolation, the pixel value of each pixel position in the target image is: ij =w ij,1 ×I ij,1 +w ij,2 ×I ij,2+w ij,3 ×I ij,3 ;

[0018] Among them, I ij is the pixel value of the pixel position (i, j) in the target image, I ij,1 is the first interpolation value of pixel position (i, j), I ij,2 and I ij,3 are the texture interpolation and color interpolation of the pixel position (i, j) in the target image, respectively, and w ij,1 、w ij,2 and w ij,3 They are the first interpolation weight, texture interpolation weight and color interpolation weight respectively.

[0019] Optionally, the first interpolation weight, texture interpolation weight and color interpolation weight are respectively:

[0020] The bilinear interpolation method is used to obtain the position weights of the four neighboring points, and the difference between the maximum and minimum values ​​of the four position weights is used as the first difference;

[0021] The difference between the maximum value and the minimum value of the texture weights of the four neighboring points is taken as the second difference; the difference between the maximum value and the minimum value of the color weights of the four neighboring points is taken as the third difference;

[0022] The normalized values ​​of the first difference, the second difference, and the third difference are respectively used as a first interpolation weight, a texture interpolation weight, and a color interpolation weight.

[0023] Optionally, the first interpolation weight, texture interpolation weight and color interpolation weight are 0.4, 0.3 and 0.3 respectively.

[0024] Optionally, when the second interpolation is texture interpolation, the pixel value of each pixel position in the target image is: ij =w′ ij,1 ×I ij,1 +w′ ij,2 ×I ij,2 ;

[0025] Among them, I ij is the pixel value of the pixel position (i, j) in the target image, I ij,1 is the first interpolation value of pixel position (i, j), I ij,2 is the texture interpolation value of the pixel position (i, j) in the target image, w′ ij,1 , w′ ij,2They are respectively the first interpolation weight and the texture interpolation weight; wherein the first interpolation weight and the texture interpolation weight are normalized values ​​of the first difference, the second difference and the third difference; the first difference is the difference between the maximum value and the minimum value of the position weights of the four neighboring points, and the position weight is obtained by adopting the bilinear interpolation method; the second interpolation is the difference between the maximum value and the minimum value of the texture weights of the four neighboring points.

[0026] Optionally, the set range is a window centered at the corresponding position of the pixel position (i, j) in the target image in the original image, wherein the window is K×K, and K is greater than 1.

[0027] Optionally, the specific process of identifying the target image and obtaining the target area is: inputting the target image into a target detection model to identify the discolored target area and issue a reminder.

[0028] In a second aspect, the present invention provides a waste oil utilization plant safety monitoring system based on image processing, comprising:

[0029] processor;

[0030] The memory stores computer instructions for safety monitoring of waste oil utilization plants based on image processing. When the computer instructions are executed by the processor, the system executes the above-mentioned safety monitoring method for waste oil utilization plants based on image processing.

[0031] The beneficial effects of the present invention are:

[0032] The scheme of the present invention performs image interpolation processing on the R, G, and B channel images of the original image of the hydrogen-sensitive tape, and then synthesizes the three channel images after interpolation processing into a target image. At the same time, when performing the interpolation processing of each channel image, the position information, texture information, and color information are integrated, and the importance of texture information, color information, and distance information is weighed, so that the obtained target image can better present the effect of the original image, and then through the target image, it is easier to identify whether the hydrogen-sensitive tape has changed color, so as to achieve accurate image recognition, which is beneficial to the safety monitoring of the waste oil utilization plant. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0034] Figure 1 A flowchart schematically shows a method for safety monitoring of a waste oil utilization plant based on image processing in this embodiment;

[0035] Figure 2 The schematic diagram shows the corresponding position P of any pixel position in the R channel image in the original image. ij A schematic diagram of its four neighboring points;

[0036] Figure 3 The schematic diagram shows the neighboring point Q ij,1 A schematic diagram of the pixels within the window range as the center;

[0037] Figure 4 The structural block diagram of a waste oil utilization plant safety monitoring system based on image processing in this embodiment is schematically shown. DETAILED DESCRIPTION

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

[0039] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0040] The present invention aims at the safety problem of various equipment in the waste oil recycling plant when recycling waste oil. By collecting and preprocessing images of the locations where hydrogen leakage is likely to occur in each equipment, and identifying the collected images, the safety monitoring of the waste oil recycling plant can be realized. The above preprocessing generally requires scaling the original image, and the scaling can be achieved using a bilinear interpolation method.

[0041] However, in the process of obtaining the target image through bilinear interpolation, each pixel point is the weighted average of the four pixels around its corresponding position in the original image. It only considers the spatial correlation of the pixels but ignores the relationship between the pixels in other dimensions. This may cause blurring in the target image and loss of details, affecting the recognition of the hydrogen-sensitive tape in the image, and thus having a certain impact on the safety monitoring of the waste oil utilization plant.

[0042] Therefore, based on the above problems, the present invention provides a waste oil utilization plant safety monitoring method and system based on image processing, which obtains the texture information and / or color information of the original image to obtain a second interpolation of the image, and weights the second interpolation with the first interpolation obtained by the existing bilinear interpolation method to obtain the final pixel value in the target image. It can integrate information of multiple dimensions of the image to ensure that a clearer target image is obtained, thereby accurately realizing the safety monitoring of the waste oil utilization plant.

[0043] Specifically, Figure 1 As shown, a waste oil utilization plant safety monitoring method based on image processing in this embodiment includes:

[0044] In step S1, the original image of the hydrogen-sensitive tape on each device in the waste oil utilization plant is collected. Specifically, when collecting the original image of the hydrogen-sensitive tape, firstly, the existing hydrogen-sensitive tape is pasted on the location where hydrogen leakage is likely to occur in the equipment, such as hydrogen heating furnace, static mixer, flash tank, gas-liquid separation tank and other equipment, as well as pipes, flanges, valves and other accessories related to these equipment. Secondly, the image acquisition device is used to collect the image.

[0045] Among them, in this embodiment, there is no limitation on the location where the hydrogen-sensitive tape is pasted and the location where the image acquisition device is arranged. The implementer can paste the hydrogen-sensitive tape at a suitable location and arrange the image acquisition device according to the actual situation.

[0046] In step S2, the R, G, and B channel images of the original image are obtained; each channel image is scaled, and the scaled channel images are synthesized into a target image.

[0047] In the bilinear interpolation algorithm, the weights of the pixel values ​​of the four pixels are determined according to the distance between the corresponding position of the pixel point in the original image and the four surrounding pixels at each position in the target image, and then the pixel value of the pixel point at the position in the target image is obtained, but the influence of the edge features of the pixels in the image on the target image is ignored, resulting in the blurring of color boundaries in the target image. Therefore, the scaling process in this embodiment is based on the existing bilinear interpolation method, which not only interpolates each channel image of the original image separately, but also introduces the interpolation process of the two dimensions of texture and / or color to obtain the second interpolation, and combines the first interpolation and the second interpolation to avoid blurring and loss of details in the synthesized target image.

[0048] The pixel value at each position in each channel image after scaling in this embodiment is obtained by weighting the first interpolation and the second interpolation; the first interpolation is obtained by bilinear interpolation; the second interpolation includes texture interpolation and / or color interpolation, as follows:

[0049] 1. First interpolation:

[0050] The first interpolation is obtained by using the existing bilinear interpolation method, and the specific steps are as follows:

[0051] First, the scaling factor (in width and height directions) between each channel map and the original image is calculated; secondly, the scaling factor is used to infer the virtual pixel position in the original image from the pixel position in each channel map; then, four neighboring points in width and height directions are found from the virtual pixel position; finally, the position weights of the four neighboring points are calculated, and bilinear interpolation is performed based on the position weights and the pixel values ​​of the four neighboring points in any channel to obtain the first interpolation value of each position in each channel map.

[0052] 2. Second interpolation:

[0053] The second interpolation in this embodiment includes texture interpolation and / or color interpolation.

[0054] 1) The process of obtaining texture interpolation is:

[0055] First, the texture degree of any of the four neighboring points of any pixel position in each channel image at the corresponding position in the original image is calculated; secondly, each texture degree is normalized to obtain the corresponding texture weight, where the sum of the four texture weights is 1; then, the texture weight is used to perform weighted summation on the pixel values ​​of the four neighboring points in the corresponding channel image to obtain the pixel value of each position in the scaled corresponding channel image.

[0056] The four neighboring points in this embodiment are obtained by using the existing bilinear interpolation algorithm. For example, Figure 2 As shown, let the corresponding position P of any pixel position in the R channel image in the original image be ij (Here P ij It is not a pixel point, but a virtual pixel position between pixels. ij is determined by bilinear interpolation), at this time the position P ij The four neighboring points are: The neighboring point is Q ij,1 , the neighboring point is Q ij,2 , the neighboring point is Q ij,3 and the neighboring point is Q ij,4 ; The numbers above can also be in other orders.

[0057] The above texture degrees are positively correlated with the ratio of the gradient amplitude of the corresponding neighboring point to the sum of the gradient amplitudes of the four neighboring points and the gradient degree; the gradient degree represents the fluctuation changes of the lateral gradient and the longitudinal gradient of the four neighboring points.

[0058] In one embodiment, the expression of texture degree may be:

[0059]

[0060] in, is the gradient amplitude of the uth neighboring point among the four neighboring points of the pixel position (i, j) in the target image at the corresponding position in the original image, is the sum of the gradient amplitudes of the four neighboring points at the corresponding position of the pixel position (i, j) in the target image in the original image, G ij is the gradient degree, gx ij is the variance of the lateral gradient amplitude of the four neighboring points at the corresponding position of the pixel position (i, j) in the target image, gy ij is the variance of the longitudinal gradient amplitude of the four neighboring points at the corresponding position of the pixel position (i, j) in the target image in the original image. GX and GY are the variance of the transverse gradient amplitude and the variance of the longitudinal gradient amplitude of all pixels in the original image, respectively.

[0061] The above gradient is obtained using the Sobel operator.

[0062] Among them, the neighboring point Q ij,1 For example, u = 1, the texture level of the neighboring point is T ij,1 for:

[0063]

[0064] in, is the gradient amplitude of the uth neighboring point among the four neighboring points of the pixel position (i, j) in the target image at the corresponding position in the original image, is the sum of the gradient amplitudes of the four neighboring points at the corresponding position of the pixel position (i, j) in the target image in the original image, G ij is the gradient degree, gx ij is the variance of the lateral gradient amplitude of the four neighboring points at the corresponding position of the pixel position (i, j) in the target image, gy ij is the variance of the longitudinal gradient amplitude of the four neighboring points at the corresponding position of the pixel position (i, j) in the target image in the original image. GX and GY are the variance of the transverse gradient amplitude and the variance of the longitudinal gradient amplitude of all pixels in the original image, respectively.

[0065] in, is the relative gradient of the first neighboring point among the four neighboring points of the pixel position (i, j) in the target image at the corresponding position in the original image. The larger the value, the more likely the pixel corresponds to the edge and detail area in the image. The neighboring point Q ij,1 The greater the texture degree, the smaller the value, which means that the pixel point is more likely to correspond to the smooth area in the image, and the neighboring point Q ij,1The smaller the texture degree is, the smaller the gradient is. However, the calculation of gradient is very sensitive to image noise. Noise can cause a sudden increase in the local gradient amplitude, thus mistakenly believing that the texture of some pixels is important, resulting in the enhancement of the noise area during the interpolation process, affecting the quality of the target image. The above also introduces the gradient degree to correct the relative gradient size. When the gradient degree G ij The larger the value, the more likely the four pixels around position p are to have gradients with large directional differences, so the neighboring point Q ij,11 The higher the gradient, the more likely it is caused by noise (due to The value of is greater than 1, and The value range is (0, 1). At this time, as the gradient increases, the texture becomes smaller); conversely, position P ij The more likely the four surrounding pixels are to have gradients with similar directions, the closer the neighboring point Q is. ij,1 The higher the gradient, the more likely it is generated by the edge in the image. In this case, the neighboring point Q ij,1 The degree of texture is determined by the gradient of the pixel points.

[0066] According to the above neighboring point Q ij,1 The texture degree calculation method can be used to calculate the texture degree of the remaining three neighboring points; after obtaining the degree of the four neighboring points, the position P can be determined ij Whether the area is edge or noise.

[0067] The normalization process in this embodiment is to set the sum of the four texture weights to 1.

[0068] The texture interpolation I in this embodiment ij,2 for:

[0069] Among them, T′ ij,u is the texture weight of the uth neighboring point among the four neighboring points of the pixel position (i, j) in the target image at the corresponding position in the original image, It is the pixel value of the u-th neighboring point on the S channel among the four neighboring points of the pixel position (i, j) in the target image at the corresponding position in the original image, where the S channel is any one of the R, G, and B channels.

[0070] 2) The process of obtaining color interpolation is:

[0071] First, calculate the color degree of any of the four neighboring points of any pixel position in each channel image at the corresponding position in the original image; secondly, normalize each color degree to obtain the corresponding color weight, where the sum of the four color weights is 1; then, use the color weight to perform weighted summation of the pixel values ​​of the four neighboring points in the corresponding channel image to obtain the pixel value of each position in the scaled corresponding channel image. ij,u for: are the pixel ratios of the R channel, G channel, and B channel of the u-th neighboring point at the corresponding position of the original image at the pixel position (i, j) in the target image, respectively. ij,u , G ij,u , B ij,u They are the variances of the pixel values ​​in the R channel, G channel, and B channel of all pixels in the window where the u-th neighboring point of the pixel position (i, j) in the target image is located at the corresponding position in the original image.

[0072] The window is K×K, where K can be 3, 5 or 7.

[0073] like Figure 3 As shown, the neighboring point Q ij,1 , that is, u = 1, the window size is 3×3, for example, calculate the neighboring point Q ij,1 Color degree c ij,1 , in, are the pixel ratios of the R channel, G channel, and B channel of the first neighboring point of the pixel position (i, j) in the target image at the corresponding position in the original image, respectively. ij,1 , G ij,1 , B ij,1 They are the variances of the pixel values ​​in the R channel, G channel, and B channel of all pixels in the window where the first neighboring point of the pixel position (i, j) in the target image is located in the corresponding position of the original image.

[0074] Among them, R ij,1 , G ij,1 and B ij,1 The neighboring points Q ij,1 All pixels in the 3×3 window ( Figure 3 Q in the dashed box ij,1 The nine nearby pixel points) have pixel value variances on the three channels of R, G, and B. The larger the pixel value variances on the three channels, the closer the neighboring point Q is. ij,1 The greater the color change nearby, the greater the Q ij,1 The higher the color level, the closer the neighboring point Q is. ij,1 The smaller the color change nearby, the higher the Q ij,1 The lower the color level. Since the value ranges of pixels in the same area may be different in different channels, R ij,1 , G ij,1 and B ij,1 The problem of different dimensions is that the proportion of each pixel is used as the weight. ij,1 , G ij,1 and B ij,1 By weighted summation, we can get Q ij,1So far, the color levels of the remaining three neighboring points can be obtained, and the specific process will not be described in detail.

[0075] The color interpolation in this embodiment is: Among them, c′ ij,u is the color weight of the uth neighboring point among the four neighboring points of the pixel position (i, j) in the target image at the corresponding position in the original image, It is the pixel value of the u-th neighboring point on the S channel among the four neighboring points of the pixel position (i, j) in the target image at the corresponding position in the original image, where the S channel is any one of the R, G, and B channels.

[0076] In this embodiment, since bilinear interpolation only considers the spatial distance and ignores the color difference between pixels, it may cause color distortion and loss of image details in the obtained target image. Therefore, the color degree is calculated according to the pixel values ​​of the four neighboring points near the corresponding position of any pixel position in each channel image in the original image to perform interpolation calculation from the color perspective.

[0077] 3. Obtain the pixel value of each position in each channel image based on the first interpolation and the second interpolation:

[0078] In this embodiment, when the second interpolation is texture interpolation, the pixel value of each pixel position in each channel image is: ij =w′ ij,1 ×I ij,1 +w′ ij,2 ×I ij,2 ; Among them, I ij is the pixel value of the pixel position (i, j) in the target image, I ij,1 is the first difference of pixel position (i, j), I ij,2 is the texture interpolation value of the pixel position (i, j) in the target image, w′ ij,1 , w′ ij,2 They are the first interpolation weight and texture interpolation weight respectively.

[0079] Among them, the first interpolation weight and the texture interpolation weight are normalized values ​​of the first difference and the second difference, and the sum of the first interpolation weight and the texture interpolation weight is 1; the first difference is the difference between the maximum and minimum values ​​of the position weights of the four neighboring points, and the position weight is obtained by adopting bilinear interpolation; the second interpolation is the difference between the maximum and minimum values ​​of the texture weights of the four neighboring points.

[0080] Since when the second interpolation is color interpolation, the method for calculating the pixel value of each pixel position in the target image is similar to the method for calculating the pixel value of each pixel position in the target image when the second interpolation is texture interpolation, it is not repeated here.

[0081] As the most preferred implementation, when the second interpolation is texture interpolation and color interpolation, the pixel value of each pixel position in the target image is: ij =w ij,1 ×I ij,1 +w ij,2 ×I ij,2 +w ij,3 ×I ij,3 ; Among them, I ij is the pixel value of the pixel position (i, j) in the target image, I ij,1 is the first difference of pixel position (i, j), I ij,2 and I ij,3 are the texture interpolation and color interpolation of the pixel position (i, j) in the target image, respectively, and w ij,1 、w ij,2 and w ij,3 They are the first interpolation weight, texture interpolation weight and color interpolation weight respectively.

[0082] The first interpolation weight, texture interpolation weight, and color interpolation weight mentioned above can be directly set based on experience, such as being set to 0.4, 0.3, and 0.3 respectively.

[0083] As another implementation, the first interpolation weight, the texture interpolation weight, and the color interpolation weight are respectively: using bilinear interpolation method to obtain the position weights of four neighboring points, and taking the difference between the maximum value and the minimum value of the four position weights as the first difference;

[0084] The difference between the maximum value and the minimum value of the texture weights of the four neighboring points is taken as the second difference; the difference between the maximum value and the minimum value of the color weights of the four neighboring points is taken as the third difference;

[0085] The normalized values ​​of the first difference, the second difference, and the third difference are respectively used as the first interpolation weight, the texture interpolation weight, and the color interpolation weight, and the sum of the first interpolation weight, the texture interpolation weight, and the color interpolation weight is 1, that is, the first interpolation weight is Among them, w″ ij,1 , w″ ij,2 , w″ ij,3 They are the first difference, the second difference and the third difference respectively.

[0086] For example, w″ ij,1 is the maximum difference between the position weights used in calculating the first interpolation. For example, if the position weights of the four neighboring points are 0.2, 0.25, 0.2, and 0.35 respectively, then w″ ij,1 =0.35-0.2=0.15.

[0087] When w″ ij,1 The smaller the value, the more I is generated. ij,1The more average the weights applied to the pixel values ​​of the four neighboring points, the greater the distance dimension. ij,1 The smaller the characteristic, the ij,1 The lower the weight of the pixel values ​​​​of the four neighboring points, the more uneven the weights applied. ij,1 The higher the weight.

[0088] In the above embodiment, texture interpolation and / or color interpolation are obtained by analyzing texture and color and used for interpolation calculation of each position in each channel image, so that the details in the final synthesized target image can be better preserved.

[0089] At this point, the pixel values ​​of each position in the scaled R, G, and B channel images can be obtained; then the scaled R, G, and B channel images are merged to obtain the target image. The merging is a prior art and will not be described in detail here. The above target image retains the high-frequency details in the original image and weakens the aliasing effect in the target image, so that the characteristics of the original hydrogen-sensitive tape image are retained as much as possible.

[0090] In step S3, the target map is identified to obtain the target area to achieve safety monitoring of the waste oil utilization plant.

[0091] In this embodiment, the acquired target image is input into the target detection model to identify the target area with discoloration and issue a reminder.

[0092] The training process of the target detection model mentioned above is:

[0093] A training set is constructed, wherein the training set is a plurality of collected images of hydrogen-sensitive tapes or a plurality of historically stored images of hydrogen-sensitive tapes. The training set is manually annotated, such as marking a discolored area as 1 and marking a non-discolored area as 0.

[0094] The target detection model is trained using the training set and the corresponding labels to obtain a trained target detection model; the loss function uses the cross entropy loss.

[0095] The recognition in the above steps classifies the target image to obtain a discolored target area. Specifically, when a discolored target area is detected, a reminder is required.

[0096] The target detection model in the above steps can be a YOLO (You only look once) series model or a Faster R-CNN (Region with CNN feature) model.

[0097] The reminder in the above steps can warn relevant personnel by sound, text message, etc. The scheme in this embodiment can more easily detect whether the hydrogen-sensitive tape changes color due to hydrogen leakage by identifying the target image of the hydrogen-sensitive tape, and then determine whether hydrogen leakage has occurred, thereby improving the safety monitoring effect of the waste oil utilization plant.

[0098] The solution of the present invention avoids the detail loss and edge blurring caused by bilinear interpolation using only distance information by introducing texture interpolation and color interpolation, obtains a clearer target image, and can accurately identify the target image to achieve safe monitoring of the waste oil utilization plant.

[0099] The present invention also provides a waste oil utilization plant safety monitoring system based on image processing. Figure 4 As shown, the monitoring system includes a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned waste oil utilization plant safety monitoring method based on image processing according to the present invention is implemented.

[0100] The monitoring system also includes other components familiar to those skilled in the art, such as a communication bus and a communication interface, whose configuration and functions are known in the art and thus will not be described in detail here.

[0101] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device. Any application or module described in the present invention may be implemented using computer-readable / executable instructions that may be stored or otherwise maintained by such a computer-readable medium.

[0102] In the description of this specification, “plurality” means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.

[0103] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

Claims

1. A waste oil utilization plant safety monitoring method based on image processing, characterized in that: include: Obtain the R, G, and B channel images of the original images of the hydrogen-sensitive tapes on each device in the waste oil utilization plant; Scaling the images of each channel, and synthesizing the scaled channel images into a target image; Identify the target map and obtain the target area to achieve safety monitoring of the waste oil utilization plant; The pixel value at each position in each channel image after scaling is obtained by weighting the first interpolation and the second interpolation; the first interpolation is obtained by using bilinear interpolation; the second interpolation includes texture interpolation and / or color interpolation; Texture interpolation is obtained by weighted summing the pixel values ​​of the texture weight and its four neighboring points in any channel image; the texture weight is the normalized value of the texture degree of any neighboring point; Color interpolation is obtained by weighted summing the pixel values ​​of four neighboring points in any channel image using color weights; the color weight is the normalized value of the color degree of any neighboring point; the neighboring points are the surrounding pixels of any pixel position in each channel image at the corresponding position of the original image; The texture degree is positively correlated with the ratio of the gradient amplitude of the corresponding neighboring point to the sum of the gradient amplitudes of the four neighboring points and the gradient degree; the gradient degree represents the fluctuation of the horizontal gradient and the vertical gradient of the four neighboring points; the color degree is the sum of the product of the ratio of the pixel value of any neighboring point in three channels to the sum of the pixel values ​​of all channels and the variance; the variance represents the pixel volatility of all pixel points in the set range of any neighboring point in the corresponding channel.

2. The method for safety monitoring of waste oil utilization plants based on image processing according to claim 1 is characterized in that: Degree of texture for: ; in, is the gradient amplitude of the uth neighboring point among the four neighboring points of the pixel position (i, j) in the target image at the corresponding position in the original image, is the sum of the gradient amplitudes of the four neighboring points at the corresponding position of the pixel position (i, j) in the target image in the original image. is the gradient degree, , is the variance of the lateral gradient amplitude of the four neighboring points at the corresponding position of the pixel position (i, j) in the target image in the original image, is the variance of the longitudinal gradient amplitude of the four neighboring points at the corresponding position of the pixel position (i, j) in the target image in the original image. GX and GY are the variance of the transverse gradient amplitude and the variance of the longitudinal gradient amplitude of all pixels in the original image, respectively.

3. The method for safety monitoring of waste oil utilization plants based on image processing according to claim 1 is characterized in that: When the second interpolation is texture interpolation and color interpolation, the pixel value of each pixel position in the target image is: ; in, is the pixel value of the pixel position (i, j) in the target image, is the first interpolated value at pixel position (i, j), and They are the texture interpolation and color interpolation of the pixel position (i, j) in the target image, , and They are the first interpolation weight, texture interpolation weight and color interpolation weight respectively.

4. The method for safety monitoring of waste oil utilization plants based on image processing according to claim 3 is characterized in that: The first interpolation weight, texture interpolation weight and color interpolation weight are respectively: The bilinear interpolation method is used to obtain the position weights of the four neighboring points, and the difference between the maximum and minimum values ​​of the four position weights is used as the first difference; The difference between the maximum value and the minimum value of the texture weights of the four neighboring points is taken as the second difference value; The difference between the maximum and minimum color weights of the four neighboring points is taken as the third difference; The normalized values ​​of the first difference, the second difference, and the third difference are respectively used as a first interpolation weight, a texture interpolation weight, and a color interpolation weight.

5. The method for safety monitoring of waste oil utilization plants based on image processing according to claim 3 is characterized in that: The first interpolation weight, texture interpolation weight and color interpolation weight are 0.4, 0.3 and 0.3 respectively.

6. The method for safety monitoring of waste oil utilization plants based on image processing according to claim 1 is characterized in that: When the second interpolation is texture interpolation, the pixel value of each pixel position in the target image is: ; in, is the pixel value of the pixel position (i, j) in the target image, is the first interpolated value at pixel position (i, j), is the texture interpolation of the pixel position (i, j) in the target image, , They are respectively the first interpolation weight and the texture interpolation weight; wherein the first interpolation weight and the texture interpolation weight are normalized values ​​of the first difference, the second difference and the third difference; the first difference is the difference between the maximum value and the minimum value of the position weights of the four neighboring points, and the position weight is obtained by adopting the bilinear interpolation method; the second difference is the difference between the maximum value and the minimum value of the texture weights of the four neighboring points.

7. The method for safety monitoring of waste oil utilization plants based on image processing according to claim 1 is characterized in that: The setting range is a window centered at the corresponding position of the pixel position (i, j) in the target image in the original image, where the window is K×K, and K is greater than 1.

8. The method for safety monitoring of waste oil utilization plants based on image processing according to claim 1 is characterized in that: The specific process of identifying the target image and obtaining the target area is as follows: inputting the target image into the target detection model to identify the discolored target area and issue a reminder.

9. A waste oil utilization plant safety monitoring system based on image processing, characterized in that: include: processor; A memory storing computer instructions for safety monitoring of a waste oil utilization plant based on image processing. When the computer instructions are executed by the processor, the system executes a method for safety monitoring of a waste oil utilization plant based on image processing according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Image processing method and device, electronic equipment and computer readable storage medium

    CN116452416A