Pipeline visual inspection system and method
By using multiple camera mechanisms and vision detectors in the pipeline vision detection system, combined with laser ranging sensors and image calibration devices, the problem of not being able to take high-definition pipe inner wall images under dynamic conditions is solved, and the detection effect of high-definition full-circumferential inner wall images is achieved.
Patent Information
- Application Number
- CN202510171172.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-05-13
AI Technical Summary
The prior art is unable to take high-definition images of the inner wall of the pipe under dynamic conditions, resulting in poor detection results.
By adopting multiple imaging mechanisms and vision detectors, the imaging mechanism is controlled to capture the inner wall image of the pipe by acquiring the target position and determining the target focus parameters, and the offset state of the imaging mechanism is adjusted through a laser ranging sensor and an image calibration device to improve image clarity.
It realizes taking high definition and complete images of the inner wall of the pipe under dynamic conditions, and solves the problem of unclear images in the prior art.
Smart Images

Figure CN119985537A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of oil and gas pipelines, and in particular to a pipeline visual inspection system and method. Background Art
[0002] Oil and gas pipelines (referred to as pipelines) are important infrastructure for energy transportation. During the construction period, the quality of the pipeline is directly related to its long-term reliability and safety. Therefore, it is crucial to inspect the pipeline during the construction period.
[0003] At present, visual inspection technology is usually used to inspect pipelines during the construction period. That is, the camera is equipped with an autonomous power running detector to move in the pipeline and take images of the inner wall of the pipeline without stopping. Then, defects are identified in the image of the inner wall of the pipeline to achieve pipeline inspection. However, the existing technology uses a fixed focus method to capture the image of the inner wall of the pipeline to be inspected. Since the relative position of the detector changes during the movement of the pipeline to be inspected, the focusing effect of the camera is poor, and the image of the inner wall of the pipeline taken by it is not clear.
[0004] Therefore, the prior art is unable to capture high-definition images of the inner wall of the pipeline under dynamic conditions. Summary of the invention
[0005] The purpose of the present application is to provide a pipeline visual inspection system and method, aiming to solve the problem that the prior art cannot capture high-definition images of the inner wall of the pipeline under dynamic conditions.
[0006] In order to achieve the above objectives, this application adopts the following technical solutions:
[0007] In a first aspect, a pipeline visual inspection system is provided, comprising: a plurality of camera mechanisms and a visual detector; the visual detector is used to obtain a target position of the camera mechanism in the pipeline to be inspected, and determine a target focus parameter of the camera mechanism according to the target position; the visual detector is also used to control the camera mechanism to capture an inner wall image of the pipeline to be inspected based on the target focus parameter; different camera mechanisms are used to capture inner wall images of the pipeline to be inspected at different angles; the visual detector is also used to obtain the inner wall images captured by the camera mechanism, and to splice a full circumferential inner wall image of the pipeline to be inspected according to the inner wall images captured by the camera mechanism.
[0008] In some embodiments, when the visual detector determines the target focus parameters of the camera mechanism based on the target position, it is specifically used to: solve the target offset state of the camera mechanism based on the target position; determine the target focus parameters of the camera mechanism based on the target offset state and a parameter calibration table; the parameter calibration table includes a comparison relationship between the target offset state and the target focus parameters.
[0009] In some embodiments, the pipeline visual inspection system also includes: an image calibration device; a camera mechanism is installed on the image calibration device; the image calibration device is used to carry the camera mechanism and move it in the pipeline to be inspected according to a preset offset distance and a preset offset angle to adjust the offset state of the camera mechanism; when the clarity of the reference image taken by the camera mechanism is lower than the clarity threshold, the camera mechanism is controlled to focus to determine the focus parameters of the camera mechanism; the above operations are repeated to obtain a parameter calibration table; the parameter calibration table includes a plurality of sets of comparison relationships between offset states and focus parameters; the plurality of sets of comparison relationships between offset states and focus parameters include a comparison relationship between a target offset state and a target focus parameter.
[0010] In some embodiments, the camera mechanism carries orthogonally arranged laser ranging sensors; when the visual detector obtains the target position of the camera mechanism in the pipeline to be inspected, it is specifically used to: obtain the horizontal position and vertical position of the camera mechanism in the pipeline to be inspected based on the laser ranging sensor; determine the target position according to the horizontal position and the vertical position.
[0011] In some embodiments, the camera mechanism includes: a lens assembly and a camera body; the lens assembly is used to calibrate the target focus parameters of the camera body; the camera body is used to capture the inner wall image at a corresponding angle of the camera mechanism based on the target focus parameters.
[0012] In some embodiments, the pipeline visual inspection system further includes: a storage device and a power supply; the storage device is used to store the inner wall images taken by the camera mechanism; the power supply is used to supply power to the storage device, the visual detector and the camera mechanism.
[0013] In a second aspect, a pipeline visual inspection method is provided, which is applied to a visual detector in a pipeline visual inspection system as in any one of the first aspects, the method comprising: obtaining a target position of a camera mechanism in the pipeline to be inspected, and determining a target focus parameter of the camera mechanism according to the target position; controlling the camera mechanism to capture an inner wall image of the pipeline to be inspected based on the target focus parameter; obtaining an inner wall image captured by the camera mechanism, and splicing a full circumferential inner wall image of the pipeline to be inspected according to the inner wall image captured by the camera mechanism.
[0014] In some embodiments, obtaining the target position of the camera mechanism in the pipeline to be inspected includes: obtaining the horizontal position and the vertical position of the camera mechanism in the pipeline to be inspected; and determining the target position according to the horizontal position and the vertical position.
[0015] In some embodiments, determining the target focus parameters of the camera mechanism according to the target position includes: solving the target offset state of the camera mechanism according to the target position; determining the target focus parameters of the camera mechanism according to the target offset state and a parameter calibration table; the parameter calibration table includes a comparison relationship between the target offset state and the target focus parameters.
[0016] In some embodiments, the target offset state includes a target offset distance and a target offset angle, and the target focus parameters of the camera mechanism are determined according to the target offset state and a parameter calibration table, including: when the target offset state meets a preset condition, the target focus parameters of the camera mechanism are determined according to the target offset state and the parameter calibration table; the preset condition includes: the target offset distance is greater than an offset distance threshold, or the target offset angle is greater than an offset angle threshold.
[0017] In some embodiments, the pipeline visual inspection method further includes: obtaining a moving speed of the camera mechanism in the pipeline to be inspected; and determining a shooting frequency of the camera mechanism for capturing images of the inner wall of the pipeline to be inspected according to the moving speed.
[0018] In a third aspect, a pipeline visual inspection device is provided, comprising a memory and a processor; the memory is used to store computer execution instructions, and the processor is connected to the memory through a bus; when the pipeline visual inspection device is running, the processor executes the computer execution instructions stored in the memory, so that the pipeline visual inspection device performs the pipeline visual inspection method of the second aspect.
[0019] The pipeline visual inspection device may be an electronic device, or a part of an electronic device, such as a chip system in an electronic device. The chip system is used to support the electronic device to implement the functions involved in the first aspect and any possible implementation thereof, for example, to obtain and determine the data and / or information involved in the above pipeline visual inspection method. The chip system includes a chip, and may also include other discrete devices or circuit structures.
[0020] In a fourth aspect, a computer-readable storage medium is provided, the computer-readable storage medium comprising computer execution instructions, and when the computer execution instructions are run on a computer, the computer executes the pipeline visual inspection method described in the second aspect.
[0021] In a fifth aspect, a computer program product is also provided, which includes a computer program or instructions. When the computer instructions are run on a pipeline visual inspection device, the pipeline visual inspection device executes the pipeline visual inspection method as described in the second aspect above.
[0022] It should be noted that the above-mentioned computer instructions may be stored in whole or in part on a computer-readable storage medium. The computer-readable storage medium may be packaged together with the processor of the pipeline visual inspection device, or may be packaged separately from the processor of the pipeline visual inspection device, which is not limited in the embodiments of the present application.
[0023] The description of the third, fourth and fifth aspects of the present application can refer to the detailed description of the first and second aspects.
[0024] In the embodiments of the present application, the name of the above pipeline visual inspection device does not limit the device or functional module itself. In actual implementation, these devices or functional modules may appear with other names. For example, the receiving unit may also be called a receiving module, a receiver, etc. As long as the functions of each device or functional module are similar to those of the present application, they fall within the scope of the claims of the present application and their equivalent technologies.
[0025] As can be seen from the above, the pipeline visual inspection system provided by the present application includes several camera mechanisms and visual detectors. Among them, the visual detector can be used to obtain the target position of the camera mechanism in the pipeline to be inspected, determine the target focus parameters of the camera mechanism according to the target position, and control the camera mechanism to capture the inner wall image of the pipeline to be inspected based on the target focus parameters. In this way, the visual detector can update the target focus parameters of the camera mechanism according to the target position of the camera mechanism in the pipeline to be inspected, so that the camera mechanism can capture the pipeline to be inspected based on the target focus parameters. The image clarity of the inner wall image captured by the camera mechanism is higher. In the pipeline visual inspection system, different camera mechanisms are used to capture the inner wall images of the pipeline to be inspected at different angles. The visual detector can obtain the inner wall images captured by the camera mechanism, and splice the full circumference inner wall image of the pipeline to be inspected based on the inner wall images captured by the camera mechanism. In this way, the present application can obtain a high-definition and complete image of the inner wall of the pipeline. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. 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 paying any creative work.
[0027] Figure 1 A schematic diagram of the structure of a pipeline visual inspection system provided in an embodiment of the present application;
[0028] Figure 2 A schematic diagram of the structure of an image calibration device for installing a camera mechanism provided in an embodiment of the present application;
[0029] Figure 3 A schematic diagram of a hardware structure of a communication device provided in an embodiment of the present application;
[0030] Figure 4 A schematic diagram of a pipeline visual inspection method provided in an embodiment of the present application;
[0031] Figure 5 A schematic diagram of a flow chart of another pipeline visual inspection method provided in an embodiment of the present application;
[0032] Figure 6 A schematic diagram of a flow chart of another pipeline visual inspection method provided in an embodiment of the present application;
[0033] Figure 7 A schematic diagram of a flow chart of another pipeline visual inspection method provided in an embodiment of the present application;
[0034] Figure 8 A schematic diagram of a flow chart of another pipeline visual inspection method provided in an embodiment of the present application;
[0035] Fig. 9 A schematic diagram of a pipeline visual inspection system workflow provided in an embodiment of the present application;
[0036] Fig.10 A schematic diagram of the structure of a pipeline visual inspection device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0038] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0039] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second", etc. are not limiting the quantity and execution order.
[0040] As described in the background technology, pipelines are an important infrastructure for energy transportation, used to transport oil and natural gas under high pressure. With the development of energy transportation, the number of pipelines put into use is increasing, and the quality of pipelines is directly related to the reliability and safety of their long-term operation. Therefore, pipeline inspection is crucial during the construction period / before it is put into use.
[0041] At present, visual inspection technology is usually used to inspect pipelines during the construction period. That is, the camera is equipped with an autonomous power detector to move in the pipeline and take images of the inner wall of the pipeline without stopping. Then, defects are identified in the image of the inner wall of the pipeline to achieve pipeline inspection.
[0042] In the prior art, the camera uses a fixed focus method to capture the image of the inner wall of the pipeline to be inspected. However, since the distance of the pipeline to be inspected is usually in the order of tens of kilometers, the center of the detector will shift during the movement of the pipeline to be inspected. This causes its relative position in the pipeline to be inspected to change, causing the distance and angle of the camera relative to the inner wall of the pipeline to change, which in turn causes the camera's focus effect to be poor, and the image of the inner wall of the pipeline captured by it is not clear.
[0043] As can be seen from the above, the existing technology can only be applied to static detection and cannot capture high-definition images of the inner wall of the pipeline under dynamic conditions.
[0044] In response to the above problems, an embodiment of the present application provides a pipeline visual inspection system, which includes: a plurality of camera mechanisms and a visual detector. Among them, the visual detector can be used to obtain the target position of the camera mechanism in the pipeline to be inspected, determine the target focus parameters of the camera mechanism according to the target position, and control the camera mechanism to capture the inner wall image of the pipeline to be inspected based on the target focus parameters. In this way, the visual detector can update the target focus parameters of the camera mechanism according to the target position of the camera mechanism in the pipeline to be inspected, so that the camera mechanism can capture the pipeline to be inspected based on the target focus parameters. The image clarity of the inner wall image captured by the camera mechanism is higher. In the pipeline visual inspection system, different camera mechanisms are used to capture the inner wall images of the pipeline to be inspected at different angles. The visual detector can obtain the inner wall images captured by the camera mechanism, and splice the full circumference inner wall image of the pipeline to be inspected based on the inner wall images captured by the camera mechanism. In this way, the present application can obtain a high-definition and complete pipeline inner wall image.
[0045] The pipeline visual inspection system includes: a number of camera mechanisms and visual detectors. Take the pipeline visual inspection system containing 9 camera mechanisms as an example. Figure 1 A schematic diagram of the structure of a pipeline visual inspection system provided in an embodiment of the present application is shown.
[0046] The camera mechanism is installed at the front end of the visual detector, and the plane formed by the camera mechanism is parallel to the pipe cross section of the pipe to be inspected.
[0047] For example, in Figure 1 In the pipeline visual inspection system shown, each camera mechanism can capture a 40° inner wall image.
[0048] As another example, the pipeline visual inspection system may include 8 camera mechanisms, each of which may capture a 45° image of the inner wall.
[0049] As another example, the pipeline visual inspection system may include 12 camera mechanisms, each of which may capture a 30° image of the inner wall.
[0050] The visual detector is used to obtain the target position of the camera mechanism in the pipeline to be inspected, and determine the target focusing parameters of the camera mechanism according to the target position.
[0051] The visual detector is also used to control a camera mechanism to capture an image of the inner wall of the pipeline to be inspected based on a target focus parameter.
[0052] The visual detector is also used to obtain the inner wall image taken by the camera mechanism, and to piece together the full circumference inner wall image of the pipeline to be inspected based on the inner wall image taken by the camera mechanism.
[0053] Specifically, in Figure 1 In the pipeline visual inspection system shown, the visual detector can obtain 9 inner wall images at the target position and splice the 9 images to obtain a full circumferential inner wall image of the pipeline to be inspected at the target position.
[0054] In some embodiments, the camera mechanism carries orthogonally arranged laser distance measuring sensors. When the visual detector obtains the target position of the camera mechanism in the pipeline to be inspected, it is specifically used to:
[0055] The horizontal and vertical positions of the camera mechanism in the pipeline to be inspected are obtained based on the laser ranging sensor, and the target position is determined according to the horizontal and vertical positions.
[0056] It is understandable that, in the process of the pipeline visual inspection system moving in the pipeline to be inspected, the position of the camera mechanism in the pipeline visual inspection system changes in the pipeline to be inspected, which may cause the camera mechanism to change in distance and angle relative to the inner wall of the pipeline to be inspected. The laser ranging sensor is located on the camera mechanism, and can determine the horizontal and vertical positions of the camera mechanism in the pipeline to be inspected by emitting lasers. Therefore, the visual detector can obtain the horizontal and vertical positions of the camera mechanism in the pipeline to be inspected based on the laser ranging sensor. Furthermore, the visual detector can determine the target position of the camera mechanism based on the horizontal and vertical positions.
[0057] In the pipeline visual inspection system, each camera mechanism carries an orthogonally arranged laser distance measuring sensor. The visual detector can obtain the horizontal and vertical positions of each camera mechanism in the pipeline to be inspected based on the laser distance measuring sensor carried by each camera mechanism. Furthermore, the visual detector can determine the target position of each camera mechanism.
[0058] In some embodiments, when the visual detector determines the target focus parameter of the camera mechanism according to the target position, it is specifically used to:
[0059] According to the target position, the target offset state of the camera mechanism is solved.
[0060] According to the target offset state and the parameter calibration table, the target focus parameters of the camera mechanism are determined.
[0061] The target offset state includes: target offset distance and target offset angle.
[0062] The target offset distance r is the distance between the target position where the camera mechanism is located and the inner wall of the pipeline to be inspected. The target offset angle θ is the angle between the target position where the camera mechanism is located, the straight line where the center point of the pipeline to be inspected is located, and the vertical direction.
[0063] The parameter calibration table includes the comparison relationship between the target offset state and the target focus parameter.
[0064] It can be understood that when the camera mechanism is in the initial position (i.e., the center point of the pipeline to be detected), the initial offset state includes: an initial offset distance and an initial offset angle, the initial offset distance can be set to 0, and the initial offset angle can be set to the radius R of the pipeline to be detected. And the parameter calibration table includes: a comparison relationship between the initial offset state and the initial focus parameter, that is, when the camera mechanism is in the initial offset state, the best focus parameter of the camera mechanism (it should be understood that the clarity of the inner wall image taken by the camera mechanism based on the best focus parameter is the highest) is the initial focus parameter.
[0065] The target offset distance described in the embodiment of the present application can be understood as an offset distance compared to the initial offset distance, and the target offset angle can be understood as an offset angle compared to the initial offset angle.
[0066] Therefore, the visual detector can determine the position change of the camera mechanism compared to the initial position according to the target position, and further, the visual detector can solve the target offset state of the camera mechanism. After the visual detector determines the target offset state of the camera mechanism, the target focus parameter that has a control relationship with the target offset state can be found from the parameter calibration table. In some embodiments, the camera mechanism includes: a lens assembly and a camera body.
[0067] In practical applications, a camera mechanism includes: a lens assembly and a camera body.
[0068] The lens assembly is used to calibrate the target focus parameters of the camera body.
[0069] The camera body is used to capture the inner wall image at the angle corresponding to the camera mechanism based on the target focus parameter.
[0070] It is understandable that the visual detector can adjust the focus parameter of the camera mechanism by controlling the rotation of the lens. The visual detector can control the camera body so that the camera body captures the inner wall image at the corresponding angle of the camera mechanism based on the target focus parameter.
[0071] In some embodiments, the pipeline visual inspection system further includes: a storage device and a power supply.
[0072] The storage device (also referred to as an acquisition device or an acquisition system) is used to store the inner wall images taken by the camera mechanism.
[0073] The power supply is used to power the storage device, visual detector and camera mechanism.
[0074] It can be understood that the power supply provides power to the entire pipeline vision inspection system.
[0075] When the pipeline inspection system moves in the pipeline to be inspected, the visual detector can obtain the target position of the camera mechanism and determine the focus parameters of the camera mechanism (that is, the visual detector can update the optimal shooting parameters of the camera mechanism in real time). The visual detector controls the camera mechanism to capture the inner wall image of the pipeline to be inspected based on the target focus parameters.
[0076] The camera mechanism can capture the inner wall image of the pipeline to be inspected based on the target focus parameter, and send the inner wall image to the storage device through a cable.
[0077] The visual detector can obtain the inner wall image from the camera mechanism or from the storage device, and splice the inner wall image taken by the camera mechanism into a full circumference inner wall image of the pipeline to be inspected.
[0078] As can be seen from the above, when the pipeline detection system moves in the pipeline to be detected, each part of the pipeline detection system (for example, the visual detector, the camera mechanism) continuously repeats the above process. Therefore, the pipeline detection system can dynamically capture high-definition inner wall images during movement, solving the technical problem that the prior art cannot capture high-definition pipeline inner wall images under dynamic conditions.
[0079] In some embodiments, the pipeline visual inspection system further includes: an image calibration device.
[0080] The image calibration device is equipped with a camera mechanism. Figure 2 shown.
[0081] Specifically, the image calibration device is fixed in the pipeline to be detected (it can also be a test pipeline that is the same as the pipeline to be detected), and the camera mechanism is installed on the image calibration device. The image calibration device includes: a linear adjustment mechanism and a rotation adjustment mechanism.
[0082] The image calibration device is used to carry the camera mechanism and move it in the pipeline to be inspected according to a preset offset distance and a preset offset angle to adjust the offset state of the camera mechanism.
[0083] It is understandable that the image calibration device with the camera mechanism is used to simulate the state of the visual detector carrying the camera mechanism in the pipeline to be inspected. The above-mentioned linear adjustment mechanism is used to adjust the preset offset distance, and the rotation adjustment mechanism adjusts the preset offset angle movement.
[0084] Within the offset distance threshold, starting from the initial offset distance, the linear adjustment mechanism is adjusted according to the preset offset distance to make the camera mechanism at the target offset distance. Within the offset angle threshold, starting from the initial offset angle, the rotation adjustment mechanism is adjusted according to the preset offset angle to make the camera mechanism at the target offset angle. During the adjustment process, different offset states of the camera mechanism are obtained.
[0085] The initial offset angle of the camera mechanism is 0, the initial offset distance of the camera mechanism is R, and the initial offset state of the camera mechanism can be recorded as P0 (θ=0, r=R).
[0086] The target offset angle of the camera mechanism is θ i , the target offset distance of the camera mechanism is r j , then the target offset state of the camera mechanism can be recorded as P n (θ i ,r j ).
[0087] For example, the offset distance threshold may be set to 0.15R (ie, 0.15 times the radius of the pipeline to be detected), the preset offset distance Δr may be set to 2 mm, the offset angle threshold may be set to 15°, and the preset offset angle Δθ may be set to 0.5°.
[0088] When the clarity of the reference image captured by the camera mechanism is lower than the clarity threshold, the camera mechanism is controlled to focus to determine the focus parameter of the camera mechanism.
[0089] In some embodiments, when the camera mechanism is in different offset states, the camera mechanism is controlled to refocus to determine the focus parameter of the camera mechanism.
[0090] In other embodiments, in order to avoid continuously correcting the focus parameters of the camera mechanism, the camera mechanism may be controlled to focus when the clarity of the reference image captured by the camera mechanism is lower than a clarity threshold to determine the focus parameters of the camera mechanism.
[0091] It is understandable that the present application can control the camera mechanism to focus and determine the focus parameters of the camera mechanism through the staff. It can also control the camera mechanism to focus and determine the focus parameters of the camera mechanism through the image calibration device. It can also control the camera mechanism to focus and determine the focus parameters of the camera mechanism through the visual detector.
[0092] Repeat the above steps to obtain a parameter calibration table.
[0093] As can be seen from the above, by continuously repeating the above operations, the focus parameters of the camera mechanism under different offset states can be determined, and a parameter calibration table can be generated.
[0094] The parameter calibration table includes a plurality of sets of comparison relationships between offset states and focus parameters, and the plurality of sets of comparison relationships between offset states and focus parameters include a comparison relationship between target offset states and target focus parameters.
[0095] As can be seen from the above, the pipeline visual inspection system provided by the present application can capture images of the inner wall of the pipeline while moving in the pipeline to be inspected. This eliminates the problem of blurred focus of the camera mechanism carried by the visual detector due to the center offset of the visual detector, and solves the technical problem that the prior art cannot capture high-definition images of the inner wall of the pipeline under dynamic conditions.
[0096] The visual detectors in the pipeline visual inspection system include Figure 3 The components included in the communication device shown are described below. Figure 3 The communication device shown in the figure is taken as an example to introduce the hardware structure.
[0097] Figure 3 FIG. 1 is a schematic diagram showing a hardware structure of a communication device provided in an embodiment of the present application. Figure 3 As shown, the communication device includes a processor 31, a memory 32, a communication interface 33, and a bus 34. The processor 31, the memory 32, and the communication interface 33 may be connected via the bus 34.
[0098] The processor 31 is the control center of the communication device, which can be a processor or a general term for multiple processing elements. For example, the processor 31 can be a general-purpose CPU or other general-purpose processors. Among them, the general-purpose processor can be a microprocessor or any conventional processor.
[0099] As an embodiment, the processor 31 may include one or more CPUs, such as Figure 3 CPU 0 and CPU 1 are shown in .
[0100] The memory 32 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0101] In a possible implementation, the memory 32 may exist independently of the processor 31, and the memory 32 may be connected to the processor 31 via a bus 34 to store instructions or program codes. When the processor 31 calls and executes the instructions or program codes stored in the memory 32, the pipeline visual inspection method provided in the following embodiment of the present invention can be implemented.
[0102] In the embodiment of the present application, for the communication device, the software programs stored in the memory 32 are different, so the functions implemented by the communication device are different. The functions performed by each device will be described in conjunction with the following flowchart.
[0103] In another possible implementation, the memory 32 may also be integrated with the processor 31 .
[0104] The communication interface 33 is used for the communication device to connect with other devices through a communication network, and the communication network may be Ethernet, wireless access network, wireless local area network (WLAN), etc. The communication interface 33 may include a receiving unit for receiving data and a sending unit for sending data.
[0105] The bus 34 may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0106] It should be pointed out that Figure 3 The structure shown in the figure does not constitute a limitation on the communication device, except Figure 3 In addition to the components shown, the communication device may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0107] The pipeline visual inspection method provided in the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0108] An embodiment of the present application provides a pipeline visual inspection method, which can be applied to the above-mentioned visual detector.
[0109] Figure 4 A schematic diagram of a pipeline visual inspection method provided in an embodiment of the present application is shown. Figure 4 As shown, the pipeline visual inspection method includes:
[0110] S401, obtaining a target position of a camera mechanism in a pipeline to be inspected, and determining a target focusing parameter of the camera mechanism according to the target position.
[0111] In the embodiment of the present application, since the position of the camera mechanism in the pipeline to be inspected changes, the distance and angle of the camera mechanism relative to the inner wall of the pipeline to be inspected change, resulting in poor focusing effect of the camera mechanism. Therefore, the visual detector can obtain the target position of the camera mechanism in the pipeline to be inspected, and determine the target focusing parameters of the camera mechanism according to the target position to update the target focusing parameters of the camera mechanism, so that the camera mechanism can focus on the inner wall of the pipeline to capture a high-definition image of the inner wall of the pipeline.
[0112] According to the above pipeline visual inspection system structure, it can be known that the camera mechanism carries orthogonally arranged laser distance measuring sensors. It can be understood that when the camera mechanism moves in the pipeline to be inspected, the laser distance measuring sensor can obtain the target position of the camera mechanism in the pipeline to be inspected.
[0113] Therefore, the visual detector can obtain the horizontal and vertical positions of the camera mechanism in the pipeline to be inspected from the laser ranging sensor, and then determine the target position of the camera mechanism in the pipeline to be inspected.
[0114] S402: Controlling a camera mechanism to capture an image of the inner wall of the pipeline to be inspected based on the target focus parameter.
[0115] In an embodiment of the present application, the visual detector can control the camera mechanism to capture the inner wall image of the pipeline to be inspected based on the target focus parameters, so that the camera mechanism can focus on the inner wall of the pipeline and capture a high-definition image of the inner wall of the pipeline.
[0116] Optionally, the visual detector may send instructions for calibrating focus parameters and instructions for capturing images to the camera mechanism, wherein the instructions for calibrating focus parameters carry target focus parameters, so that the camera mechanism captures the inner wall image of the pipeline to be inspected when the focus parameters are the target focus parameters.
[0117] Specifically, first, the visual detector may send an instruction to calibrate the focus parameter to the camera mechanism. Then, the camera mechanism adjusts its focus parameter to the target focus parameter in response to the instruction to calibrate the focus parameter sent by the visual detector. Then, the visual detector determines the focus parameter of the camera mechanism and sends an instruction to capture an image to the camera mechanism. Then, the camera mechanism captures an image of the inner wall of the pipeline in response to the instruction to capture an image sent by the visual detector.
[0118] S403, acquiring the inner wall image taken by the camera mechanism, and stitching together the full circumference inner wall image of the pipeline to be inspected according to the inner wall image taken by the camera mechanism.
[0119] In the embodiment of the present application, the visual detector can obtain the inner wall image taken by each camera mechanism, and sequentially stitch the inner wall images taken by each camera mechanism to obtain a full circumference inner wall image of the pipeline to be inspected. In this way, the visual detector can obtain a complete full circumference inner wall image.
[0120] Optionally, the visual detector may acquire, from the camera mechanism, an image of the inner wall taken by the camera mechanism.
[0121] Optionally, the visual detector may obtain the inner wall image taken by the camera mechanism from a storage device.
[0122] In some embodiments, in combination Figure 4 ,like Figure 5 As shown, in S401, obtaining the target position of the camera mechanism in the pipeline to be inspected specifically includes:
[0123] S501. Obtain the horizontal and vertical positions of the camera mechanism in the pipeline to be inspected.
[0124] According to the above pipeline visual inspection system structure, it can be known that the camera mechanism carries orthogonally arranged laser ranging sensors, which are arranged in the horizontal direction and the vertical direction respectively.
[0125] It can be understood that when the camera mechanism moves in the pipeline to be inspected, the laser ranging sensor can obtain the horizontal position and the vertical position of the camera mechanism in the pipeline to be inspected.
[0126] Therefore, the visual detector can obtain the horizontal and vertical positions of the camera mechanism in the pipeline to be inspected from the laser ranging sensor.
[0127] S502: Determine the target position according to the horizontal position and the vertical position.
[0128] In the embodiment of the present application, the movement of the camera mechanism in the pipeline to be inspected is uncertain. Therefore, the visual detector can obtain the horizontal position and the vertical position of the camera mechanism in the pipeline to be inspected respectively. Further, the visual detector can determine the target position of the camera mechanism based on the horizontal position and the vertical position.
[0129] In some embodiments, in combination Figure 5 ,like Figure 6 As shown, in S401, the target focus parameter of the camera mechanism is determined according to the target position, specifically including:
[0130] S601. Calculate the target offset state of the camera mechanism according to the target position.
[0131] The target offset state includes: target offset distance and target offset angle.
[0132] In the embodiment of the present application, the visual detector can calculate the position change of the camera mechanism in the pipeline to be inspected according to the target position, and then calculate the target offset state of the camera mechanism according to the position change of the camera mechanism, so that the visual detector can determine the target focus parameter of the camera mechanism according to the target offset state and the parameter calibration table.
[0133] It can be understood that when the camera mechanism is in the initial position (i.e., the center point of the pipeline to be inspected), the initial offset state includes: an initial offset distance and an initial offset angle, the initial offset distance can be set to 0, and the initial offset angle can be set to 0°. Therefore, the target offset distance can be understood as the offset distance compared to the initial offset distance, and the target offset angle can be understood as the offset angle compared to the initial offset angle.
[0134] Therefore, the visual detector can determine the position change of the camera mechanism compared to the initial position according to the target position. Further, the visual detector can solve the target offset state of the camera mechanism.
[0135] S602: Determine the target focus parameters of the camera mechanism according to the target offset state and the parameter calibration table.
[0136] The parameter calibration table includes the comparison relationship between the target offset state and the target focus parameter.
[0137] In the embodiment of the present application, the parameter calibration table includes a comparison relationship between the target offset state and the target focus parameter. The visual detector can determine the target focus parameter of the camera mechanism according to the target offset state and the parameter calibration table. In this way, the visual detector can control the camera mechanism to capture the inner wall image of the pipeline to be inspected based on the target focus parameter, so that the inner wall image captured by the camera mechanism has higher clarity.
[0138] Specifically, the visual detector can determine the target focus parameter corresponding to the target offset state from the parameter calibration table, that is, the target focus parameter having a control relationship with the target offset state.
[0139] In some embodiments, the target offset state includes a target offset distance and a target offset angle. Figure 6 ,like Figure 7 As shown, in S602, according to the target offset state and the parameter calibration table, the target focus parameter of the camera mechanism is determined, which specifically includes:
[0140] S701 : When a target offset state satisfies a preset condition, a target focus parameter of a camera mechanism is determined according to the target offset state and a parameter calibration table.
[0141] The preset conditions include: a target offset distance greater than an offset distance threshold, or a target offset angle greater than an offset angle threshold.
[0142] It can be understood that, when the camera mechanism has a slight offset compared to the initial offset state (i.e., the target offset state does not meet the preset condition), the clarity of the inner wall image captured by the camera mechanism based on the initial focus parameter is greater than or equal to the clarity threshold. In this case, the visual detector may not adjust the focus parameter of the camera mechanism.
[0143] Correspondingly, when the camera mechanism has a large offset compared to the initial offset state (the target offset state meets the preset conditions), the camera mechanism cannot focus on the inner wall of the pipe, and the clarity of the inner wall image taken by the camera mechanism based on the initial focus parameters is less than the clarity threshold. Therefore, in this case, the visual detector needs to determine the target focus parameters of the camera mechanism based on the target offset state and the parameter calibration table. In this way, the camera mechanism can refocus on the inner wall of the pipe at the target position, and the clarity of the inner wall image taken by the camera mechanism based on the target focus parameters is greater than or equal to the clarity threshold.
[0144] In some embodiments, in combination Figure 7 ,like Figure 8 As shown, the pipeline visual inspection method also includes:
[0145] S801. Obtain the moving speed of the camera mechanism in the pipeline to be inspected.
[0146] It can be understood that the visual detector carries the camera mechanism and moves in the pipeline to be inspected.
[0147] In one practicable manner, the moving speed is pre-set in the visual detector, so the visual detector can directly obtain the moving speed, which is the moving speed of the camera mechanism in the pipeline to be inspected.
[0148] In another possible implementation, the visual detector can obtain the horizontal position of the camera mechanism in the horizontal direction based on the laser ranging sensor at two moments respectively, so as to determine the distance change value of the horizontal position of the camera mechanism between the two moments. Further, the visual detector can determine the moving speed of the camera mechanism in the pipeline to be inspected according to the distance change value of the horizontal position and the time change value at the two moments. The moving speed is the ratio of the distance change value to the time change value.
[0149] S802: Determine the shooting frequency of the camera mechanism for shooting the inner wall image of the pipeline to be inspected according to the moving speed.
[0150] In the embodiment of the present application, the camera mechanism can capture the inner wall image of the preset pixel (i.e., the preset area), in order to ensure that the camera mechanism captures the complete inner wall image of the pipeline to be detected during the movement of the camera mechanism in the pipeline to be detected. The visual detector can determine the shooting frequency of the camera mechanism capturing the inner wall image of the pipeline to be detected according to the moving speed. In this way, the visual detector can control the camera mechanism to capture the inner wall image of the pipeline to be detected based on the shooting frequency, and a more comprehensive and complete pipeline inner wall image can be obtained.
[0151] It is also understandable that, when the camera mechanism moves in the pipeline to be inspected, the position of the camera mechanism relative to the inner wall of the pipeline will change. The visual detector can periodically determine the target position of the camera mechanism to determine the target focus parameter of the camera mechanism according to the target position of the camera mechanism. In this way, the clarity of the inner wall image taken by the camera mechanism can be guaranteed.
[0152] Exemplarily, when the moving speed is 0.8 m / s, the visual detector determines that the shooting frequency of the camera mechanism to take the image of the inner wall of the pipe to be inspected is 1 / 5, that is, the camera mechanism can determine the target position of the camera mechanism every 5 seconds, and determine the target focus parameters of the camera mechanism at the target position.
[0153] For example, when the length of the pipeline to be inspected is 12 m and the speed at which the camera mechanism moves in the pipeline to be inspected is 0.8 m / s, the visual detector can update the target focus parameter every 4 m.
[0154] Fig. 9 A schematic diagram of the workflow of a pipeline visual inspection system is shown.
[0155] First, during the preparation process, the pipeline vision inspection system needs to perform image calibration to obtain a plurality of sets of comparison relationships between offset states and focus parameters (also referred to as focus parameter sets).
[0156] Then, during the working process, the pipeline visual inspection system can obtain the real-time position of the camera mechanism to focus in real time according to the real-time position and take images of the inner wall of the pipeline.
[0157] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0158] The embodiment of the present application can divide the functional modules of the pipeline visual inspection device according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. Optionally, the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0159] like Fig.10 , which is a schematic diagram of the structure of a pipeline visual inspection device provided in an embodiment of the present application. Fig.10The pipeline visual inspection device shown includes: a communication unit 1001 and a processing unit 1002; the processing unit 1002 is used to obtain the target position of the camera mechanism in the pipeline to be inspected, and determine the target focus parameter of the camera mechanism according to the target position; the processing unit 1002 is also used to control the camera mechanism to capture the inner wall image of the pipeline to be inspected based on the target focus parameter; the processing unit 1002 is also used to obtain the inner wall image captured by the camera mechanism, and splice the full circumference inner wall image of the pipeline to be inspected according to the inner wall image captured by the camera mechanism.
[0160] Optionally, the processing unit 1002 is specifically used to: obtain the horizontal position and the vertical position of the camera mechanism in the pipeline to be inspected; and determine the target position according to the horizontal position and the vertical position.
[0161] Optionally, the processing unit 1002 is specifically used to: calculate the target offset state of the camera mechanism according to the target position; determine the target focus parameters of the camera mechanism according to the target offset state and a parameter calibration table; the parameter calibration table includes a comparison relationship between the target offset state and the target focus parameters.
[0162] Optionally, the target offset state includes a target offset distance and a target offset angle. The processing unit 1002 is specifically used to determine the target focus parameter of the camera mechanism according to the target offset state and a parameter calibration table when the target offset state meets a preset condition. The preset condition includes: the target offset distance is greater than an offset distance threshold, or the target offset angle is greater than an offset angle threshold.
[0163] Optionally, the communication unit 1001 is used to obtain the moving speed of the camera mechanism in the pipeline to be inspected; the processing unit 1002 is further used to determine the shooting frequency of the camera mechanism to shoot the inner wall image of the pipeline to be inspected according to the moving speed.
[0164] An embodiment of the present application also provides a computer-readable storage medium, which includes computer execution instructions. When the computer execution instructions are executed on a computer, the computer executes the pipeline visual inspection method provided in the above embodiment.
[0165] The embodiment of the present application also provides a computer program, which can be directly loaded into a memory and contains software code. After being loaded and executed by a computer, the computer program can implement the pipeline visual inspection method provided in the above embodiment.
[0166] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
[0167] The system provided in the above embodiment is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the modules or steps in the embodiments of the present invention can be decomposed or combined. For example, the modules in the above embodiment can be combined into one module, or further divided into multiple sub-modules to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of the present invention are only for distinguishing the modules or steps, and are not regarded as improper limitations of the present invention.
[0168] Those skilled in the art should be aware that in one or more of the above examples, the functions described in this application can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer-readable storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. Storage media can be any available media that can be accessed by general or special-purpose computers.
[0169] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0170] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The unit described as a separate component may or may not be physically separated, and the component displayed as a unit may be a physical unit or multiple physical units, that is, it may be located in one place, or it may be distributed in multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
[0171] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. If the 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 readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the general technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a ROM, a RAM, a disk, or an optical disk.
[0172] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A pipeline visual inspection system, characterized in that: include: Several camera mechanisms and visual detectors; The visual detector is used to obtain the target position of the camera mechanism in the pipeline to be inspected, and determine the target focus parameter of the camera mechanism according to the target position; The visual detector is also used to control the camera mechanism to capture the inner wall image of the pipeline to be detected based on the target focus parameter; different camera mechanisms are used to capture the inner wall image of the pipeline to be detected at different angles; The visual detector is also used to obtain the inner wall image taken by the camera mechanism, and to splice the full circumference inner wall image of the pipeline to be inspected according to the inner wall image taken by the camera mechanism.
2. The pipeline visual inspection system according to claim 1, characterized in that: When the visual detector determines the target focus parameter of the camera mechanism according to the target position, it is specifically used to: Calculating a target offset state of the camera mechanism according to the target position; Determining target focus parameters of the camera mechanism according to the target offset state and the parameter calibration table; The parameter calibration table includes a comparison relationship between target offset states and target focus parameters.
3. The pipeline visual inspection system according to claim 2, characterized in that: The pipeline visual inspection system further includes: an image calibration device; the camera mechanism is installed on the image calibration device; The image calibration device is used to carry the camera mechanism to move in the pipeline to be inspected according to a preset offset distance and a preset offset angle to adjust the offset state of the camera mechanism; When the clarity of the reference image captured by the camera mechanism is lower than a clarity threshold, controlling the camera mechanism to focus, so as to determine a focus parameter of the camera mechanism; Repeat the above operation to obtain the parameter calibration table; the parameter calibration table includes a plurality of sets of comparison relationships between offset states and focus parameters; the plurality of sets of comparison relationships between offset states and focus parameters include a comparison relationship between target offset states and target focus parameters.
4. The pipeline visual inspection system according to claim 1, characterized in that: The camera mechanism carries orthogonally arranged laser distance measuring sensors; when the visual detector obtains the target position of the camera mechanism in the pipeline to be detected, it is specifically used to: Acquiring the horizontal position and the vertical position of the camera mechanism in the pipeline to be inspected based on the laser ranging sensor; The target position is determined according to the horizontal position and the vertical position.
5. The pipeline visual inspection system according to claim 1, characterized in that: The camera mechanism comprises: a lens assembly and a camera body; the lens assembly is used to calibrate a target focus parameter of the camera body; and the camera body is used to capture an inner wall image at a corresponding angle of the camera mechanism based on the target focus parameter.
6. A pipeline visual inspection method, characterized in that: Applied to a visual detector, the visual detector belongs to the pipeline visual inspection system provided by any one of claims 1 to 5, comprising: Acquiring a target position of a camera mechanism in the pipeline to be inspected, and determining a target focus parameter of the camera mechanism according to the target position; Controlling the camera mechanism to capture an image of the inner wall of the pipeline to be inspected based on the target focus parameter; The inner wall image taken by the camera mechanism is acquired, and the full circumference inner wall image of the pipeline to be inspected is spliced according to the inner wall image taken by the camera mechanism.
7. The method according to claim 6, characterized in that The step of obtaining the target position of the camera mechanism in the pipeline to be inspected includes: Acquire the horizontal position and the vertical position of the camera mechanism in the pipeline to be inspected; The target position is determined according to the horizontal position and the vertical position.
8. The method according to claim 6, characterized in that Determining the target focus parameter of the camera mechanism according to the target position includes: Calculating a target offset state of the camera mechanism according to the target position; The target focus parameter of the camera mechanism is determined according to the target offset state and a parameter calibration table; the parameter calibration table includes a comparison relationship between the target offset state and the target focus parameter.
9. The method according to claim 8, characterized in that The target offset state includes a target offset distance and a target offset angle. The step of determining the target focus parameter of the camera mechanism according to the target offset state and a parameter calibration table includes: When the target offset state satisfies a preset condition, the target focus parameter of the camera mechanism is determined according to the target offset state and a parameter calibration table; the preset condition includes: a target offset distance is greater than an offset distance threshold, or a target offset angle is greater than an offset angle threshold.
10. The method according to claim 6, characterized in that Also includes: Acquire the moving speed of the camera mechanism in the pipeline to be inspected; The shooting frequency of the image of the inner wall of the pipeline to be inspected by the camera mechanism is determined according to the moving speed.
Citation Information
Cited By
Multi-sensor fused self-adaptive hydraulic pipeline imaging system and method
CN120521164A