Chemical pipeline anti-leakage safety detection method
Through window processing of infrared images of chemical pipelines and analysis of heat radiation disputes, thermal poles were screened out and local abnormal temperature parameters were constructed, and the error detection problem in chemical pipeline leakage detection was solved, and the detection accuracy and intelligence level were improved.
Patent Information
- Application Number
- CN202510855157.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-06-25
AI Technical Summary
In the leakage detection of chemical pipelines, existing infrared detection methods are prone to mis-checking due to uneven thickness areas of welding and uneven thickness areas, which affects the accuracy of detection.
By collecting infrared images of chemical pipelines, dividing them into multiple windows, combining the heat radiation disputed areas based on the difference in grayscale values of adjacent windows, determining the affiliate parameters and voting scores of pixel points, filtering out the thermal poles, constructing local abnormal temperature parameters, and determining whether there is leakage.
It improves the accuracy of chemical pipeline leakage detection, reduces the difficulty of identifying possible leakage areas, supports the transportation and recycling of chemical materials, and realizes intelligent monitoring of pipeline leakage.
Smart Images

Figure CN120374610A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image data processing, and particularly relates to a method for safety detection of chemical pipeline anti-leakage. Background Art
[0002] Chemical products are widely used in modern industry, covering multiple fields such as petrochemical, pharmaceutical, food, and agriculture. These chemicals provide necessary raw materials and products for all walks of life, but at the same time bring potential safety hazards. Especially in the chemical pipeline system, the transportation and storage of chemical substances are often accompanied by the risk of leakage. Once a pipeline leaks, it will not only cause waste of resources, but also may trigger accidents such as fires and explosions, endangering the safety of personnel's lives and the ecological environment.
[0003] Existing leakage detection technologies generally use infrared rays to detect gas leakage in chemical pipelines. This detection method has certain limitations. Because chemical pipelines cannot be a complete whole, there are welding areas and areas with uneven thickness in the pipelines. In these areas, due to the different pipeline materials and thicknesses, the absorption of thermal radiation of chemical gases in the pipelines is different, and thus different external thermal radiations are shown. When using the conventional infrared detection method to detect leakage in chemical pipelines, false detections are extremely likely to occur at the welded joints and uneven thickness areas of the pipelines, affecting the accuracy of actual detection. Summary of the Invention
[0004] The present invention provides a method for safety detection of chemical pipeline anti-leakage to solve the existing problems.
[0005] A method for safety detection of chemical pipeline anti-leakage of the present invention adopts the following technical solutions: An embodiment of the present invention provides a method for safety detection of chemical pipeline anti-leakage, and the method includes the following steps: Obtain the infrared image of the chemical pipeline; Divide the infrared image of the chemical pipeline into several equal windows, and merge the windows according to the difference in pixel gray values between adjacent windows to obtain a thermal radiation controversial area; According to the difference between pixel gray values in the thermal radiation controversial area, determine the membership parameter of each pixel's neighborhood pixel to each pixel, and several lower-level pixels of each pixel in the thermal radiation controversial area; According to the membership parameter corresponding to each pixel of the lower-level pixel of each pixel in the thermal radiation controversial area, determine the membership voting score corresponding to each pixel in the thermal radiation controversial area; according to the membership voting score corresponding to each pixel in the thermal radiation controversial area, screen out several thermal extreme points from all pixels in the thermal radiation controversial area; Determine the local abnormal temperature parameter corresponding to the thermal pole according to the subordinate pixel points of the thermal pole corresponding to each pixel point and the membership parameter and pixel point gray value corresponding to each pixel point; Judge whether there is a leak in the thermal radiation dispute area according to the local abnormal temperature parameters corresponding to all the thermal poles in the thermal radiation dispute area.
[0006] Further, the step of equally dividing the infrared image of the chemical pipeline into a plurality of windows and merging the windows according to the difference in pixel point gray values between adjacent windows to obtain a thermal radiation dispute area includes the following specific steps: Equally divide the infrared image of the chemical pipeline into a plurality of windows with a size of The window, Is the preset side length; For the th window, calculate the gray value average of all pixel points in the window, denoted as the gray value average of the th window; Determine all thermal radiation dispute windows in the infrared image of the chemical pipeline according to the difference in gray value averages between adjacent windows; Form a thermal radiation dispute area with adjacent thermal radiation dispute windows.
[0007] Further, the step of determining all thermal radiation dispute windows in the infrared image of the chemical pipeline according to the difference in gray value averages between adjacent windows includes the following specific steps: For the th window, calculate the absolute value of the difference between the gray value average of the th window and the gray value average of each adjacent window of the th window. If there is a value greater than the first preset threshold among the absolute values of the differences between the gray value averages of all adjacent windows of the th window and the th window, determine that the th window is a thermal radiation dispute window.
[0008] Further, the step of determining the membership parameter of the neighborhood pixel points of each pixel point in the thermal radiation dispute area for each pixel point and several subordinate pixel points of each pixel point according to the difference between the pixel point gray values in the thermal radiation dispute area includes the following specific steps: For the th thermal radiation dispute area, calculate the difference between the gray value of the th pixel point and the gray value of the th pixel point in the eight-neighborhood of the th pixel point, denoted as the first gray difference; Calculate the The average gray value of the pixels within the eight-neighborhood of a pixel is denoted as the first gray average; For the th pixel, within the eight-neighborhood of the th pixel, calculate the average gray value of the pixels within the eight-neighborhood of the th pixel, and denote it as the first neighborhood gray average of the th pixel within the eight-neighborhood of the th pixel; For the th pixel, calculate the difference between the first gray average and the first neighborhood gray average of the th pixel within the eight-neighborhood of the th pixel, and denote it as the membership degree of the th pixel within the eight-neighborhood of the th pixel with respect to the th pixel; Calculate the product of the first preset selection weight and the first gray difference, and denote it as the first product. Calculate the product of the second preset selection weight and the membership degree of the th pixel within the eight-neighborhood of the th pixel with respect to the th pixel, and denote it as the second product. Calculate the sum of the first product and the second product, and denote it as the membership parameter of the th pixel within the eight-neighborhood of the th pixel with respect to the th pixel; For all the membership parameters of the pixels within the eight-neighborhood of the th pixel with respect to the th pixel, select the pixel corresponding to the maximum membership parameter within the eight-neighborhood of the th pixel as the first lower-level pixel of the th pixel; According to the acquisition method of the first lower-level pixel of the th pixel, acquire the first lower-level pixel of the pixel as the second lower-level pixel of the th pixel, and then acquire the first lower-level pixel of the pixel as the third lower-level pixel of the th pixel; and so on, to obtain several lower-level pixels of the th pixel.
[0009] Further, determining the membership voting score corresponding to each pixel in the thermal radiation dispute area according to the membership parameters corresponding to each sub-pixel of each pixel in the thermal radiation dispute area includes the following specific steps: For the th pixel, calculate the sum of the membership parameters of all sub-pixels of the th pixel with respect to the th pixel, denoted as the membership value of the th pixel. Calculate the product of the number of all sub-pixels of the th pixel and the membership value of the th pixel, denoted as the membership voting score.
[0010] Further, screening several thermal extreme points from all pixels in the thermal radiation dispute area according to the membership voting score corresponding to each pixel in the thermal radiation dispute area includes the following specific steps: For the th thermal radiation dispute area, arrange the membership voting scores of all pixels in descending order to obtain a pixel membership voting score sequence; Take the floor value of one-tenth of the area of the th thermal radiation dispute area, denoted as the thermal extreme point suggestion value of the th thermal radiation dispute area ; For the pixel membership voting score sequence, select the first pixels as the thermal extreme points of the th thermal radiation dispute area.
[0011] Further, determining the local abnormal temperature parameter corresponding to the thermal extreme point according to the membership parameter corresponding to each sub-pixel of the thermal extreme point and the pixel gray value includes the following specific steps: For the th sub-pixel, obtain the within-category weight value of the th sub-pixel according to the membership parameters and pixel gray values of all sub-pixels of the th thermal extreme point; For the th sub-pixel of the th thermal extreme point, calculate the product of the within-category weight value of the th sub-pixel and the pixel gray value of the th sub-pixel, denoted as the temperature gradient of the th sub-pixel; Calculate the difference between the pixel gray value and the temperature gradient of the th thermal extreme point, denoted as the The new pixel gray value of the subordinate pixel points; According to the sizes of the new pixel gray values of all subordinate pixel points of the
[0012] Further, the obtaining of the in-group weight value of the th subordinate pixel point according to the membership parameters and pixel gray values of all subordinate pixel points of the th heat pole includes the following specific steps: Within the th heat radiation dispute area, for the th heat pole, calculate the mean value of the membership parameters of all subordinate pixel points of the th heat pole with respect to the th heat pole, denoted as the first mean value, and calculate the ratio of the membership parameter of the th subordinate pixel point of the th heat pole with respect to the th heat pole to the first mean value, denoted as the relative membership parameter; For the th heat pole, calculate the reciprocal of the Euclidean distance between the th heat pole and the th subordinate pixel point of the th heat pole, denoted as the distance correlation; For the th subordinate pixel point of the th heat pole, calculate the absolute value of the difference between the pixel gray value of the th subordinate pixel point and the mean value of the pixel gray values of the pixels in the eight-neighborhood of the th subordinate pixel point, denoted as the second gray difference, and calculate the reciprocal of the second gray difference, denoted as the temperature uniformity index; For the th subordinate pixel point of the th heat pole, calculate the product of the relative membership parameter, the distance correlation, and the temperature uniformity index, denoted as the in-group weight value of the th subordinate pixel point.
[0013] Further, the determination of the local abnormal temperature parameter corresponding to the heat pole according to the sizes of the new pixel gray values of all subordinate pixel points of the th heat pole includes the following specific steps: For the th heat pole, calculate the D8 distance between all subordinate pixel points of the th heat pole and the th heat pole; Obtain the Construct a preset distance sequence with the maximum value Z among the D8 distances between all subordinate pixel points of the a-th hot pole point and the b-th hot pole point. ; Screen out all subordinate pixel points with D8 distances being the first value in the preset distance sequence, denoted as target subordinate pixel points. Calculate the variance of the temperature gradients of all target subordinate pixel points, denoted as the temperature variance of the first value in the preset distance sequence. Calculate the average value of the pixel grayscale values of all target subordinate pixel points, denoted as the grayscale average of the first value in the preset distance sequence. Calculate the sum of the temperature variances for all values within the preset distance sequence, denoted as the temperature distribution consistency index. Take the absolute value of the difference between the grayscale averages of adjacent values in the preset distance sequence, and use the sum value of the absolute values of the differences between the grayscale averages of all adjacent values in the preset distance sequence as the temperature distribution rationality index. Calculate the ratio of the temperature distribution rationality index to the temperature distribution consistency index, denoted as the first anomaly index, and take the inverse proportional normalization value of the first anomaly index as the local anomaly temperature parameter.
[0014] Furthermore, determining whether there is a leak in the heat radiation dispute area based on the local anomaly temperature parameters corresponding to all hot pole points in the heat radiation dispute area includes the following specific steps: For the -th heat radiation dispute area, calculate the normalized value of the average of the local anomaly temperature parameters of all hot pole points in the -th heat radiation dispute area, denoted as the pipeline leakage possibility of the -th heat radiation dispute area. For all heat radiation dispute areas, when the pipeline leakage possibility of the t-th heat radiation dispute area is greater than the second preset threshold , it is determined that there is a pipeline leak in the t-th heat radiation dispute area.
[0015] The beneficial effects of the technical solution of the present invention are: Collect infrared images of the surface of chemical pipelines, divide the infrared images of chemical pipelines into multiple windows, merge adjacent windows according to the gray value differences of all pixel points within the windows to obtain a thermal radiation controversy area, initially locate the abnormal area on the surface of the chemical pipeline, narrow the range of the possible leakage area, and improve the monitoring accuracy. Determine the membership parameters corresponding to the pixel points in the thermal radiation controversy area according to the gray values of the pixel points in the thermal radiation controversy area, and then determine the membership voting scores corresponding to the pixel points in the thermal radiation controversy area. Finally, determine all the thermal poles in the thermal radiation controversy area and multiple subordinate pixel points corresponding to each thermal pole, thereby determining multiple abnormal points in the abnormal area, further narrowing the possible leakage area, and improving the monitoring accuracy. Construct the relative temperature distribution of the pipeline in the local area of the thermal pole based on the membership parameters and pixel gray values of the multiple subordinate pixel points corresponding to the thermal pole, so as to determine the local abnormal temperature parameter corresponding to the thermal pole, thereby realizing the expression of the temperature characteristics of the abnormal point area and reducing the difficulty of identifying the possible leakage area. Judge whether there is a leakage in the thermal radiation controversy area according to the local abnormal temperature parameters corresponding to all the thermal poles in the thermal radiation controversy area, and locate the area where the leakage occurs on the surface of the chemical pipeline. So far, the present invention determines multiple controversy areas and abnormal pixel points on the surface of the chemical pipeline by analyzing the performance of the gray values of the pixel points in the infrared image, effectively reducing the difficulty of identifying the possible leakage area, thereby improving the accuracy of monitoring the leakage on the pipeline surface, which is beneficial to both the transportation and recovery of chemical materials and the intelligence of pipeline leakage. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0017] Figure 1 It is a step flow chart of a method for preventing leakage and safety detection of chemical pipelines according to the present invention; Figure 2 It is a schematic diagram of an infrared image of a chemical pipeline with relatively uniform medium in this embodiment; Figure 3 It is a schematic diagram of an infrared image of a chemical pipeline with non-uniform medium in this embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] To further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following specifically describes, in conjunction with the accompanying drawings and preferred embodiments, a chemical pipeline anti-leakage safety detection method proposed according to the present invention, including its specific implementation manner, structure, features, and effects. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs.
[0020] The following specifically describes the specific solution of a chemical pipeline anti-leakage safety detection method provided by the present invention in conjunction with the accompanying drawings.
[0021] Please refer to Figure 1 , which shows a step flow chart of a chemical pipeline anti-leakage safety detection method provided by an embodiment of the present invention. The method includes the following steps: Step S001: Obtain an infrared image of the chemical pipeline.
[0022] In this embodiment, an infrared image of the chemical pipeline is obtained by an infrared detector. The infrared detector is parallel to the chemical pipeline, and a mobile robot equipped with a robotic arm is used to hold the infrared detector, thereby obtaining an infrared image of a section of the chemical pipeline directly in front. Among them, the infrared image is denoised.
[0023] In this embodiment, the Gaussian filtering algorithm is used to denoise the infrared image of each section. The Gaussian filtering denoising algorithm (Gauss filter) is a well-known technology, and the specific algorithm will not be described here.
[0024] It should be noted that an infrared detector is a device that can sense and measure infrared radiation, detect the infrared radiation emitted by an object or environment, and convert this information into a visible image or data.
[0025] Repeat the shooting process to obtain several infrared images of the chemical pipeline surface.
[0026] It should be noted that the pipeline area in the infrared image of the chemical pipeline accounts for 1 / 3 of the infrared image area.
[0027] Step S002: Divide the infrared image of the chemical pipeline into several windows equally, and merge the windows according to the difference in pixel gray values between adjacent windows to obtain a thermal radiation dispute area.
[0028] It should be noted that when the medium is uniform, since the pressure inside the pipeline is constant and the flow rate of the chemical gas is close, the temperature radiation is close, that is, the difference value of the average gray value in adjacent windows is small. When there is a disputed area, there is a certain difference in the average gray value in adjacent windows. Therefore, this difference is used to determine the thermal radiation disputed area.
[0029] Divide the infrared image of the chemical pipeline into several windows of size .
[0030] It should be noted that represents the preset side length. In this embodiment, is taken as an example for description. Other values can be set in other embodiments, and this embodiment does not make specific limitations.
[0031] For the th window, calculate the average gray value of all pixel points in the window, denoted as the average gray value of the th window. Repeat the steps to obtain the average gray values of several windows.
[0032] Calculate the absolute value of the difference between the average gray value of the th window and the average gray value of each adjacent window of the th window. If there is an absolute value of the difference between the average gray values of all adjacent windows of the th window and the th window that is greater than the first preset threshold , determine that the th window is a thermal radiation disputed window.
[0033] It should be noted that the first preset threshold is 50, and this is taken as an example for description.
[0034] Obtain all thermal radiation disputed windows in the above manner.
[0035] According to all the obtained thermal radiation disputed windows, form a thermal radiation disputed area by combining adjacent thermal radiation disputed windows.
[0036] It should be noted that the thermal radiation disputed area refers to the area where it is impossible to judge whether chemical leakage has occurred through the absolute temperature, that is, it may be the welding area of the pipeline or the area with uneven medium.
[0037] Step S003: According to the differences between the gray values of the pixel points in the thermal radiation disputed area, determine the membership parameters of the neighborhood pixel points of each pixel point in the thermal radiation disputed area for each pixel point, and several lower-level pixel points of each pixel point; according to the membership parameters corresponding to each pixel point of the lower-level pixel points of each pixel point in the thermal radiation disputed area, determine the membership voting scores corresponding to each pixel point in the thermal radiation disputed area; according to the membership voting scores corresponding to each pixel point in the thermal radiation disputed area, screen out several thermal poles from all the pixel points in the thermal radiation disputed area.
[0038] It should be noted that for the thermal radiation disputed area, due to the complexity of its thermal radiation, it is impossible to perform effective thermal radiation calculation (that is, the method for judging regional thermal radiation generated by a uniform medium). Therefore, in this embodiment, for the thermal radiation in the disputed area, by using the method of neighborhood analysis, by assuming a thermal pole, and then within a smaller range, using the method of relative temperature analysis to perform normal analysis of the thermal radiation within the local area. The schematic diagram of the infrared image of a relatively uniform medium chemical pipeline is as Figure 2 shown.
[0039] It should also be noted that even if the medium of the pipeline is not uniform enough, but within a smaller range, due to the obvious thermal superposition effect (that is, the heat transfer between each other), it can be considered that within a smaller range, there is a certain stable relative change in thermal attenuation. Specifically, it is manifested as a change in temperature gradient. Heat transfer tends to make the temperature difference between different regions gradually decrease, so that the thermal distribution of the region reaches a relatively stable state. The schematic diagram of the infrared image of a non-uniform medium chemical pipeline is as Figure 3 shown.
[0040] For the th thermal radiation disputed area, calculate the difference between the gray value of the th pixel point and the gray value of the th pixel point in the eight-neighborhood of the th pixel point, and record it as the first gray difference.
[0041] According to the known magnitude of the first gray difference, determine the first preset selection weight and the second preset selection weight .
[0042] It should be noted that when the first gray difference is equal to zero, the first preset selection weight is equal to zero, and the second preset selection weight is equal to one. On the contrary, when the first gray difference is not equal to zero, the first preset selection weight is equal to one, and the second preset selection weight is equal to zero. This is used as an example for explanation.
[0043] For the th thermal radiation dispute area, calculate the average gray value of the pixels within the eight-neighborhood of the th pixel, and denote it as the first gray average value.
[0044] For the th pixel within the eight-neighborhood of the th pixel, calculate the average gray value of the pixels within the eight-neighborhood of the th pixel, and denote it as the first neighborhood gray average value of the th pixel within the eight-neighborhood of the th pixel.
[0045] For the th pixel, calculate the difference between the first gray average value and the first neighborhood gray average value of the th pixel within the eight-neighborhood of the th pixel, and denote it as the membership degree of the th pixel within the eight-neighborhood of the th pixel with respect to the th pixel.
[0046] For the th pixel, calculate the product of the first preset selection weight and the first gray difference, and denote it as the first product. Calculate the product of the second preset selection weight and the membership degree of the th pixel within the eight-neighborhood of the th pixel with respect to the th pixel, and denote it as the second product. Calculate the sum of the first product and the second product, and denote it as the membership parameter of the th pixel within the eight-neighborhood of the th pixel with respect to the th pixel.
[0047] It should be noted that since thermal radiation transfers from high-temperature areas to low-temperature areas, the selection of the thermal pole is to fit the local highest temperature point in the pipeline dispute area.
[0048] Repeat the steps to obtain the membership parameters of all pixels within the eight-neighborhood of the th pixel with respect to the th pixel. Select the pixel within the eight-neighborhood of the th pixel corresponding to the maximum membership parameter as the first subordinate pixel of the th pixel.
[0049] According to the acquisition method of the first subordinate pixel of the th pixel, acquire the pixel The first lower-level pixel point ( not the th pixel point), as the second lower-level pixel point of the th pixel point; according to the acquisition method of the first lower-level pixel point of the th pixel point, acquire the first lower-level pixel point of pixel point ( ( not and the th pixel point), as the third lower-level pixel point of the th pixel point; and so on, obtaining several lower-level pixel points of the th pixel point.
[0050] It should be noted that: when the first gray-scale difference is greater than 0, and the greater it is, it indicates that the gray-scale value of the th pixel point is much greater than the th pixel point within its eight-neighborhood, and when the membership degree of the th pixel point within the eight-neighborhood of the th pixel point with respect to the th pixel point is greater than 0, and the greater it is, it indicates that the neighborhood gray-scale mean value of the th pixel point is much greater than the neighborhood gray-scale mean value of the th pixel point within its eight-neighborhood. Therefore, the greater the membership parameter of the th pixel point within the eight-neighborhood of the th pixel point with respect to the th pixel point obtained according to the first gray-scale difference and the membership degree, the more it can indicate that the gray-scale value of the th pixel point is much greater than the th pixel point within its eight-neighborhood, and the first lower-level pixel point of the th pixel point is the pixel point with the largest membership parameter within the eight-neighborhood of the th pixel point. Therefore, the first lower-level pixel point of the th pixel point is the pixel point within the eight-neighborhood of the th pixel point whose gray-scale value is much smaller than the th pixel point. Therefore, the more the first lower-level pixel points of the th pixel point, and the greater the membership parameter, it indicates that the range where the temperature gradually decreases from the th pixel point to the surrounding is larger, and the greater the temperature drop, the more likely the th pixel point is a local heat pole.
[0051] It should be noted that: when the first lower-level pixel point of the y-th lower-level pixel point of the th pixel point does not exist, stop the iteration, that is, obtain the y lower-level pixels of a pixel point.
[0052] It should be noted that when the membership parameters of multiple pixel points in the eight-neighborhood are all the maximum values, randomly select one of them as the lower-level pixel point of the pixel point.
[0053] Take the pixel point as the upper-level pixel point of pixel point .
[0054] It should be noted that each pixel point can have multiple lower-level pixel points, but each pixel point can only have one upper-level pixel point. If a pixel point belongs to multiple pixel points, only the pixel point corresponding to the maximum membership parameter is valid, and the others are invalid.
[0055] In the above manner, obtain several lower-level pixel points of each pixel point in the thermal radiation dispute area, and the unique upper-level pixel point of each pixel point.
[0056] For the pixel point, calculate the sum of the membership parameters of all the lower-level pixel points of the pixel point with respect to the pixel point, denoted as the membership value of the pixel point. Calculate the product of the number of all lower-level pixel points of the pixel point and the membership value of the pixel point, denoted as the membership voting score.
[0057] For the thermal radiation dispute area, repeat the steps to obtain the membership voting scores of different pixel points, and arrange the membership voting scores in descending order to obtain the pixel point membership voting score sequence.
[0058] Take the floor value of one-tenth of the area of the thermal radiation dispute area, denoted as the thermal pole recommended value of the thermal radiation dispute area.
[0059] For the pixel point membership voting score sequence, select the first pixel points as the thermal poles of the thermal radiation dispute area.
[0060] Step S004: Determine the local abnormal temperature parameter corresponding to the thermal pole according to the membership parameter corresponding to the lower-level pixel point of the thermal pole and the pixel point gray value.
[0061] It should be noted that since the gray value distribution of pixel points in the thermal radiation controversial area is scattered, it is usually difficult to judge the abnormal points in this local area. In this embodiment, by performing weighted blurring on the thermal radiation controversial area, a local area with a relatively obvious temperature gradient change centered on the thermal pole is obtained, so that it is easy to determine the abnormal points in the local area.
[0062] In the th thermal radiation controversial area, for the th thermal pole, calculate the mean value of the membership parameters of all the subordinate pixel points of the th thermal pole with respect to the th thermal pole, denoted as the first mean value. Calculate the ratio of the membership parameter of the th subordinate pixel point of the th thermal pole with respect to the th thermal pole to the first mean value, denoted as the relative membership parameter.
[0063] For the th thermal pole, calculate the reciprocal of the Euclidean distance between the th thermal pole and the th subordinate pixel point of the th thermal pole, denoted as the distance correlation.
[0064] For the th subordinate pixel point of the th thermal pole, calculate the absolute value of the difference between the gray value of the th subordinate pixel point and the mean value of the gray values of the pixels in the eight-neighborhood of the th subordinate pixel point, denoted as the second gray difference. Calculate the reciprocal of the second gray difference, denoted as the temperature uniformity index.
[0065] It should be noted that when the relative membership parameter is larger and the temperature uniformity index is larger, it indicates that it is more in line with the temperature change characteristics and the adjustment range of the temperature gradient is smaller. When the distance correlation is smaller, the corresponding temperature gradient is smaller.
[0066] For the th subordinate pixel point of the th thermal pole, calculate the product of the relative membership parameter, the distance correlation, and the temperature uniformity index, denoted as the within-category weight of the th subordinate pixel point.
[0067] It should be noted that by adjusting the gray value of the controversial area, the temperature value (gray value) in the local area is made to transfer heat as much as possible in a uniform medium centered on the thermal pole, that is, centered on the thermal pole, the pipe medium is thinnest at the thermal pole and the temperature is the highest, and then gradually the medium becomes thicker and the temperature decreases uniformly outward.
[0068] For the th subordinate pixel point of the th hot pole, calculate the product of the within-category weight of the th subordinate pixel point and the pixel grayscale value of the th subordinate pixel point, and denote it as the temperature gradient of the th subordinate pixel point.
[0069] For the th hot pole, repeat the steps to obtain the temperature gradients of all subordinate pixel points of the th hot pole.
[0070] For the th subordinate pixel point of the th hot pole, calculate the difference between the pixel grayscale value of the th hot pole and the temperature gradient, and denote it as the new pixel grayscale value of the th subordinate pixel point. Repeat the steps to obtain the new pixel grayscale values of all subordinate pixel points of the th hot pole.
[0071] It should be noted that by obtaining the relative distribution of the pipeline temperature in the local area of the th hot pole, the temperature change in the corresponding local neighborhood should ideally be related to the distance between the pixel points in the local area and the hot pole, that is, when the distances from the hot pole are equal, the corresponding temperature gradients are equal, and the farther the distance from the hot pole, the lower the corresponding temperature gradient. In summary, combining this feature, calculate the abnormal temperature parameter in the local area of the th hot pole.
[0072] For the th hot pole, calculate the D8 distance (Chessboard distance) between all subordinate pixel points of the th hot pole and the th hot pole. The D8 distance is a well-known technology, and the specific content will not be described here.
[0073] Obtain the maximum value Z among the D8 distances between all subordinate pixel points of the th hot pole and the th hot pole, and construct a preset distance sequence
[0074] For the For a thermal extreme point, all subordinate pixel points with a D8 distance equal to the first value in the preset distance sequence are screened out, denoted as target subordinate pixel points. Calculate the variance of the temperature gradients of all target subordinate pixel points, denoted as the temperature variance of the first value in the preset distance sequence. Calculate the average of the pixel grayscale values of all target subordinate pixel points, denoted as the grayscale average of the first value in the preset distance sequence.
[0075] Repeat the steps to obtain the temperature variances and grayscale averages at all distances.
[0076] For the th thermal extreme point, calculate the sum of the temperature variances at all values within the preset distance sequence, denoted as the temperature distribution consistency index.
[0077] For the th thermal extreme point, calculate the absolute value of the difference between the grayscale averages of adjacent values within the preset distance sequence. Take the sum of the absolute values of the differences between the grayscale averages of all adjacent values in the preset distance sequence as the temperature distribution rationality index.
[0078] It should be noted that when the temperature distribution consistency index is smaller, it indicates that in the area with the same distance from the thermal extreme point, the temperature difference is smaller, which conforms to local heat uniform transmission. When the temperature distribution rationality index is larger, it indicates that in the current local area, the farther away from the thermal extreme point, the lower the temperature.
[0079] For the th thermal extreme point, calculate the ratio of the temperature distribution rationality index to the temperature distribution consistency index, denoted as the first anomaly index. Take the inverse proportional normalization value of the first anomaly index as the local anomaly temperature parameter.
[0080] It should be noted that is the exponential function with the natural constant as the base. In this embodiment, shows the inverse proportional relationship and normalization processing. The implementer can set the inverse proportional function and normalization function according to the actual situation. Repeat the steps to obtain the local anomaly temperature parameters of all thermal extreme points in the th thermal radiation dispute area.
[0081] Step S005: According to the local anomaly temperature parameters corresponding to all thermal extreme points in the thermal radiation dispute area, determine whether there is a leakage in the thermal radiation dispute area.
[0082] For the th thermal radiation dispute area, calculate the average of the local anomaly temperature parameters of all thermal extreme points in the th thermal radiation dispute area, denoted as the second average. Use the normalization function to normalize the second average, denoted as the The possibility of pipeline leakage in a heat radiation controversial area.
[0083] It should be noted that is a linear normalization function that normalizes data values to the range [0, 1].
[0084] Repeat the steps to obtain the possibility of pipeline leakage in all heat radiation controversial areas.
[0085] For all heat radiation controversial areas, when the possibility of pipeline leakage in the t-th heat radiation controversial area is greater than the second preset threshold it is determined that there is pipeline leakage in the t-th heat radiation controversial area.
[0086] It should be noted that the second preset threshold is , and this is used as an example for illustration.
[0087] It should be noted that when it is determined that there is pipeline leakage in the heat radiation controversial area, the ultrasonic flaw detection equipment is used to refine the problem search in the leakage area, find the leakage point and repair it. In this embodiment, when calculating the reciprocal or ratio, if the denominator is 0, the denominator is set to 1 to ensure the calculation is valid.
[0088] So far, the present invention is completed.
[0089] In summary, in the embodiment of the present invention, the infrared image on the surface of the chemical pipeline is collected, the infrared image of the chemical pipeline is divided into multiple windows, the windows are merged according to the gray value difference of all pixel points in the window to obtain the heat radiation controversial area, and then the membership voting score corresponding to the pixel point is determined by combining the gray value of the pixel point, so as to determine all the heat poles and subordinate pixel points in the heat radiation controversial area, and then combine the gray value change of the pixel point at different distances to determine the local abnormal temperature parameters of multiple pixel points, and finally determine the leakage possibility of the heat radiation controversial area. The present invention effectively reduces the difficulty of identifying the possible leakage area, thereby improving the accuracy of pipeline surface leakage monitoring, which is beneficial to both the transportation and recovery of chemical materials and the intelligence of pipeline leakage.
[0090] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A safety detection method for preventing leakage of chemical pipelines, characterized in that, The method includes the following steps: Obtain the infrared image of the chemical pipeline; Divide the infrared image of the chemical pipeline into several windows equally, and merge the windows according to the difference in the gray value of the pixel points between adjacent windows to obtain the thermal radiation dispute area; According to the difference between the gray values of the pixel points in the thermal radiation dispute area, determine the membership parameter of the neighborhood pixel points of each pixel point in the thermal radiation dispute area for each pixel point, and several subordinate pixel points of each pixel point; According to the membership parameter corresponding to each pixel point of the subordinate pixel points of each pixel point in the thermal radiation dispute area, determine the membership voting score corresponding to each pixel point in the thermal radiation dispute area; according to the membership voting score corresponding to each pixel point in the thermal radiation dispute area, screen out several thermal extreme points from all pixel points in the thermal radiation dispute area; According to the membership parameter corresponding to each pixel point of the subordinate pixel points of the thermal extreme point and the pixel point gray value, determine the local abnormal temperature parameter corresponding to the thermal extreme point; Judge whether there is a leakage in the thermal radiation dispute area according to the local abnormal temperature parameters corresponding to all thermal extreme points in the thermal radiation dispute area.
2. The chemical pipeline leakage prevention safety detection method according to claim 1, characterized in that The step of dividing the infrared image of the chemical pipeline into several windows equally and merging the windows according to the difference in the gray value of the pixel points between adjacent windows to obtain the thermal radiation dispute area includes the following specific steps: Divide the infrared image of the chemical pipeline into several windows of size , being the preset side length. For the th window, calculate the grayscale mean of all pixel points within the window, denoted as the grayscale mean of the th window; Determine all thermal radiation dispute windows in the infrared image of the chemical pipeline according to the difference in the gray mean value between adjacent windows; Form a thermal radiation dispute area with adjacent thermal radiation dispute windows.
3. The safety detection method for preventing leakage of a chemical pipeline according to claim 2, wherein, The step of determining all thermal radiation dispute windows in the infrared image of the chemical pipeline according to the difference in the gray mean value between adjacent windows includes the following specific steps: For the th window, calculate the absolute value of the difference in the average gray value of each window adjacent to the th window and the th window. If there exists an absolute value of the difference in the average gray value of all windows adjacent to the th window and the th window that is greater than the first preset threshold , determine that the th window is a window with thermal radiation controversy.
4. The chemical pipeline leakage prevention safety detection method according to claim 1, characterized in that, The step of determining the membership parameter of the neighborhood pixel points of each pixel point in the thermal radiation dispute area for each pixel point, and several subordinate pixel points of each pixel point according to the difference between the gray values of the pixel points in the thermal radiation dispute area includes the following specific steps: For the th thermal radiation disputed area, calculate the difference between the gray value of the th pixel and the gray value of the th pixel within the eight-neighborhood of the th pixel, which is denoted as the first gray difference; Calculate the average gray value of the pixel points within the eight-neighborhood of the th pixel point, which is denoted as the first gray average value; For the th pixel in the eight-neighborhood of the th pixel, calculate the average gray value of the pixels in the eight-neighborhood of the th pixel, which is denoted as the first neighborhood gray average of the th pixel in the eight-neighborhood of the th pixel; For the th pixel, calculate the difference between the first gray - level mean value and the first - neighborhood gray - level mean value of the th pixel within the eight - neighborhood of the th pixel, and denote it as the membership degree of the th pixel within the eight - neighborhood of the th pixel with respect to the th pixel; Calculate the first preset selection weight Multiply it by the first grayscale difference, denoted as the first product, and calculate the second preset selection weight With the th pixel in the eight-neighborhood of the th pixel's membership degree to the th pixel, denoted as the second product, calculate the sum of the first product and the second product, denoted as the th pixel in the eight-neighborhood of the th pixel's membership parameter to the th pixel; For all the pixel points within the eight-neighborhood of the th pixel point with respect to the membership parameter of all pixel points within the eight-neighborhood of the th pixel point, select the pixel points within the eight-neighborhood of the th pixel point corresponding to the maximum membership parameter as the first subordinate pixel points of the th pixel point; According to the acquisition method of the first subordinate pixel of the th pixel, acquire the first subordinate pixel of pixel , and use it as the second subordinate pixel of the th pixel. Then, acquire the first subordinate pixel of pixel , and use it as the third subordinate pixel of the th pixel; and so on, to obtain several subordinate pixels of the th pixel. 5. The chemical pipeline anti-leakage safety detection method according to claim 1, characterized in that, The step of determining the membership voting score corresponding to each pixel point in the thermal radiation dispute area according to the membership parameter corresponding to each pixel point of the subordinate pixel points of each pixel point in the thermal radiation dispute area includes the following specific steps: For the th pixel, calculate the sum of the membership parameters of all the subordinate pixels of the th pixel with respect to the th pixel, denoted as the membership value of the th pixel. Calculate the product of the number of all subordinate pixels of the th pixel and the membership value of the th pixel, denoted as the membership voting score.
6. The chemical pipeline anti-leakage safety detection method according to claim 1, characterized in that, The step of screening out several thermal extreme points from all pixel points in the thermal radiation dispute area according to the membership voting score corresponding to each pixel point in the thermal radiation dispute area includes the following specific steps: For the th heat radiation dispute area, arrange the membership voting scores of all pixel points in descending order to obtain a pixel point membership voting score sequence; Take the floor value of one-tenth of the area of the th heat radiation disputed area and denote it as the proposed heat pole value of the th heat radiation disputed area ; For the pixel membership voting score sequence, select the first pixel points as the thermal poles of the th thermal radiation dispute area.
7. The safety detection method for preventing leakage of a chemical pipeline according to claim 1, wherein The step of determining the local abnormal temperature parameter corresponding to the thermal extreme point according to the membership parameter corresponding to each pixel point of the subordinate pixel points of the thermal extreme point and the pixel point gray value includes the following specific steps: For the th subordinate pixel, based on the membership parameters and pixel grayscale values of all subordinate pixels of the th thermal pole point, the within-category weight of the th subordinate pixel is obtained; For the th subordinate pixel of the th hot pole, calculate the product of the within-category weight of the th subordinate pixel and the pixel grayscale value of the th subordinate pixel, denoted as the temperature gradient of the th subordinate pixel; Calculate the difference between the grayscale value of the pixel of the th hot pole point and the temperature gradient, which is denoted as the grayscale value of the new pixel point of the th subordinate pixel point; According to the new pixel point gray value magnitudes of all subordinate pixel points of the th thermal extreme point, determine the local abnormal temperature parameter corresponding to the thermal extreme point.
8. The safety detection method for preventing leakage of a chemical pipeline according to claim 7, wherein, The membership parameters and pixel grayscale values of all subordinate pixel points according to the th thermal pole point are used to obtain the within-category weight of the th subordinate pixel point. The specific steps are as follows: Within the th heat radiation dispute area, for the th heat pole, calculate the mean value of the membership parameters of all subordinate pixels of the th heat pole with respect to the th heat pole, denoted as the first mean value. Calculate the ratio of the membership parameter of the th heat pole's th subordinate pixel to the th heat pole, denoted as the relative membership parameter; For the th hot pole, calculate the reciprocal of the Euclidean distance between the th hot pole and the th hot pole for the th subordinate pixel points, denoted as distance correlation; For the th subordinate pixel of the th hot pole, calculate the absolute value of the difference between the pixel gray value of the th subordinate pixel and the mean value of the gray values of the pixels within the eight-neighborhood of the th subordinate pixel, which is denoted as the second gray difference, and calculate the reciprocal of the second gray difference, which is denoted as the temperature uniformity index; For the th lower pixel of the th hot pole, calculate the product of the relative membership parameter, the distance correlation, and the temperature uniformity index, and denote it as the within-category weight of the th lower pixel.
9. The chemical pipeline leakage prevention safety detection method according to claim 7, wherein, The new pixel point gray value magnitudes of all subordinate pixel points according to the th hot pole are used to determine the local abnormal temperature parameter corresponding to the hot pole, and the specific steps included are as follows: For the th hot pole, calculate the D8 distance between all subordinate pixels of the th hot pole and the th hot pole; Obtain the maximum value Z of the D8 distances between all the subordinate pixel points of the a-th hot pole and the b-th hot pole, and construct a preset distance sequence ; Screen out all subordinate pixel points with the D8 distance being the first value in the preset distance sequence, denoted as target subordinate pixel points, calculate the variance of the temperature gradient of all target subordinate pixel points, denoted as the temperature variance of the first value in the preset distance sequence, and calculate the mean value of the pixel point gray values of all target subordinate pixel points, denoted as the gray mean value of the first value in the preset distance sequence; Calculate the sum of the temperature variances of all values within the preset distance sequence, denoted as the temperature distribution consistency index; The sum of the absolute values of the differences between the grayscale means of all adjacent values in the preset distance sequence is used as the reasonable index of temperature distribution; Calculate the ratio of the reasonable index of temperature distribution to the consistent index of temperature distribution, denoted as the first anomaly index, and use the inverse proportional normalization value of the first anomaly index as the local anomaly temperature parameter.
10. The safety detection method for preventing leakage of a chemical pipeline according to claim 1, characterized in that, Judging whether there is a leakage in the heat radiation dispute area according to the local abnormal temperature parameters corresponding to all the heat poles in the heat radiation dispute area, including the following specific steps: For the th heat radiation controversial area, calculate the normalized value of the mean of the local abnormal temperature parameters of all heat poles within the th heat radiation controversial area, and denote it as the pipeline leakage possibility of the th heat radiation controversial area; For all the regions of thermal radiation disputes, when the pipeline leakage possibility of the t-th region of thermal radiation dispute is greater than the second preset threshold it is determined that there is a pipeline leakage in the t-th region of thermal radiation dispute.
Citation Information
Patent Citations
Pipeline leakage detection method based on thermal infrared image
CN116823839A
Image enhancement method for ultrasonic imaging gas leakage detector
CN118333919A
Large-pipe-diameter air volume accurate measurement system based on AI and digital twinning
CN120030928A
Method for leakage detection of underground pipeline corridor based on dynamic infrared thermal image processing
US20190331301A1