Gas concentration detection method, device, electronic device and storage medium
By combining infrared imagers and voiceprint imagers to determine the target location of gas leaks and adjust the focal length, the problem of low detection accuracy of infrared imagers was solved, and high-precision detection of gas leakage concentration in oil pipelines was achieved.
Patent Information
- Application Number
- CN202410872954.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2044-07-01
AI Technical Summary
In the prior art, when infrared imagers are used to detect the concentration of gas leaks in oil pipelines, there is a problem of low accuracy, especially when the gas image occupies too small or too large an area in the infrared image, resulting in inaccurate detection.
Combining the information collection of the infrared imager and the voiceprint imager, the infrared image and voiceprint image are used to determine the target location of the gas leak, and the focal length of the infrared imager is adjusted. The infrared imager with the adjusted focal length is used to collect information and obtain a second infrared image to determine the gas leakage concentration.
The accuracy of gas leakage concentration detection is improved, ensuring that the gas image occupies an appropriate area in the infrared image, avoiding detection errors caused by the gas area in the image being too small or too large, and achieving higher detection accuracy.
Smart Images

Figure CN118794911B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of gas leakage monitoring, and in particular to a gas concentration detection method, device, electronic equipment and storage medium. Background Art
[0002] Gas leakage in oil pipelines may cause environmental pollution and safety risks. Currently, infrared imagers are installed in the area where the oil pipelines are located to collect information on the oil pipelines and obtain infrared images. Based on the infrared images, it is determined whether there is a gas leak in the oil pipeline and the concentration of the gas leakage.
[0003] However, it has been found in practice that the infrared images taken by infrared imagers are not accurate in detecting the concentration of gas leaks. Summary of the Invention
[0004] The embodiments of the present application disclose a gas concentration detection method, device, electronic device and storage medium to improve the accuracy of detecting gas leakage concentration in a pipeline to be detected.
[0005] The present invention discloses a method for detecting gas concentration, which includes:
[0006] Acquire a first infrared image obtained by collecting information of the pipeline to be inspected using an infrared imager, and a voiceprint image obtained by collecting information of the pipeline to be inspected using a voiceprint imager;
[0007] determining a target location where a gas leak occurs in the pipeline to be inspected based on the first infrared image and the voiceprint;
[0008] Adjusting the focal length of the infrared imager according to the target position;
[0009] The adjusted infrared imager is used to collect information about the target position of the pipeline to be inspected, thereby obtaining a second infrared image;
[0010] The gas leakage concentration corresponding to the target position is determined according to the second infrared image.
[0011] As an optional implementation manner, determining a target location where a gas leak occurs in the pipeline to be inspected based on the first infrared image and the voiceprint image includes:
[0012] determining a first location where a gas leak exists based on the first infrared image;
[0013] determining a second location where a gas leak exists based on the voiceprint;
[0014] If the distance difference between the first position and the second position is greater than or equal to a first preset distance threshold, the first position is regarded as a target position where a gas leak occurs;
[0015] If the distance difference is less than the first preset distance threshold, the first position is corrected using the second position to obtain a target position where a gas leak exists.
[0016] As an optional implementation manner, the using the second position to correct the first position to obtain a target position where the gas leak exists includes:
[0017] calculating position difference data between the first position and the second position;
[0018] Adjusting the position difference data using preset correction parameters to obtain adjusted position difference data;
[0019] A target position where a gas leak occurs is determined according to the first position and the adjusted position difference data.
[0020] As an optional implementation manner, the relative position of the infrared imager and the voiceprint imager remains unchanged, and the first position is the position data in the infrared coordinate system corresponding to the infrared imager;
[0021] Determining a second location where a gas leak exists based on the voiceprint includes:
[0022] determining, based on the voiceprint image, a third location where a gas leak exists in an acoustic coordinate system corresponding to the voiceprint imager;
[0023] The third position is transformed into a second position in the infrared coordinate system based on a preset transformation relationship, where the preset transformation relationship refers to a transformation relationship between the acoustic coordinate system and the infrared coordinate system.
[0024] As an optional implementation manner, before collecting information on the target position of the pipeline to be inspected by the adjusted infrared imager, the method further includes:
[0025] Determining position data of the infrared imager;
[0026] determining a target posture of the infrared imager based on the position data and the target position;
[0027] The posture of the infrared imager is adjusted to a target posture.
[0028] As an optional implementation manner, adjusting the focal length of the infrared imager according to the target position includes:
[0029] Determining position data of the infrared imager;
[0030] Determining a collection distance between the infrared imager and the target position based on the position data and the target position;
[0031] If the acquisition distance is greater than a second preset distance threshold, adjusting the focal length of the infrared imager to the first focal length;
[0032] If the acquisition distance is less than or equal to the second preset distance threshold, adjusting the focal length of the infrared imager to the second focal length;
[0033] Wherein, the first focal length is greater than the second focal length.
[0034] As an optional implementation manner, the infrared imager further includes a lens, an image sensor, and a driving device, and the method further includes:
[0035] Determining the target distance between the lens and the image sensor according to the acquisition distance and the target clarity;
[0036] The lens and / or the image sensor are controlled to move by the driving device so that the distance between the lens and the image sensor becomes the target distance.
[0037] The present application discloses a gas concentration detection device, comprising:
[0038] an acquisition module, configured to acquire a first infrared image obtained by an infrared imager through information collection of the pipeline to be inspected, and a voiceprint image obtained by a voiceprint imager through information collection of the pipeline to be inspected;
[0039] a first determining module, configured to determine a target location where a gas leak occurs in the pipeline to be detected based on the first infrared image and the voiceprint;
[0040] An adjustment module, configured to adjust the focal length of the infrared imager according to the target position;
[0041] An acquisition module is used to acquire information of a target position of the pipeline to be inspected by using the adjusted infrared imager to obtain a second infrared image;
[0042] The second determining module is configured to determine the gas leakage concentration corresponding to the target position according to the second infrared image.
[0043] An embodiment of the present application discloses an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor implements any one of the gas concentration detection methods disclosed in the embodiments of the present application.
[0044] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute any one of the gas concentration detection methods disclosed in the embodiment of the present application.
[0045] Compared with the related art, the embodiments of the present application have the following beneficial effects:
[0046] The embodiments of the present application disclose a gas concentration detection method, device, electronic device and storage medium, which obtain a first infrared image obtained by an infrared imager to collect information of a pipeline to be detected, and a voiceprint image obtained by a voiceprint imager to collect information of the pipeline to be detected. A target position where a gas leak occurs in the pipeline to be detected is determined based on the first infrared image and the voiceprint image, and the focal length of the infrared imager is adjusted based on the target position. The infrared imager with the adjusted focal length is used to collect information at the target position of the pipeline to be detected to obtain a second infrared image, and the gas leakage concentration corresponding to the target position is determined based on the second infrared image. The target position is first determined using the first infrared image captured by the infrared imager and the voiceprint image of the voiceprint imager, which can ensure the accuracy of the target position where the gas leak exists, thereby ensuring the reliability of the selected focal length. The infrared imager with the focal length adjusted is used to collect information on the target position of the pipeline to be inspected, and a second infrared image is obtained, so that the area occupied by the leaking gas at the target position in the second infrared image is appropriate, avoiding the phenomenon that the area of the leaking gas in the second infrared image is too small or the complete leaking gas image cannot be obtained. The gas leakage concentration determined based on the second infrared image has high accuracy, thereby improving the accuracy of detecting the gas leakage concentration of the pipeline to be inspected. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0048] Figure 1 This is an application scenario diagram of a gas concentration detection method disclosed in an embodiment of the present application;
[0049] Figure 2 This is a flow chart of a gas concentration detection method disclosed in an embodiment of the present application;
[0050] Figure 3 This is a schematic diagram of an infrared image disclosed in an embodiment of the present application;
[0051] Figure 4is a schematic diagram of another infrared image disclosed in an embodiment of the present application;
[0052] Figure 5 This is a flow chart of another gas concentration detection method disclosed in an embodiment of the present application;
[0053] Figure 6 This is a schematic structural diagram of a gas concentration detection device disclosed in an embodiment of the present application;
[0054] Figure 7 This is a structural diagram of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0056] It should be noted that the terms "including," "having," and any variations thereof in the embodiments and drawings of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to the process, method, product, or apparatus.
[0057] An oilfield refers to a specific area where crude oil is produced. Oilfields typically produce oilfield gas, which is typically transported to its destination, such as a liquefied petroleum gas storage and distribution station, via a pipeline system. The oil pipeline system, defined as the pipeline system used to transport crude oil and crude oil products, primarily consists of pipelines, transfer stations, and other ancillary equipment. It is a key component of the crude oil storage and transportation industry and the primary means of transporting crude oil and crude oil products. Compared to other land-based transportation methods, such as rail and road transportation, pipeline transportation offers advantages such as high capacity, enhanced containment, lower costs, and a higher safety factor.
[0058] However, gas leaks in oil pipelines can cause environmental pollution and safety risks. Currently, infrared imaging cameras are typically used to capture infrared images of oil pipeline systems. These images are then used to determine whether a gas leak exists in the pipeline. If a gas leak is confirmed, the gas leakage concentration is determined based on the captured infrared images. These captured infrared images include gas images corresponding to the leaking gas. If the gas image occupies too small or too large an area of the infrared image, the accuracy of the gas leakage concentration determined based on the infrared image will be low. The gas image area in the infrared image can refer to the ratio of the gas image area to the total area of the infrared image. For example, if the gas image proportion in the infrared image is too small, there will be too little valid information corresponding to the gas in the infrared image. Furthermore, due to the large proportion of background image, a high level of interference information is introduced, resulting in low accuracy in the gas leakage concentration determined based on the infrared image. For example, if the gas image proportion in the infrared image is too large, such as if the infrared image consists entirely of gas images, the inability to capture a complete image of the leaking gas may result in low accuracy in the gas leakage concentration determined based on the infrared image.
[0059] The present application discloses a gas concentration detection method, device, electronic device, and storage medium to improve the accuracy of detecting gas leakage concentration in a pipeline to be detected. Detailed descriptions are provided below.
[0060] Please refer to Figure 1 , which shows an application scenario diagram of the gas concentration detection method provided by the embodiment of the present application, such as Figure 1 As shown, the gas concentration detection system may include an infrared imager 110, a voiceprint imager 120, and an electronic device 130. The infrared imager 110 and the voiceprint imager 120 may be positioned in the area of the oil pipeline 140 where the pipeline to be inspected is located to collect information about the pipeline to be inspected, generating infrared images and voiceprint maps. It should be noted that the electronic device 130 may be in communication with the infrared imager 110 and the voiceprint imager 120, respectively. The infrared imager 110 converts infrared radiation emitted by an object into electrical signals, which are then amplified to produce infrared images. The voiceprint imager 120 operates based on the physical properties of sound waves, utilizing a series of high-precision MEMS (Micro-Electro-Mechanical System) digital microphone arrays to capture sound waves. The microphone array includes multiple microphones precisely arranged within the voiceprint imager 120 to enable sound waves to be received from different angles and positions.
[0061] Optionally, the gas concentration detection system may include multiple infrared imagers 110 and voiceprint imagers 120 corresponding to the multiple infrared imagers 110. For a longer oil pipeline 140, multiple infrared imagers 110 and multiple voiceprint imagers 120 may be set up to collect information from different pipelines to be inspected in the oil pipeline 140 respectively, so as to perform a comprehensive inspection of the entire oil pipeline 140.
[0062] Optionally, please continue to refer to Figure 1 The infrared imager 110 and the voiceprint imager 120 are coaxially arranged. Exemplarily, the gas concentration detection system further includes a mounting mechanism 150. The infrared imager 110 and the voiceprint imager 120 are mounted on a first surface of the mounting mechanism 150. The mounting mechanism 150 can rotate along the vertical axis z and the horizontal axis x to adjust the orientation of the infrared imager 110 and the voiceprint imager 120. The mounting mechanism 150 can also telescope along the vertical axis z to adjust the position of the infrared imager 110 and the voiceprint imager 120 along the vertical axis z. Since the infrared imager 110 and the voiceprint imager 120 are both mounted on the first surface of the mounting mechanism 150, the infrared imager 110 and the voiceprint imager 120 move with the movement of the mounting mechanism 150. That is, the infrared imager 110 is stationary relative to the voiceprint imager 120, and the relative position of the infrared imager 110 and the voiceprint imager 120 remains unchanged. Among them, the horizontal axis x and the vertical axis z are perpendicular to each other, and the relative posture includes relative position and relative posture.
[0063] Optionally, the infrared imager 110 may include a positioning device. This positioning device can be used to collect position data of the infrared imager 110. Optionally, the positioning device can be a GPS (Global Positioning System) positioning sensor, an RTK (Real-time kinematic) positioning sensor, or the like. RTK positioning sensors utilize carrier phase differential GPS technology to achieve real-time positioning. By utilizing differential correction and carrier phase ranging measurement methods, kinematic positioning can achieve centimeter-level accuracy.
[0064] Optionally, the infrared imager may further include a posture sensor, which may be used to detect the vertical angle of the optical axis of the infrared imager 110 relative to the horizontal plane, and may also be used to detect the horizontal angle of the optical axis of the infrared imager 110 relative to the vertical plane. Optionally, the posture sensor may include a tilt sensor.
[0065] Optionally, the electronic device 130 may further include a display screen. The electronic device 130 may obtain a first infrared image obtained by the infrared imager 110 through information collection of the pipeline to be inspected, and a voiceprint image obtained by the voiceprint imager 120 through information collection of the pipeline to be inspected. Based on the first infrared image and the voiceprint image, a target location of a gas leak in the pipeline to be inspected may be determined. Based on the target location, the focal length of the infrared imager 110 may be adjusted. The adjusted infrared imager 110 may be used to collect information at the target location of the pipeline to be inspected to obtain a second infrared image. Based on the second infrared image, the gas leakage concentration corresponding to the target location may be determined. The electronic device 130 may also display the target location and gas leakage concentration on the display screen so that the user can determine the status of the gas leakage.
[0066] Optionally, the gas concentration detection system includes equipment with a higher explosion-proof rating. For example, the infrared imager 110, the voiceprint imager 120, the positioning device, the posture sensor, and other equipment include explosion-proof circuits. The operating voltage and operating power of these devices are lower than the target threshold corresponding to the explosion-proof rating, meeting the safety requirements of the inspection and ensuring that the inspection data processing system can be used in cold environments. A cold environment may refer to an environment with a temperature of 0°C or less.
[0067] Please refer to Figure 2 , which shows a flow chart of a gas concentration detection method provided by an embodiment of the present application, which can be applied to Figure 1 An electronic device 130 is shown.
[0068] like Figure 2 As shown, the gas concentration detection method may include steps 202 to 210.
[0069] Step 202: Acquire a first infrared image obtained by collecting information of the pipeline to be inspected using an infrared imager, and a voiceprint image obtained by collecting information of the pipeline to be inspected using a voiceprint imager.
[0070] It should be noted that the pipeline to be inspected can be a complete oil pipeline or a portion of an oil pipeline. The first infrared image is an infrared image of the pipeline to be inspected acquired by the infrared imager. The infrared imager and the voiceprint imager can collect information according to preset rules, such as collecting information at preset intervals to obtain first infrared images and voiceprint patterns corresponding to each time. If the electronic device determines that a gas leak exists in the pipeline to be inspected based on the first infrared image and / or voiceprint image, it then determines the target location of the gas leak in the pipeline to be inspected based on the first infrared image and voiceprint pattern.
[0071] For example, the electronic device may be pre-installed with a leak identification model. The electronic device inputs the first infrared image and voiceprint into the leak identification model. If the leak model outputs a first recognition result, it is determined that a gas leak exists in the pipeline to be inspected. The leak identification model may output a first recognition result and a second recognition result. The first recognition result indicates that the first infrared image and voiceprint belong to a type where a gas leak exists, and the second recognition result indicates that the first infrared image and voiceprint do not exist. The leak identification model is trained using a sample image set. The sample image set may include multiple image pairs and corresponding types for each of the multiple image pairs. An image pair may include an infrared image and a voiceprint. An image pair captured using an infrared imager and a voiceprint imager on an oil pipeline without a gas leak corresponds to a type where a gas leak does not exist. An image pair captured using an infrared imager and a voiceprint imager on an oil pipeline with a gas leak corresponds to a type where a gas leak exists. In this embodiment, the leak identification model pre-stored in the electronic device can quickly and accurately determine whether a gas leak exists in the pipeline to be inspected.
[0072] Step 204 : determining a target location where a gas leak occurs in the pipeline to be inspected based on the first infrared image and the voiceprint.
[0073] It should be noted that the target location is the location of a gas leak in the pipeline to be inspected. Exemplarily, determining the target location of a gas leak in the pipeline to be inspected based on the first infrared image and the voiceprint may include: the electronic device determining a first location of a gas leak based on the first infrared image, determining a second location of a gas leak based on the voiceprint, and determining the target location of the gas leak based on the first and second locations. It should be noted that if the first and second locations indicate the same location, the target location of the gas leak may be determined to be either the first or second location.
[0074] Exemplarily, determining the target location of a gas leak based on the first and second locations may include: if the distance difference between the first and second locations is less than a first preset distance threshold, using the second location to correct the first location to obtain the target location of the gas leak. It should be noted that, given that the detection accuracy of infrared imagers is higher than that of voiceprint imagers, the first preset distance threshold is used to assess the rationality of the second location determined based on the voiceprint image captured by the voiceprint imager. If the distance difference between the first and second locations is less than the first preset distance threshold, the second location is considered rational and can be used to correct the first location. If the distance difference between the first and second locations is greater than or equal to the first preset distance threshold, the second location is considered unreasonable and cannot be used to correct the first location. Because both determining the first location using the first infrared image and determining the second location using the voiceprint image may contain errors, i.e., there may be errors between the first location and the location of the gas leak in the pipeline to be inspected, and between the second location and the location of the gas leak in the pipeline to be inspected, correcting the first location using the second location can yield a more accurate target location if the second location is rational.
[0075] Exemplarily, determining the target position where a gas leak exists in the pipeline to be detected based on the first infrared image and the voiceprint image may also include: if the distance difference between the first position and the second position is greater than or equal to a first preset distance threshold, then taking the first position as the target position where a gas leak exists.
[0076] For example, the first position may be (a1, b1, c1), the second position may be (a2, b2, c2), and the distance difference between the first position and the second position is
[0077]
[0078] Exemplarily, using the second position to correct the first position to obtain the target location where the gas leak exists may include: calculating a weighted average position data of the second position and the first position, and using the weighted average position data as the target location where the gas leak exists. Exemplarily, assuming that the first position can be (a1, b1, c1), the second position can be (a2, b2, c2), the weighting coefficient corresponding to the first position is e, and the weighting coefficient corresponding to the second position is f, then the target location can be (a1*e+a2*f, b1*e+b2*f, c1*e+c2*f), wherein the first position and the second position should be coordinate values in the same three-dimensional coordinate system to ensure the accuracy of the target location. The weighting coefficient corresponding to the first position can be greater than the weighting coefficient corresponding to the second position, and the sum of the weighting coefficients corresponding to the first position and the second position is 1. Optionally, the weighting coefficient corresponding to the first position ranges from 0.7 to 0.9, and the weighting coefficient corresponding to the second position ranges from 0.1 to 0.3. Optionally, the weighting coefficient corresponding to the first position is 0.7, and the weighting coefficient corresponding to the second position is 0.3, or the weighting coefficient corresponding to the first position is 0.8, and the weighting coefficient corresponding to the second position is 0.2, or the weighting coefficient corresponding to the first position is 0.9, and the weighting coefficient corresponding to the second position is 0.1.
[0079] Optionally, using the second position to correct the first position to obtain a target location where a gas leak exists may include: the electronic device calculates position difference data between the first position and the second position, adjusts the position difference data using a preset correction parameter to obtain adjusted position difference data, and determines the target location where a gas leak exists based on the first position and the adjusted position difference data. It should be noted that the position difference data may be three-dimensional coordinates, and the preset correction parameters may include multiple preset correction parameters, each of which corresponds one-to-one to the three coordinate axes of the three-dimensional coordinate system. The preset correction parameter may also include only one, that is, the preset correction parameter corresponding to each coordinate axis is consistent. The position difference data is used to represent a position intermediate between the first position and the second position. Based on the first position, the adjusted position difference data is moved to obtain the target position. For example, assuming the first position is (a1, b1, c1), the second position is (a2, b2, c2), the preset correction parameter corresponding to the first coordinate axis is g, the preset correction parameter corresponding to the second coordinate axis is h, and the preset correction parameter corresponding to the third coordinate axis is i, then the position difference data is (△x, △y, △z) = (a1-a2, b1-b2, c1-c2), and the target position is (a1+g△x, b1+h△y, c1+i△z). Among them, the preset correction parameter corresponding to the first coordinate axis, the preset correction parameter corresponding to the second coordinate axis, and the preset correction parameter corresponding to the third coordinate axis can be the same or different and can be set according to actual conditions.
[0080] It should be noted that the target position can be the position data in the infrared coordinate system of an infrared imager or the position data in the voiceprint coordinate system of a voiceprint imager. The infrared coordinate system refers to the three-dimensional coordinate system that describes the image of a real object in an infrared imager, and the voiceprint coordinate system refers to the three-dimensional coordinate system that describes the image of a real object in a voiceprint imager. The position data can be three-dimensional coordinates.
[0081] In an optional embodiment, the relative position of the infrared imager and the voiceprint imager remains unchanged, the first position is the position data in the infrared coordinate system corresponding to the infrared imager, and the target position is the position data in the infrared coordinate system corresponding to the infrared imager. Determining the second location of a gas leak based on the voiceprint image may include: determining a third location of a gas leak in the acoustic coordinate system corresponding to the voiceprint imager based on the voiceprint image, and transforming the third location into the second location in the infrared coordinate system based on a preset transformation relationship. The preset transformation relationship refers to the transformation relationship between the acoustic coordinate system and the infrared coordinate system. It should be noted that the voiceprint imager and the infrared imager are coaxially arranged, which can ensure that the positional relationship between the voiceprint imager and the infrared imager in space is fixed and known, and the relative posture of the infrared imager and the voiceprint imager remains unchanged, that is, the infrared imager is stationary relative to the voiceprint imager, and the transformation relationship between the acoustic coordinate system and the infrared coordinate system remains unchanged. The electronic device can store the preset transformation relationship. After determining that there is a third position where a gas leak exists in the acoustic coordinate system corresponding to the voiceprint imager, the second position in the infrared coordinate system can be obtained based on the preset transformation relationship, so as to facilitate the calculation of the distance difference between the first position and the second position, and to facilitate the use of the second position to correct the first position.
[0082] It can be understood that the second position is the position data in the acoustic coordinate system corresponding to the voiceprint imager, the target position can also be the position data in the acoustic coordinate system corresponding to the voiceprint imager, and the electronic device can also determine the fourth position where there is a gas leak in the infrared coordinate system corresponding to the infrared imager based on the first infrared image; based on the preset transformation relationship, the fourth position is transformed into the first position in the acoustic coordinate system.
[0083] Step 206: Adjust the focal length of the infrared imager according to the target position.
[0084] It should be noted that focal length refers to the sub-segments of a lens' focal length, which can be categorized as ultra-wide-angle, wide-angle, standard, medium-focus, medium-telephoto, telephoto, and ultra-telephoto. The focal length and magnification are directly proportional; that is, the longer the focal length, the greater the magnification. An increase in focal length indicates the need to capture objects farther away, and therefore requires a higher magnification to clearly capture these objects. Electronic devices can have a preset correspondence between position and focal length. Once a target location is determined, the electronic device can search for the focal length corresponding to the target location based on the target location and this correspondence, and control the infrared imager to adjust the focal length to the focal length corresponding to the target location, thereby capturing a second infrared image with an appropriate gas image area.
[0085] In an optional embodiment, adjusting the focal length of the infrared imager according to the target position may include: the electronic device determines the position data of the infrared imager, determines the acquisition distance between the infrared imager and the target position according to the position data and the target position, and if the acquisition distance is greater than the second preset distance threshold, adjusts the focal length of the infrared imager to the first focal length; if the acquisition distance is less than or equal to the second preset distance threshold, adjusts the focal length of the infrared imager to the second focal length. The first focal length is greater than the second focal length. It should be noted that the acquisition distance refers to the distance between the infrared imager and the target position. The electronic device can obtain the positioning device of the infrared imager for positioning and collect the position data. When the position of the infrared imager is fixed, the position data of the infrared imager can be stored in the electronic device, and when the acquisition distance needs to be determined, the electronic device obtains the position data of the infrared imager from the memory. The position data of the infrared imager can be three-dimensional coordinates. Different focal lengths should be used depending on the distance of the infrared imager so that the proportion of the gas image in the second infrared image obtained by the adjusted infrared imager is appropriate. For example, Figure 3 As shown, when the acquisition distance is greater than the second preset distance threshold, if the focal length of the infrared imager is adjusted to the second focal length, the gas image 320 of the acquired second infrared image 310 is smaller in area. Figure 4 As shown, when the acquisition distance is greater than the second preset distance threshold, if the focal length of the infrared imager is adjusted to the first focal length, since the first focal length is greater than the second focal length, the magnification is increased, and the area of the gas image 420 in the acquired second infrared image 410 is appropriate. Optionally, if the ratio of the area of the gas image to the total area of the second infrared image is between 60% and 80%, the area of the gas image 420 in the second infrared image 410 can be considered appropriate.
[0086] Optionally, the infrared imager has multiple lenses, which may include a first lens and a second lens, wherein the focal length of the first lens is a first focal length, and the focal length of the second lens is a second focal length. If the acquisition distance is greater than a preset distance threshold, the lens of the infrared imager is switched to the first lens, and information about the target position of the pipeline to be inspected is acquired through the first lens to obtain a second infrared image. If the acquisition distance is less than or equal to the preset distance threshold, the lens of the infrared imager is switched to the second lens, and information about the target position of the pipeline to be inspected is acquired through the second lens to obtain a second infrared image.
[0087] It is understandable that the number of adjustable focal lengths of the infrared imager may be greater than 2, and the number of lenses included in the infrared imager may be greater than 2, so that the information collection range of the infrared imager is wider.
[0088] In an optional embodiment, the infrared imager may include a drive device, a lens, and an image sensor. The drive device may be connected to the lens and / or image sensor to drive the lens and / or image sensor to move and adjust the distance between the lens and the image sensor. The gas concentration detection method may further include: the electronic device determines a target distance between the lens and the image sensor based on the acquisition distance and target clarity, and controls the movement of the lens and / or image sensor via the drive device so that the distance between the lens and the image sensor reaches the target distance, so that the gas image in the acquired second infrared image meets the required clarity. It should be noted that the target clarity can be set according to actual conditions and is not limited in this embodiment. By controlling the drive device to change the distance between the lens and the image sensor of the infrared imager, the image of the leaked gas at the target location is clear, achieving the target clarity, and achieving focus. In this embodiment, the electronic device determines a target distance based on the acquisition distance and the target clarity that allows the image of the leaked gas to reach the target clarity, and adjusts the distance between the lens and the image sensor to the target distance so that the clarity of the gas image in the second infrared image reaches the target clarity, thereby ensuring the accuracy of determining the gas leakage concentration based on the second infrared image. Optionally, the image sensor may include a CCD (Charge Coupled Device). Optionally, the lens may include an OIS (Optical Image Stabilization) lens, and the driving device may include a motor that can be connected to the lens and / or the image sensor to drive the lens and / or the image sensor to move, thereby adjusting the distance between the lens and the image sensor so that the clarity of the leaking gas at the target location reaches a target clarity.
[0089] Step 208 : Capture the target position of the pipeline to be inspected by the adjusted infrared imager to obtain a second infrared image.
[0090] It should be noted that, when the focal length is determined, the infrared imager is controlled to capture a target location in the pipeline to be inspected, obtaining a second infrared image so that the gas image in the second infrared image has an appropriate area. The electronic device may also detect whether the area of the gas image in the second infrared image is appropriate. If so, the gas leakage concentration corresponding to the target location is determined based on the second infrared image. If not, the focal length of the infrared imager may be further adjusted to obtain a second infrared image with an appropriate gas image area.
[0091] Step 210: Determine the gas leakage concentration corresponding to the target position according to the second infrared image.
[0092] It should be noted that leaked gas at the target location absorbs thermal radiation, causing the temperature of the gas image and the background image in the infrared image captured by the infrared imager to differ. Based on the temperature corresponding to the gas image and the background image, the concentration of the gas leak can be detected based on the Lambert-Beer law. The Lambert-Beer law is a fundamental law of spectrophotometry, describing the relationship between the absorption strength of a light-absorbing substance at a certain wavelength and the concentration of the light-absorbing substance and the thickness of its liquid layer.
[0093] Exemplarily, determining the gas leakage concentration at the target location based on the second infrared image may include: performing image segmentation on the second infrared image by an electronic device to obtain a background image and a gas image; determining, based on the second infrared image, a background temperature corresponding to the background image and a gas temperature corresponding to the gas image; determining, based on the background temperature and the gas temperature, a gas transmittance corresponding to the gas image; and determining the gas leakage concentration at the target location based on the gas transmittance and the absorptivity of the leaking gas. It should be noted that since the type of gas transported by the oil pipeline is known, the absorptivity of the leaking gas can be determined based on the gas type.
[0094] It should be noted that due to gas diffusion, the temperatures of each gas sub-image in a gas image may vary. Therefore, the gas image can be divided into multiple gas sub-images. The gas transmittance corresponding to each gas sub-image is determined based on the background temperature and the gas temperature of each gas sub-image. The gas leakage concentration corresponding to each gas sub-image is then determined based on the corresponding gas transmittance and the absorptivity of the leaking gas. The gas leakage concentration corresponding to each gas sub-image is multiplied by the area of each gas sub-image to obtain the total sub-image concentration corresponding to each gas sub-image. The total sub-image concentrations corresponding to each gas sub-image are then added together to obtain the total concentration corresponding to the leaking gas. This total concentration is then divided by the area of the gas image to obtain the average gas concentration of the leaking gas, which is used as the gas leakage concentration corresponding to the target location. Alternatively, the gas image can be divided into a 5*5 pixel format to obtain multiple gas sub-images. According to this solution, if the acquired infrared images are all gas images, that is, there is no background image, it is impossible to determine the gas concentration based on the Lambert-Beer law.
[0095] Exemplarily, determining the gas transmittance corresponding to each gas sub-image based on the gas temperature and background temperature of each gas sub-image may include: calculating the background wavelength of maximum radiation corresponding to the background temperature and the temperature wavelength of maximum radiation corresponding to the gas temperature based on Wien's law; calculating the background emissivity corresponding to the background wavelength and the gas emissivity corresponding to the gas wavelength based on Planck's blackbody radiation law; calculating the difference between the background emissivity and the gas emissivity to obtain a first radiation difference; determining a second radiation difference between the gas and the background received by the image sensor based on the gas temperature and background temperature in the infrared image; and calculating the ratio of the second radiation difference to the first radiation difference to obtain the gas transmittance corresponding to each gas sub-image.
[0096] For example, Wien's law is λ*T=b, so λ=b / T, and the background temperature T 背景 Substituting λ = b / T, we get the background wavelength λ 背景 , the gas temperature T 气体 Substituting λ = b / T, we get the gas wavelength λ 气体 Where b is the Wien constant, b = 0.002897 m·K.
[0097] For example, Planck's blackbody radiation law is formulated as Where h is Planck's constant, c is the speed of light, and k is the Boltzmann constant. 背景 and background temperature T 背景 Substituting into Planck's blackbody radiation law formula, the background radiation rate B is calculated 背景 , the gas wavelength λ 气体 and the gas temperature T 气体Substituting into Planck's blackbody radiation law formula, the background radiation rate B is calculated 气体 .
[0098] Optionally, determining the second radiation difference between the gas and the background received by the image sensor based on the gas temperature and the background temperature in the infrared image may include: calculating the temperature difference between the gas temperature and the background temperature, obtaining the wavelength difference based on Wien's law and the temperature difference, and obtaining the second radiation difference based on the wavelength difference, the temperature difference, and Planck's blackbody radiation law. For example, the temperature difference ΔT=T 气体 -T 背景 , Substitute △T into λ = b / T, and get the wavelength difference △λ = b / △T. Substitute △T and △λ into Planck's blackbody radiation law formula to get the second radiation difference.
[0099] For example, the calculation formula of gas permeability can be τ 气体 =exp(-a 气体 *c 气体 ), where τ 气体 is the gas permeability, a 气体 is the gas absorption rate, c 气体 is the gas concentration. According to the calculation formula of the gas permeability, the calculated gas permeability and the gas absorption rate obtained by looking up the table, the gas leakage concentration corresponding to each gas sub-image can be calculated.
[0100] In an embodiment of the present application, when the electronic device determines that there is a gas leak in the pipeline to be inspected, it jointly determines the target position based on the voiceprint image and the first infrared image, thereby ensuring the accuracy of the target position determined to have a gas leak, and further ensuring the accuracy of the focal length of the infrared imager determined based on the target position, ensuring that the infrared imager adjusted by the focal length can obtain a second infrared image with a suitable area occupied by the gas image, avoiding the phenomenon that the area of the leaked gas in the second infrared image is too small or the complete leaked gas image cannot be obtained. The gas leakage concentration determined based on the second infrared image has high accuracy, which improves the accuracy of detecting the gas leakage concentration in the pipeline to be inspected.
[0101] Please refer to Figure 5 , which shows a flow chart of another gas concentration detection method provided in an embodiment of the present application, which can be applied to electronic equipment.
[0102] like Figure 5 As shown, the gas concentration detection method may include steps 502 to 516.
[0103] Step 502: Acquire a first infrared image obtained by collecting information of the pipeline to be inspected using an infrared imager, and a voiceprint image obtained by collecting information of the pipeline to be inspected using a voiceprint imager.
[0104] Step 504 : determining a target location where a gas leak exists in the pipeline to be inspected based on the first infrared image and the voiceprint image.
[0105] Step 506: Adjust the focal length of the infrared imager according to the target position.
[0106] For the description of steps 502 to 506 , please refer to the description of steps 202 to 206 in the above embodiment, which will not be repeated here.
[0107] Step 508: Determine the position data of the infrared imager.
[0108] It should be noted that the electronic device can obtain positioning data from the infrared imager's positioning device. If the infrared imager is fixed, the infrared imager's position data can be stored in the electronic device. When the collection distance needs to be determined, the electronic device can retrieve the infrared imager's position data from the memory. The infrared imager's position data can be three-dimensional coordinates.
[0109] Step 510: Determine the target posture of the infrared imager based on the position data and the target position.
[0110] It should be noted that the target posture may include a target vertical angle and a target horizontal angle. The position data of the infrared imager and the target position may both be three-dimensional coordinates. If the optical axis of the infrared imager is parallel to the line connecting the infrared imager and the target position, the infrared imager is considered to be aligned with the target position, ensuring that the captured infrared image will not be distorted or inaccurate. The electronic device can determine, based on the position data and the target position, a first angle between the line connecting the position data and the target position and the horizontal plane, and a second angle between the line connecting the position data and the target position and the vertical plane, use the first angle as the target vertical angle, use the second angle as the target horizontal angle, adjust the vertical angle of the infrared imager to the target vertical angle, and adjust the horizontal angle of the infrared imager to the target horizontal angle, so that the infrared imager is aligned with the target position.
[0111] Step 512: Adjust the posture of the infrared imager to the target posture.
[0112] Optionally, the infrared imager may also include a posture sensor. The electronic device can determine whether the posture of the infrared imager is the target posture based on the horizontal angle and vertical angle collected by the posture sensor. If so, the adjustment is stopped; if not, the movement of the mounting mechanism is continued to adjust the posture of the infrared imager.
[0113] Step 514 : collect information about the target position of the pipeline to be inspected by using the adjusted infrared imager to obtain a second infrared image.
[0114] Step 516: Determine the gas leakage concentration corresponding to the target position according to the second infrared image.
[0115] For the description of steps 514 to 516 , please refer to the description of steps 208 to 210 in the above embodiment, which will not be repeated here.
[0116] In this embodiment, before using the adjusted infrared imager to collect information on the target position of the pipeline to be inspected, the target posture of the infrared imager is determined based on the infrared imager position data and the target position, and the posture of the infrared imager is adjusted to the target posture so that the infrared imager is aligned with the target position to avoid distortion or inaccuracy of the image collected by the infrared imager. When the infrared imager is facing the leakage position, its focal length and field of view can be optimized to ensure the accuracy of the gas leakage concentration determined based on the second infrared image.
[0117] See also Figure 6 , Figure 6 This is a schematic diagram of the structure of a gas concentration detection device disclosed in an embodiment of the present application. The device can be used for Figure 1 The electronic device 130 is shown. Figure 6 As shown, the gas concentration detection device 600 may include an acquisition module 610, a first determination module 620, an adjustment module 630, a collection module 640, and a second determination module 650. The acquisition module 610 is configured to acquire a first infrared image obtained by an infrared imager collecting information about the pipeline to be detected, and a voiceprint image obtained by a voiceprint imager collecting information about the pipeline to be detected. The first determination module 620 is configured to determine a target location in the pipeline to be detected where a gas leak exists based on the first infrared image and the voiceprint image. The adjustment module 630 is configured to adjust the focal length of the infrared imager based on the target location. The collection module 640 is configured to collect information about the target location in the pipeline to be detected using the adjusted infrared imager to obtain a second infrared image. The second determination module 650 is configured to determine the gas leakage concentration corresponding to the target location based on the second infrared image.
[0118] In an optional embodiment, the first determination module 620 may include a first determination unit, a second determination unit, a third determination unit, and a correction unit. The first determination unit is configured to determine a first location where a gas leak exists based on the first infrared image. The second determination unit is configured to determine a second location where a gas leak exists based on the voiceprint. The third determination unit is configured to determine the first location as a target location where a gas leak exists if the distance difference between the first location and the second location is greater than or equal to a first preset distance threshold. The correction unit is configured to correct the first location using the second location to obtain the target location where a gas leak exists if the distance difference is less than the first preset distance threshold.
[0119] In an optional embodiment, the correction unit may include a calculation subunit, an adjustment subunit, and a first determination subunit. The calculation subunit is configured to calculate position difference data between the first position and the second position. The adjustment subunit is configured to adjust the position difference data using a preset correction parameter to obtain adjusted position difference data. The first determination subunit is configured to determine a target location where a gas leak exists based on the first position and the adjusted position difference data.
[0120] In an optional embodiment, the relative positions of the infrared imager and the voiceprint imager remain unchanged, and the first position is position data in the infrared coordinate system corresponding to the infrared imager. The second determination unit includes a second determination subunit and a transformation subunit. The second determination subunit is configured to determine, based on the voiceprint image, a third position where a gas leak occurs in the acoustic coordinate system corresponding to the voiceprint imager. The transformation subunit is configured to transform the third position into a second position in the infrared coordinate system based on a preset transformation relationship, where the preset transformation relationship refers to the transformation relationship between the acoustic coordinate system and the infrared coordinate system.
[0121] In an optional embodiment, the gas concentration detection device 600 may further include a third determination module, a fourth determination module, and a posture adjustment module. The third determination module is configured to determine the position data of the infrared imager before the adjusted infrared imager collects information about the target position of the pipeline to be inspected. The fourth determination module is configured to determine the target posture of the infrared imager based on the position data and the target position. The posture adjustment module is configured to adjust the posture of the infrared imager to the target posture.
[0122] In an optional embodiment, the adjustment module 630 includes a fourth determination unit, a fifth determination unit, a first adjustment unit, and a second adjustment unit. The fourth determination unit is used to determine the position data of the infrared imager. The fifth determination unit is used to determine the acquisition distance between the infrared imager and the target position based on the position data and the target position. The first adjustment unit is used to adjust the focal length of the infrared imager to a first focal length if the acquisition distance is greater than a second preset distance threshold. The second adjustment unit is used to adjust the focal length of the infrared imager to a second focal length if the acquisition distance is less than or equal to the second preset distance threshold. The first focal length is greater than the second focal length.
[0123] In an optional embodiment, the infrared imager further includes a lens, an image sensor, and a drive device. The gas concentration detection device 600 may further include a fifth determination module and a control module. The fifth determination module is configured to determine a target distance between the lens and the image sensor based on the acquisition distance and target clarity. The control module is configured to control the movement of the lens and / or image sensor via the drive device so that the distance between the lens and the image sensor is the target distance.
[0124] See also Figure 7 , Figure 7 This is a structural diagram of an electronic device disclosed in an embodiment of the present application.
[0125] like Figure 7 As shown, the electronic device 700 may include:
[0126] A memory 710 storing executable program code;
[0127] a processor 720 coupled to the memory 710;
[0128] The processor 720 calls the executable program code stored in the memory 710 to execute any one of the gas concentration detection methods disclosed in the embodiments of the present application.
[0129] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by the processor, the processor implements any one of the gas concentration detection methods disclosed in the embodiment of the present application.
[0130] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required for the present application.
[0131] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0132] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one place or distributed across multiple network units. Some or all of these units may be selected based on actual needs to achieve the objectives of this embodiment.
[0133] In addition, the functional units in the embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0134] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a memory and includes several requests for a computer device (which can be a personal computer, server or network device, etc., specifically a processor in a computer device) to execute some or all of the steps of the above-mentioned methods of various embodiments of the present application.
[0135] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.
[0136] The above is a detailed introduction to a gas concentration detection method, device, electronic device, and storage medium disclosed in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core concept of the present application. At the same time, for those skilled in the art, based on the concept of the present application, there may be changes in the specific implementation methods and application scope. In summary, the contents of this specification should not be understood as limiting the present application.
Claims
1. A gas concentration detection method, characterized in that: The method comprises: Acquire a first infrared image obtained by collecting information of the pipeline to be inspected using an infrared imager, and a voiceprint image obtained by collecting information of the pipeline to be inspected using a voiceprint imager; determining a target location where a gas leak occurs in the pipeline to be inspected based on the first infrared image and the voiceprint; Adjusting the focal length of the infrared imager according to the target position; The adjusted infrared imager is used to collect information about the target position of the pipeline to be inspected, thereby obtaining a second infrared image; The gas leakage concentration corresponding to the target position is determined according to the second infrared image.
2. The method according to claim 1, characterized in that The determining, based on the first infrared image and the voiceprint, a target location where a gas leak occurs in the pipeline to be detected includes: determining a first location where a gas leak exists based on the first infrared image; determining a second location where a gas leak exists based on the voiceprint; If the distance difference between the first position and the second position is greater than or equal to a first preset distance threshold, the first position is regarded as a target position where a gas leak occurs; If the distance difference is less than the first preset distance threshold, the first position is corrected using the second position to obtain a target position where a gas leak exists.
3. The method according to claim 2, characterized in that The method of correcting the first position by using the second position to obtain a target position where the gas leak occurs includes: calculating position difference data between the first position and the second position; Adjusting the position difference data using preset correction parameters to obtain adjusted position difference data; A target position where a gas leak occurs is determined according to the first position and the adjusted position difference data.
4. The method according to claim 2, characterized in that The relative position of the infrared imager and the voiceprint imager remains unchanged, and the first position is the position data in the infrared coordinate system corresponding to the infrared imager; Determining a second location where a gas leak exists based on the voiceprint includes: determining, based on the voiceprint image, a third location where a gas leak exists in an acoustic coordinate system corresponding to the voiceprint imager; The third position is transformed into a second position in the infrared coordinate system based on a preset transformation relationship, where the preset transformation relationship refers to a transformation relationship between the acoustic coordinate system and the infrared coordinate system.
5. The method according to claim 1, wherein Before collecting information about the target position of the pipeline to be inspected by the adjusted infrared imager, the method further includes: Determining position data of the infrared imager; determining a target posture of the infrared imager based on the position data and the target position; The posture of the infrared imager is adjusted to a target posture.
6. The method according to claim 1, characterized in that The step of adjusting the focal length of the infrared imager according to the target position includes: Determining position data of the infrared imager; Determining a collection distance between the infrared imager and the target position based on the position data and the target position; If the acquisition distance is greater than a second preset distance threshold, adjusting the focal length of the infrared imager to the first focal length; If the acquisition distance is less than or equal to the second preset distance threshold, adjusting the focal length of the infrared imager to the second focal length; Wherein, the first focal length is greater than the second focal length.
7. The method according to claim 6, characterized in that The infrared imager further includes a lens, an image sensor, and a driving device, and the method further includes: Determining the target distance between the lens and the image sensor according to the acquisition distance and the target clarity; The lens and / or the image sensor are controlled to move by the driving device so that the distance between the lens and the image sensor becomes the target distance.
8. A gas concentration detection device, characterized in that: The device comprises: an acquisition module, configured to acquire a first infrared image obtained by an infrared imager through information collection of the pipeline to be inspected, and a voiceprint image obtained by a voiceprint imager through information collection of the pipeline to be inspected; a first determining module, configured to determine a target location where a gas leak occurs in the pipeline to be detected based on the first infrared image and the voiceprint; An adjustment module, configured to adjust the focal length of the infrared imager according to the target position; An acquisition module is used to acquire information of a target position of the pipeline to be inspected by using the adjusted infrared imager to obtain a second infrared image; The second determining module is configured to determine the gas leakage concentration corresponding to the target position according to the second infrared image.
9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Gas leakage concentration quantitative detection device and method based on infrared thermal imaging technology
CN111562056A
Gas leakage detection method and device, electronic equipment and storage medium
CN118096634A