Method for sensing course of unmanned aerial vehicle in pipeline based on image and related equipment thereof
By installing an image acquisition device on the drone in the underground pipeline and performing image processing, the problem of traditional GPS heading perception in underground pipelines is solved, and the heading perception of the drone is realized. It is suitable for small drones, which is simple and economical. .
Patent Information
- Application Number
- CN202411005519.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-15
AI Technical Summary
In underground pipeline environments, traditional GPS heading perception methods are difficult to achieve heading perception of drones, which are limited by the problems of narrow space, no natural light source and GPS signal enclosure.
Using an image-based drone heading perception method, by installing an image acquisition device on the front end of the drone, collecting pipeline images in real time, performing color space conversion processing and center of gravity feature processing, and calculating the brightness feature value to determine the drone's relative to the pipeline. Heading information.
It realizes heading perception in narrow underground pipelines, is suitable for small drones, is simple and low-cost, is suitable for lightweight small drone equipment, and realizes inspection of pipelines.
Smart Images

Figure CN118960733A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of unmanned aerial vehicle and control technology, and in particular to an image-based method for sensing the heading of an unmanned aerial vehicle in a pipeline and related equipment. Background Art
[0002] The heading perception of drones is a very important part of drone control. In the environment of underground pipelines, the control requirements for drones are different from those in conventional environments. The control environment of underground pipelines usually has the following characteristics: 1. The environment is narrow. Usually, the inner diameter of underground pipelines is about 400mm; 2. There is no natural light source. There is no natural light source such as sunlight in underground pipelines; 3. There is no GPS signal. Underground pipelines are closed spaces and cannot receive GPS signals; 4. The size of drones is limited. There is little space in underground pipelines. In order to ensure flight, the size of the drone itself will also be greatly limited, resulting in the drone being unable to carry a large computing platform. Due to the conditions in the above special working environment, the traditional GPS heading perception method is difficult to achieve the heading perception function of drones in pipelines.
[0003] That is, how to provide an image-based method for sensing the heading of drones in pipelines and apply it to small drones in underground pipelines to achieve the technical effect of saving costs and realizing heading perception in underground pipelines is a technical problem that urgently needs to be solved in this field. Summary of the invention
[0004] The embodiment of the present invention provides an image-based method for sensing the heading of a UAV in a pipeline and related equipment thereof to solve at least one of the above-mentioned technical problems.
[0005] In a first aspect, the present application provides an image-based method for sensing the heading of a drone in a pipeline, which is applied to sensing the heading of a drone in a target pipeline. An image acquisition device is installed at the front end of the drone. The method includes:
[0006] Controlling the UAV to enter the target pipeline;
[0007] After the UAV enters the target pipeline, controlling the image acquisition device to acquire the pipeline image in front of the UAV in real time;
[0008] Performing color space conversion processing on the pipeline image to obtain a feature image reflecting brightness difference;
[0009] The characteristic image is subjected to gravity feature processing, and the heading information of the UAV relative to the target pipeline is determined according to the processing result.
[0010] Preferably, performing gravity feature processing on the feature image, and determining the heading information of the UAV relative to the target pipeline according to the processing result, includes:
[0011] Calculating brightness characteristic values of the characteristic image;
[0012] The heading information of the UAV relative to the underground pipeline is determined according to the calculated brightness characteristic value.
[0013] Preferably, the calculating of the brightness characteristic value of the characteristic image comprises:
[0014] Obtaining a pixel center point of the feature image, and dividing the feature image into four equal areas based on the pixel center point of the feature image;
[0015] Calculate the brightness value of each area separately;
[0016] The four brightness values are calculated to obtain a brightness characteristic value.
[0017] Preferably, the four regions are respectively a first region, a second region, a third region, and a fourth region, the first region is located at the upper left of the feature image, the second region is located at the upper right of the feature image, the third region is located at the lower left of the feature image, and the fourth region is located at the lower right of the feature image, and calculating the brightness value of each region separately includes:
[0018] According to the resolution of the feature image, the brightness value of each pixel in the first area, the brightness value of each pixel in the second area, the brightness value of each pixel in the third area, and the brightness value of each pixel in the fourth area in the feature image are obtained, and mathematical statistics are performed on the brightness values of all pixels in the first area to obtain a first brightness value, mathematical statistics are performed on the brightness values of all pixels in the second area to obtain a second brightness value, mathematical statistics are performed on the brightness values of all pixels in the third area to obtain a third brightness value, and mathematical statistics are performed on the brightness values of all pixels in the fourth area to obtain a fourth brightness value.
[0019] Preferably, the four brightness values are calculated to obtain a brightness characteristic value, including:
[0020] Performing mathematical statistics on the first brightness value and the third brightness value to obtain a left brightness statistical value, and performing mathematical statistics on the second brightness value and the fourth brightness value to obtain a right brightness statistical value;
[0021] Calculate the difference between the left brightness statistical value and the right brightness statistical value to obtain a first brightness characteristic value;
[0022] Performing mathematical statistics on the first brightness value and the second brightness value to obtain an upper brightness statistical value, and performing mathematical statistics on the third brightness value and the fourth brightness value to obtain a lower brightness statistical value;
[0023] A difference between the upper brightness statistical value and the lower brightness statistical value is calculated to obtain a second brightness characteristic value.
[0024] Preferably, determining the heading information of the UAV relative to the target pipeline based on the calculated brightness characteristic value includes:
[0025] Construct heading calculation model and pitch calculation model;
[0026] Inputting the first brightness characteristic value into the heading calculation model to determine the heading angle of the UAV relative to the target pipeline, wherein the heading angle is the angle between the flight direction of the UAV and the central axis of the target pipeline in the horizontal direction;
[0027] Inputting the second brightness characteristic value into the pitch calculation model to determine the pitch angle of the UAV relative to the target pipeline, wherein the pitch angle is the angle between the flight direction of the UAV and the central axis of the target pipeline in the vertical direction;
[0028] The heading angle and the pitch angle constitute the heading information of the UAV relative to the target pipeline.
[0029] Preferably, the constructing of the heading calculation model and the pitch calculation model includes:
[0030] Construct a heading calculation formula and a pitch calculation formula, the heading calculation formula is: Δyaw=aΔτ yaw +A, the pitch calculation formula is: Δpitch=bΔτ pitch +B;
[0031] Among them, a and A are heading control parameters, b and B are pitch control parameters, Δyaw is the heading angle; Δpitch is the pitch angle, Δτ yaw is the first brightness eigenvalue, Δτ pitch is the second brightness characteristic value;
[0032] Calculating the heading control parameter and the pitch control parameter using the least square method according to historical heading data to obtain an optimal heading control parameter and an optimal pitch control parameter;
[0033] The optimal heading control parameter is input into the heading calculation formula to obtain a heading calculation model, and the optimal pitch control parameter is input into the pitch calculation formula to obtain a pitch calculation model.
[0034] Preferably, the image acquisition device comprises a camera and a lighting downlight, and the lighting downlight is arranged adjacent to the camera and located vertically above the camera.
[0035] In a second aspect, the present application also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to implement the image-based in-pipeline drone heading perception method described in any one of the first aspects when executing the computer program stored in the memory.
[0036] In a third aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the image-based in-pipeline drone heading perception method described in any one of the first aspects.
[0037] The image-based method for sensing the heading of a drone in a pipeline provided by the present invention is applied to the sensing of the heading of a drone in a target pipeline. The drone is a small drone used for underground pipelines, and an image acquisition device is installed at its front end. The method for sensing the heading involved in the present application first controls the drone to enter the target pipeline. After the drone enters the target pipeline, the image acquisition device installed at the front end of the drone is controlled to capture the pipeline image in front of the drone in real time, wherein the pipeline image in front of the drone refers to the pipeline image in the forward direction of the drone. The pipeline image is converted into a color space to obtain a feature image reflecting the brightness difference, and then the feature image is processed with the center of gravity feature, and the heading information of the drone relative to the target pipeline is determined based on the corresponding processing result. The image-based method for sensing the heading of a drone in a pipeline provided by the present application is suitable for sensing the heading in a narrow pipeline environment, and can be applied to lightweight and small drone equipment for pipeline inspection. The implementation method is simple, low-cost, and highly economical. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A schematic diagram of a flow chart of an image-based method for sensing the heading of a drone in a pipeline provided in this application;
[0040] Figure 2 A schematic diagram of the installation position of the image acquisition device provided in this application;
[0041] Figure 3A schematic diagram of a characteristic image provided by this application;
[0042] Figure 4 A schematic diagram of the structure of an electronic device provided by this application;
[0043] Figure 5 A schematic diagram of the structure of a computer-readable storage medium provided in this application. DETAILED DESCRIPTION
[0044] 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 those skilled in the art without creative work are within the scope of protection of this application.
[0045] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.
[0046] The division of modules in this application is a logical division. There may be other division methods when it is implemented in actual applications. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection between modules can be electrical or other similar forms, which are not limited in this application. In addition, the modules or submodules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in multiple circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present application.
[0047] Next, see Figure 1 , Figure 1 The figure is a flow chart of a method for sensing the heading of a UAV in a pipeline based on an image in an embodiment of the present invention. As an embodiment of the method for sensing the heading of a UAV in a pipeline based on an image provided by the present invention, the method is applied to sensing the heading of a UAV in a target pipeline. An image acquisition device is installed at the front end of the UAV. The method specifically includes the following steps S110 to S130:
[0048] Step S110, controlling the drone to enter the target pipeline, and after the drone enters the target pipeline, controlling the image acquisition device to acquire the pipeline image in front of the drone in real time;
[0049] As a feasible method, the image acquisition device includes a camera and a lighting downlight, the lighting downlight is arranged adjacent to the camera and located vertically above the camera, and the shooting direction of the camera is parallel to the irradiation direction of the lighting downlight and the forward direction of the UAV, so as to fix the position of the camera and the lighting downlight in advance, and then calibrate the shooting position and the light irradiation position in advance, so as to facilitate the subsequent determination of the heading in the pipeline. Figure 2 As shown in the figure, the upper part is the lighting downlight, and the lower part of the lighting downlight is the camera.
[0050] It can be understood that when the light of the lighting downlight hits the wall of the target pipe, the wall will reflect the light. At this time, the brighter area in the pipe image in front of the camera is the area where the pipe wall reflects light. When the light of the lighting downlight hits the central axis direction of the target pipe, since there is no pipe wall in front to reflect the light, the center of the image captured at this time is darker, while the surrounding pipe walls are relatively bright areas. The change in the brightness characteristics of the pipeline image can reflect the change in the reflection intensity of the pipeline to light.
[0051] Among them, underground pipelines include underground horizontal pipes and underground vertical shafts. Underground horizontal pipes refer to underground pipelines laid in a horizontal direction, and underground vertical shafts refer to underground pipelines laid in a vertical direction. The target pipeline involved in this application is the underground horizontal pipe in the underground pipeline.
[0052] Step S120, performing color space conversion processing on the pipeline image to obtain a feature image reflecting brightness difference;
[0053] It can be understood that the pipeline image obtained by collecting the lighting downlight and the camera is a color image with different brightness. By performing color space conversion processing on the color image, the color image can be converted into a feature image reflecting the brightness difference. The area with higher brightness in the image has a lighter color, and the area with lower brightness in the image has a darker color.
[0054] As a feasible method, color space conversion processing includes grayscale conversion processing, color channel conversion, RGB to HSV conversion and other processing methods; the present application can adopt any one of these conversion methods to implement the present application.
[0055] When grayscale conversion is used, the pipeline image is converted into a color space to obtain a feature image reflecting brightness difference. The feature image obtained after grayscale conversion is a grayscale feature image, as shown in the attached figure. Figure 3 shown.
[0056] Step S130: performing center of gravity feature processing on the feature image, and determining the heading information of the UAV relative to the target pipeline according to the processing result.
[0057] As an achievable manner, the above-mentioned step S130 involves performing centroid feature processing on the feature image and determining the heading information of the UAV relative to the target pipeline according to the processing result, which specifically includes the following sub-steps:
[0058] (1) calculating the brightness characteristic value of the characteristic image;
[0059] As an achievable manner, the calculation of the brightness characteristic value of the characteristic image involved in the above sub-step (1) specifically includes the following contents:
[0060] Obtaining a pixel center point of the feature image, and dividing the feature image into four equal areas based on the pixel center point of the feature image;
[0061] Calculate the brightness value of each area separately;
[0062] The four brightness values are calculated to obtain a brightness characteristic value.
[0063] As an implementable manner, let the four regions be the first region, the second region, the third region, and the fourth region, the first region is located at the upper left of the feature image, the second region is located at the upper right of the feature image, the third region is located at the lower left of the feature image, and the fourth region is located at the lower right of the feature image. The contents involved in the above sub-step (1) are respectively calculated to obtain the brightness value of each region, which specifically includes the following contents:
[0064] According to the resolution of the feature image, the brightness value of each pixel in the first area, the brightness value of each pixel in the second area, the brightness value of each pixel in the third area, and the brightness value of each pixel in the fourth area in the feature image are obtained, and mathematical statistics are performed on the brightness values of all pixels in the first area to obtain a first brightness value, mathematical statistics are performed on the brightness values of all pixels in the second area to obtain a second brightness value, mathematical statistics are performed on the brightness values of all pixels in the third area to obtain a third brightness value, and mathematical statistics are performed on the brightness values of all pixels in the fourth area to obtain a fourth brightness value.
[0065] The mathematical statistics methods involved in this application include mean calculation method, median calculation method, center of gravity calculation method, etc.
[0066] As an implementable manner, the content involved in the above sub-step (1) is to calculate the four brightness values to obtain the brightness characteristic value, which specifically includes the following sub-steps:
[0067] Performing mathematical statistics on the first brightness value and the third brightness value to obtain a left brightness statistical value, and performing mathematical statistics on the second brightness value and the fourth brightness value to obtain a right brightness statistical value;
[0068] Calculate the difference between the left brightness statistical value and the right brightness statistical value to obtain a first brightness characteristic value;
[0069] Performing mathematical statistics on the first brightness value and the second brightness value to obtain an upper brightness statistical value, and performing mathematical statistics on the third brightness value and the fourth brightness value to obtain a lower brightness statistical value;
[0070] A difference between the upper brightness statistical value and the lower brightness statistical value is calculated to obtain a second brightness characteristic value.
[0071] Among them, the pixel center point of the feature image represents the center of the feature image, such as Figure 3 As shown, the feature image is divided into four regions based on the pixel center point. Region ① in the figure is the first region in this application, region ② is the second region in this application, region ③ is the third region in this application, and region ④ is the fourth region in this application. Each small grid in the figure is a pixel point obtained by dividing based on the image resolution. Figure 3 It is the grayscale feature image obtained after grayscale conversion.
[0072] Specifically, when the data statistics method adopts the average value method for calculation, the first brightness value can be set to G 1 The second brightness value is G 2 The third brightness value is G 3The fourth brightness value is G 4 The first brightness characteristic value Δτ can be calculated according to the first calculation formula yaw , the first calculation formula is: The second brightness characteristic value Δτ can be calculated according to the second calculation formula pitch , the second calculation formula is:
[0073] (2) Determine the heading information of the UAV relative to the underground pipeline based on the calculated brightness characteristic value.
[0074] As an achievable manner, the above sub-step (2) involves determining the heading information of the UAV relative to the target pipeline based on the calculated brightness characteristic value, which specifically includes the following contents:
[0075] Construct heading calculation model and pitch calculation model;
[0076] Inputting the first brightness characteristic value into the heading calculation model to determine the heading angle of the UAV relative to the target pipeline, wherein the heading angle is the angle between the flight direction of the UAV and the central axis of the target pipeline in the horizontal direction;
[0077] Inputting the second brightness characteristic value into the pitch calculation model to determine the pitch angle of the UAV relative to the target pipeline, wherein the pitch angle is the angle between the flight direction of the UAV and the central axis of the target pipeline in the vertical direction;
[0078] The heading angle and the pitch angle constitute the heading information of the UAV relative to the target pipeline.
[0079] Specifically, due to the narrow area inside the pipeline, the UAV needs to be controlled to fly in the central area of the pipeline. Even if the UAV flies along the extension direction of the central axis of the pipeline, it is necessary to obtain the heading information of the UAV in the pipeline in real time. Based on this, the present application provides a heading perception method with a simple algorithm to determine the horizontal offset angle and vertical offset angle of the UAV relative to the central axis of the pipeline, and then the flight direction of the UAV can be adjusted horizontally according to the horizontal offset angle, and the flight direction of the UAV can be adjusted vertically according to the vertical offset angle.
[0080] As an achievable method, the construction of the heading calculation model and the pitch calculation model includes:
[0081] Construct a heading calculation formula and a pitch calculation formula, the heading calculation formula is: Δyaw=aΔτ yaw +A, the pitch calculation formula is: Δpitch=bΔτ pitch +B;
[0082] Among them, a and A are heading control parameters, b and B are pitch control parameters, Δyaw is the heading angle; Δpitch is the pitch angle, Δτ yaw is the first brightness eigenvalue, Δτ pitch is the second brightness characteristic value;
[0083] Calculating the heading control parameter and the pitch control parameter using the least square method according to historical heading data to obtain an optimal heading control parameter and an optimal pitch control parameter;
[0084] The optimal heading control parameter is input into the heading calculation formula to obtain a heading calculation model, and the optimal pitch control parameter is input into the pitch calculation formula to obtain a pitch calculation model.
[0085] Among them, the historical heading data set can be obtained through artificial simulation tests or from existing historical data. The historical heading data set includes historical pitch angles, brightness characteristic values corresponding to the historical pitch angles, historical heading angles, and brightness characteristic values corresponding to the historical heading angles. Among them, the artificial simulation test can simulate various target pipelines, and manually set the deviation from the central axis of the pipeline to the left by 90°, 60°, 30°, 0°, and to the right by 30°, 60°, 90°, and obtain the corresponding brightness characteristic values at the deviation angles to obtain at least 7 sets of data sets, and estimate the optimal parameter value of the heading calculation formula based on the data set by the least squares method to obtain the heading calculation model. The same method can be used to calculate the pitch calculation model. The positive and negative signs can be set in front of the deviation angle to determine whether the drone is deviating to the left or to the right. If the left deviation angle is set to be positive, the right deviation angle is negative. Similarly, for pitch calculation, if the upward deviation angle is set to be positive, the downward deviation angle is negative.
[0086] The image-based method for sensing the heading of a drone in a pipeline provided by the present invention is applied to the sensing of the heading of a drone in a target pipeline. The drone is a small drone used for underground pipelines, and an image acquisition device is installed at its front end. The method for sensing the heading involved in the present application first controls the drone to enter the target pipeline. After the drone enters the target pipeline, the image acquisition device installed at the front end of the drone is controlled to capture the pipeline image in front of the drone in real time, wherein the pipeline image in front of the drone refers to the pipeline image in the forward direction of the drone. The pipeline image is grayed to obtain a feature image, and then the feature image is processed, and the heading information of the drone relative to the target pipeline is determined based on the corresponding processing result. The image-based method for sensing the heading of a drone in a pipeline provided by the present application is suitable for sensing the heading in a narrow pipeline environment, and can be applied to lightweight and small drone equipment for inspecting pipelines. The implementation method is simple, low-cost, and highly economical.
[0087] An electronic device is also provided in an embodiment of the present invention. Figure 4 , Figure 4 The electronic device of the present invention is a schematic diagram of an embodiment of the electronic device, including:
[0088] A memory 401, a processor 402, and a computer program 403 stored in the memory and executable on the processor, wherein the processor implements the above-mentioned image-based method for sensing the heading of a UAV in a pipeline when executing the computer program 403 stored in the memory.
[0089] For ease of explanation, only the parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the part of the method for sensing the heading of a drone in a pipeline based on an image in the embodiment of the present invention. The memory 401 can be used to store a computer program 403, which includes software programs, modules and data. The processor 402 executes the computer program 403 stored in the memory 401 to perform various functional applications and data processing of the electronic device.
[0090] The present invention also provides a computer-readable storage medium. Figure 5 , Figure 5 The present invention is a schematic diagram of an embodiment of a computer-readable storage medium in an embodiment of the present invention, wherein the computer-readable storage medium may store a computer program, which, when executed, includes some or all of the steps of an image-based method for sensing the heading of an unmanned aerial vehicle in a pipeline as described in the above method embodiment.
[0091] Technicians in the relevant field can clearly understand that, for the convenience and conciseness of description, the specific working process of the above-described device, electronic device and computer-readable storage medium can refer to the corresponding process of an image-based in-pipeline drone heading perception method in the aforementioned method embodiment, and will not be repeated here.
[0092] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0093] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0094] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0095] 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 computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or partly contributed 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 storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of an image-based in-pipeline drone heading perception method in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0096] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An image-based method for sensing the heading of a drone in a pipeline, which is applied to sensing the heading of a drone in a target pipeline. An image acquisition device is installed at the front end of the drone, and is characterized in that: The method comprises: Controlling the UAV to enter the target pipeline, and after the UAV enters the target pipeline, controlling the image acquisition device to acquire the pipeline image in front of the UAV in real time; Performing color space conversion processing on the pipeline image to obtain a feature image reflecting brightness difference; The characteristic image is subjected to gravity feature processing, and the heading information of the UAV relative to the target pipeline is determined according to the processing result.
2. The image-based method for sensing the heading of a drone in a pipeline according to claim 1, characterized in that: Performing gravity feature processing on the feature image, and determining the heading information of the UAV relative to the target pipeline according to the processing result, including: Calculating brightness characteristic values of the characteristic image; The heading information of the UAV relative to the underground pipeline is determined according to the calculated brightness characteristic value.
3. The image-based method for sensing the heading of a drone in a pipeline according to claim 2, characterized in that: The calculating of the brightness characteristic value of the characteristic image comprises: Obtaining a pixel center point of the feature image, and dividing the feature image into four equal areas based on the pixel center point of the feature image; Calculate the brightness value of each area separately; The four brightness values are calculated to obtain a brightness characteristic value.
4. The method for sensing the heading of a UAV in a pipeline based on an image according to claim 3, characterized in that: Let the four regions be the first region, the second region, the third region, and the fourth region, respectively. The first region is located at the upper left of the feature image, the second region is located at the upper right of the feature image, the third region is located at the lower left of the feature image, and the fourth region is located at the lower right of the feature image. The step of calculating the brightness value of each region includes: According to the resolution of the feature image, the brightness value of each pixel in the first area, the brightness value of each pixel in the second area, the brightness value of each pixel in the third area, and the brightness value of each pixel in the fourth area in the feature image are obtained, and mathematical statistics are performed on the brightness values of all pixels in the first area to obtain a first brightness value, mathematical statistics are performed on the brightness values of all pixels in the second area to obtain a second brightness value, mathematical statistics are performed on the brightness values of all pixels in the third area to obtain a third brightness value, and mathematical statistics are performed on the brightness values of all pixels in the fourth area to obtain a fourth brightness value.
5. The image-based method for sensing the heading of a drone in a pipeline according to claim 4, characterized in that: The four brightness values are calculated to obtain a brightness characteristic value, including: Performing mathematical statistics on the first brightness value and the third brightness value to obtain a left brightness statistical value, and performing mathematical statistics on the second brightness value and the fourth brightness value to obtain a right brightness statistical value; Calculate the difference between the left brightness statistical value and the right brightness statistical value to obtain a first brightness characteristic value; Performing mathematical statistics on the first brightness value and the second brightness value to obtain an upper brightness statistical value, and performing mathematical statistics on the third brightness value and the fourth brightness value to obtain a lower brightness statistical value; A difference between the upper brightness statistical value and the lower brightness statistical value is calculated to obtain a second brightness characteristic value.
6. The image-based method for sensing the heading of a drone in a pipeline according to claim 5, characterized in that: Determining the heading information of the UAV relative to the target pipeline according to the calculated brightness characteristic value includes: Construct heading calculation model and pitch calculation model; Inputting the first brightness characteristic value into the heading calculation model to determine the heading angle of the UAV relative to the target pipeline, wherein the heading angle is the angle between the flight direction of the UAV and the central axis of the target pipeline in the horizontal direction; Inputting the second brightness characteristic value into the pitch calculation model to determine the pitch angle of the UAV relative to the target pipeline, wherein the pitch angle is the angle between the flight direction of the UAV and the central axis of the target pipeline in the vertical direction; The heading angle and the pitch angle constitute the heading information of the UAV relative to the target pipeline.
7. The image-based method for sensing the heading of a drone in a pipeline according to claim 6, characterized in that: The constructing of the heading calculation model and the pitch calculation model includes: Construct a heading calculation formula and a pitch calculation formula, the heading calculation formula is: Δyaw=aΔτ yaw +A, the pitch calculation formula is: Δpitch=bΔτ pitch +B; Among them, a and A are heading control parameters, b and B are pitch control parameters, Δyaw is the heading angle; Δpitch is the pitch angle, Δτ yaw is the first brightness eigenvalue, Δτ pitch is the second brightness characteristic value; Calculating the heading control parameter and the pitch control parameter using the least square method according to historical heading data to obtain an optimal heading control parameter and an optimal pitch control parameter; The optimal heading control parameter is input into the heading calculation formula to obtain a heading calculation model, and the optimal pitch control parameter is input into the pitch calculation formula to obtain a pitch calculation model.
8. The method for sensing the heading of a UAV in a pipeline based on an image according to claim 7, characterized in that: The image acquisition device includes a camera and a lighting downlight, wherein the lighting downlight is arranged adjacent to the camera and located vertically above the camera.
9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is used to implement an image-based in-pipeline UAV heading perception method as described in any one of claims 1 to 8 when executing the computer program stored in the memory.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, an image-based method for sensing the heading of a UAV in a pipeline is implemented as described in any one of claims 1 to 8.
