Obstacle detection method, device and drone

By using laser texture components in UAV obstacle detection equipment to enhance texture features, the problem of binocular vision detection in weak or repetitive texture environments is solved, obstacle detection accuracy is improved, and it is maintained in low-light environments. Binocular perception.

CN109885053BActive Publication Date: 2024-09-17AUTEL ROBOTICS CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN201910149492.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-02-28
Publication Date
2024-09-17
Estimated Expiration
2039-02-28

AI Technical Summary

Technical Problem

Existing obstacle detection equipment based on binocular vision has poor detection results in weak texture or repeated texture environments, affecting the stability of UAVs and obstacle detection accuracy.

Method used

A laser texture component is added to the obstacle detection equipment of the drone to enhance the shooting scene texture of the binocular camera component by emitting laser texture, improve the binocular stereo matching accuracy, and provide lighting function at night.

Benefits of technology

Without changing the original binocular matching algorithm and structure, the accuracy of obstacle detection is improved and binocular perception capabilities are maintained in low-light environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109885053B
    Figure CN109885053B
Patent Text Reader

Abstract

The embodiment of the present invention relates to the field of drone technology, and specifically discloses an obstacle detection method, device, and drone, wherein the drone includes a binocular camera component and a laser texture component, and the method includes: determining to turn on the laser texture component; starting the laser texture component to emit a laser texture; obtaining a binocular view containing the laser texture acquired by the binocular camera component, and setting the binocular view containing the laser texture as a target binocular view; and performing obstacle detection based on the target binocular view. Through the above technical solution, the embodiment of the present invention can improve the accuracy of binocular stereo matching without changing the original binocular matching algorithm and structure, thereby improving the accuracy of obstacle detection; at the same time, it enables the drone to perform binocular perception when flying at night.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of unmanned aerial vehicles, and in particular to an obstacle detection method, device and unmanned aerial vehicle. Background Art

[0002] A drone is an unmanned aircraft that controls its flight posture through a radio remote control device and a built-in program. Due to its advantages such as maneuverability, quick response, unmanned operation, and low operating requirements, it has been widely used in many fields such as aerial photography, plant protection, power inspection, and disaster relief.

[0003] As drones are increasingly used, the external environment they need to deal with is becoming more and more complex, and the obstacles they may encounter are also increasing. Currently, drones are generally equipped with obstacle detection equipment to ensure flight safety.

[0004] At present, in order to meet the requirements of large detection distance, most consumer drones on the market use obstacle detection equipment based on binocular vision. However, the matching accuracy of binocular vision is greatly affected by the ambient light and the texture of the detected object. The existing obstacle detection equipment based on binocular vision has poor detection effect in weak texture or repeated texture environment, which greatly affects the stability of drones when working indoors and the accuracy of obstacle detection when landing on non-textured ground such as tile cement.

[0005] Therefore, the existing obstacle detection technology needs to be improved and developed. Summary of the invention

[0006] In view of this, the embodiments of the present invention provide an obstacle detection method, device and drone to achieve the purpose of improving binocular stereo matching accuracy and further improving obstacle detection accuracy.

[0007] To solve the above technical problems, the embodiments of the present invention provide the following technical solutions:

[0008] In a first aspect, an embodiment of the present invention provides an obstacle detection method, which is applied to a drone, wherein the drone includes a binocular camera component and a laser texture component, and the method includes:

[0009] Determine to turn on the laser texturing component;

[0010] activating the laser texturing component to emit a laser texture;

[0011] Acquire the binocular view containing the laser texture collected by the binocular camera assembly, and set the binocular view containing the laser texture as a target binocular view;

[0012] Obstacle detection is performed based on the target binocular view.

[0013] In some embodiments, the determining to turn on the laser texturing component includes:

[0014] It is determined that there is an obstacle within the detection range of the laser texturing component.

[0015] In some embodiments, determining that there is an obstacle within the detection range of the laser texturing component includes:

[0016] Acquire an initial binocular view currently captured by the binocular camera assembly;

[0017] Based on the initial binocular view, determining the distance between the obstacle closest to the drone and the drone;

[0018] If the distance is less than or equal to the detection distance of the laser texture component, it is determined that there is an obstacle within the detection range of the laser texture component.

[0019] In some embodiments, the determining to turn on the laser texturing component further includes:

[0020] It is determined that the shooting scene of the binocular camera assembly is a weak texture scene.

[0021] In some embodiments, determining that the shooting scene of the binocular camera assembly is a weak texture scene includes:

[0022] Acquire one of the initial binocular views currently captured by the binocular camera assembly;

[0023] Performing a gradient operation on one of the initial views to obtain a gradient value of each pixel in one of the initial views;

[0024] Counting the number N of pixel points whose gradient values ​​are less than or equal to the gradient threshold;

[0025] If the number N is less than or equal to the quantity threshold N th , it is determined that the shooting scene of the binocular camera assembly is a weak texture scene.

[0026] In some embodiments, the determining to turn on the laser texturing component further includes:

[0027] It is determined that the shooting scene of the binocular camera assembly is a repeated texture scene.

[0028] In some embodiments, determining that the shooting scene of the binocular camera assembly is a repeated texture scene includes:

[0029] Acquire an initial binocular view currently captured by the binocular camera assembly;

[0030] Perform stereo matching on the initial binocular view and obtain the minimum cost value C corresponding to each matching block 1i and the next smallest value C 2i , where i represents the i-th matching block;

[0031] If there is a matching block i that satisfies the following formula, it is determined that the shooting scene of the binocular camera assembly is a repeated texture scene:

[0032]

[0033] The value range of K is: 0.5≤K<1.

[0034] In some embodiments, the determining to turn on the laser texturing component includes:

[0035] It is determined that the brightness of the environment in which the drone is located is lower than a preset value.

[0036] In some embodiments, determining that the brightness of the environment in which the drone is located is lower than a preset value includes:

[0037] Acquire one of the initial binocular views currently captured by the binocular camera assembly;

[0038] According to the average gray value of each pixel in one of the initial views, it is determined that the brightness of the environment in which the drone is located is lower than a preset value.

[0039] In a second aspect, an embodiment of the present invention provides an obstacle detection device, which is applied to a drone, wherein the drone includes a binocular camera component and a laser texture component, and the obstacle detection device includes:

[0040] A determination unit, used for determining to turn on the laser texturing component;

[0041] A control unit, used to start the laser texturing component to emit laser texture;

[0042] An image acquisition unit, used for acquiring a binocular view including the laser texture acquired by the binocular camera assembly, and setting the binocular view including the laser texture as a target binocular view;

[0043] A detection unit is used to detect obstacles based on the target binocular view.

[0044] In some embodiments, the determining unit includes:

[0045] The distance detection module is used to determine whether there is an obstacle within the detection range of the laser texturing component.

[0046] In some embodiments, the distance detection module is specifically used to:

[0047] Acquire an initial binocular view currently captured by the binocular camera assembly;

[0048] Based on the initial binocular view, determining the distance between the obstacle closest to the drone and the drone;

[0049] If the distance is less than or equal to the detection distance of the laser texture component, it is determined that there is an obstacle within the detection range of the laser texture component.

[0050] In some embodiments, the determining unit further includes:

[0051] The weak texture detection module is used to determine whether the shooting scene of the binocular camera assembly is a weak texture scene.

[0052] In some embodiments, the weak texture detection module is specifically used to:

[0053] Acquire one of the initial binocular views currently captured by the binocular camera assembly;

[0054] Performing a gradient operation on one of the initial views to obtain a gradient value of each pixel in one of the initial views;

[0055] Counting the number N of pixel points whose gradient values ​​are less than or equal to the gradient threshold;

[0056] If the number N is less than or equal to the quantity threshold N th , it is determined that the shooting scene of the binocular camera assembly is a weak texture scene.

[0057] In some embodiments, the determining unit further includes:

[0058] The repetitive texture detection module is used to determine whether the shooting scene of the binocular camera assembly is a repetitive texture scene.

[0059] In some embodiments, the repetitive texture detection module is specifically used to:

[0060] Acquire an initial binocular view currently captured by the binocular camera assembly;

[0061] Perform stereo matching on the initial binocular view and obtain the minimum cost value C corresponding to each matching block 1i and the next smallest value C 2i , where i represents the i-th matching block;

[0062] If there is a matching block i that satisfies the following formula, it is determined that the shooting scene of the binocular camera assembly is a repeated texture scene:

[0063]

[0064] The value range of K is: 0.5≤K<1.

[0065] In some embodiments, the determining unit includes:

[0066] The brightness detection module is used to determine whether the brightness of the environment in which the drone is located is lower than a preset value.

[0067] In some embodiments, the brightness detection module is specifically used to:

[0068] Acquire one of the initial binocular views currently captured by the binocular camera assembly;

[0069] According to the average gray value of each pixel in one of the initial views, it is determined that the brightness of the environment in which the drone is located is lower than a preset value.

[0070] In a third aspect, an embodiment of the present invention provides a drone, including:

[0071] body;

[0072] An arm connected to the fuselage;

[0073] A power device, arranged on the machine arm;

[0074] A binocular camera assembly, which is arranged on the fuselage and is used to collect a binocular view in the moving direction of the drone;

[0075] A laser texture component, which is disposed on the fuselage and is used to emit a laser texture that can be sensed by the binocular camera component;

[0076] A processor, which is disposed in the body and is respectively connected to the binocular camera assembly and the laser texturing assembly; and

[0077] A memory communicatively connected to the processor; wherein,

[0078] The memory stores instructions that can be executed by the processor. The instructions are executed by the processor so that the processor can perform the obstacle detection method as described above.

[0079] In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a drone to execute the obstacle detection method as described above.

[0080] In a fifth aspect, an embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a drone, the drone executes the obstacle detection method as described above.

[0081] The beneficial effects of the embodiments of the present invention are as follows: different from the prior art, the obstacle detection method, device and drone provided by the embodiments of the present invention can enhance the texture of the shooting scene of the binocular camera component by adding a laser texture component to the obstacle detection equipment of the drone, and making the laser texture component present a laser texture within the binocular viewing angle of the binocular camera component, thereby improving the binocular stereo matching accuracy without changing the original binocular matching algorithm and structure, thereby improving the obstacle detection accuracy; in addition, by emitting laser texture through the laser texture component, a lighting function can also be realized, so that the drone can also perform binocular perception when flying at night. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0083] Figure 1 This is a hardware block diagram of a drone provided by an embodiment of the present invention;

[0084] Figure 2 yes Figure 1 A front view schematic diagram of the external structure of the UAV shown;

[0085] Figure 3 yes Figure 1 A schematic top view of the external structure of the UAV shown;

[0086] Figure 4 yes Figure 1 A schematic diagram of the structure of the laser texturing component of the UAV shown;

[0087] Figure 5 yes Figure 1 A schematic diagram of the internal structure of the fuselage of the UAV shown;

[0088] Figure 6 is a flow chart of an obstacle detection method provided by an embodiment of the present invention;

[0089] Figure 7 is a flow chart of another obstacle detection method provided by an embodiment of the present invention;

[0090] Figure 8 It is a structural schematic diagram of an obstacle detection device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0091] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0092] It should be noted that, if there is no conflict, the various features in the embodiments of the present invention can be combined with each other, and all are within the protection scope of the present invention. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order from the module division in the device or the order in the flow chart.

[0093] The embodiment of the present invention provides an obstacle detection method and an obstacle detection device. The obstacle detection method and the obstacle detection device can be applied to any movable carrier equipped with a binocular camera component and a laser texture component, such as: a drone, an unmanned vehicle, an intelligent robot, etc. In the embodiment of the present invention, the obstacle detection method and the obstacle detection device are mainly applied to a drone as an example for detailed description.

[0094] Specifically, the obstacle detection method provided by the embodiment of the present invention is a method for enhancing the texture features of the shooting scene of the binocular camera component by emitting laser texture through a laser texture component, so as to improve the binocular stereo matching accuracy, and then improve the accuracy of obstacle detection. Specifically, after determining to turn on the laser texture component, start the laser texture component to emit laser texture, wherein the laser texture can partially or completely cover the effective sensing area of ​​the binocular camera component (i.e., the overlapping area of ​​the binocular view), and form a specific / random laser texture pattern on the surface of the obstacle; then, obtain the binocular view containing the laser texture collected by the binocular camera component, and set the binocular view containing the laser texture as the target binocular view; finally, perform obstacle detection based on the target binocular view.

[0095] The obstacle detection device provided in the embodiment of the present invention can be a virtual device composed of a software program that can implement the obstacle detection method provided in the embodiment of the present invention. The obstacle detection device and the obstacle detection method provided in the embodiment of the present invention are based on the same inventive concept and have the same technical features and beneficial effects.

[0096] Furthermore, an embodiment of the present invention further provides a drone, which may be any type of drone, for example, it may include but is not limited to: a single-rotor drone, a quad-rotor drone, a six-rotor drone, a tilt-rotor drone, etc. The drone includes an obstacle detection device that can execute any obstacle detection method provided by the embodiment of the present invention or can realize the function of the obstacle detection device provided by the embodiment of the present invention.

[0097] The embodiments of the present invention are further described below in conjunction with the accompanying drawings.

[0098] Embodiment 1

[0099] See also Figure 1 , is a block diagram of the hardware composition of a drone provided in an embodiment of the present invention, the drone 100 comprises: a fuselage 11, an arm connected to the fuselage, a power device arranged on the arm, and an obstacle detection device 12 arranged on the fuselage 11. The number of arms is at least two, and the arms can be fixedly connected to the fuselage 11, integrally formed, or detachably connected. The power device generally comprises a motor arranged at the end of the arm and a propeller connected to the motor, and the power device is used to provide lift or power for the drone to fly.

[0100] Among them, the fuselage 11 is the main part of the drone 100, on which various functional components of the drone 100 (for example, a landing gear for supporting the drone 100, etc.) and various functional circuit components of the drone 100 (for example, a microprogrammed control unit (MCU), a digital signal processor (DSP), etc.) can be arranged.

[0101] The obstacle detection device 12 is used to detect obstacles in the moving direction of the drone 100 , so that the drone 100 can avoid obstacles based on the obstacle detection result provided by the obstacle detection device 12 .

[0102] The obstacle detection device 12 includes a binocular camera component 121, a laser texture component 122, and a processor 123. The processor 123 is connected to the binocular camera component 121 and the laser texture component 122 for communication.

[0103] Specifically, in this embodiment, Figure 2 or Figure 3 As shown, the binocular camera component 121 and the laser texturing component 122 are both arranged outside the fuselage 11 and face the movement direction of the drone 100 .

[0104] The binocular camera assembly 121 is used to capture a target binocular view in the direction of movement of the drone 100. The "target binocular view" refers to a left and right view used for obstacle detection. The binocular camera assembly 121 may specifically include a first image acquisition device 1211 and a second image acquisition device 1212 that are spaced apart. The image captured by the first image acquisition device 1211 is a left view, and the image captured by the second image acquisition device 1212 is a right view. The left view and the right view constitute a binocular view in the direction of movement of the drone 100 (or, a binocular view of the shooting scene of the binocular camera assembly 121).

[0105] The laser texture component 122 is used to emit a laser texture that can be sensed by the binocular camera component 121. The "laser texture" is a texture pattern that appears on the surface of the obstacle after the laser beam hits the obstacle surface. The texture pattern can be recognized and recorded by the binocular camera component 121. In some embodiments, the projection range of the laser texture component 122 can partially or completely cover the binocular viewing angle range of the binocular camera component 121. The "projection range" refers to the emission viewing angle (such as the angle of view) of the laser beam emitted by the laser texture component 122. Figure 3 The range corresponding to the viewing angle α shown in FIG. 1 ) corresponds to the coverage range of the laser texture. The “binocular viewing angle range” refers to the overlapping area between the capturing angle of the first image capturing device 1211 and the capturing angle of the second image capturing device 1212 (e.g., Figure 3 The area included in the viewing angle β shown), that is, the area that can be identified and recorded by both the first image acquisition device 1211 and the second image acquisition device 1212.

[0106] In this embodiment, in order to change the structure of the existing obstacle detection device based on binocular stereo vision as little as possible, the laser texture component 122 can be arranged between the first image acquisition device 1211 and the second image acquisition device 1212. Of course, it should be understood that since the laser texture component 122 is mainly used to add scene texture and does not need to be calibrated, the installation position of the laser texture component 122 may not be limited thereto, as long as the projection range of the laser texture component 122 basically covers the binocular viewing angle range of the binocular camera component 121.

[0107] Specifically, the laser texture component 122 includes at least one laser texture generating device 1220. Figure 4As shown, the laser texture generating device 1220 may include a laser emitter 1221, a focusing lens 1222, a scattering screen 1223, and an exit lens 1224, which are arranged in sequence. The scattering screen 1223 is a rough and irregular light-transmitting surface, which can scatter a single laser beam into a random texture pattern (i.e., the "laser texture"). The exit lens 1224 is used to modulate the light path to present the laser texture in a specific area. When the laser texture generating device 1220 is working, the laser emitter 1221 emits a laser, and the laser is focused to the scattering screen 1223 by the focusing lens 1222 to form a random laser texture, and the laser texture is emitted after the light path is modulated by the exit lens 1224.

[0108] It should be understood that, in this embodiment, the focusing lens 1222 is provided mainly to ensure that the laser emitted by the laser emitter 1221 is focused on the scattering screen 1223 as much as possible to reduce light energy loss. Therefore, in some embodiments, when the emission angle of the selected laser emitter 1221 is small, the focusing lens 1222 can also be omitted.

[0109] In addition, in actual applications, the laser beam and the exit lens are both circular. In order to minimize the laser scattering loss, the projected laser texture area is generally also circular, but the acquisition area of ​​the image acquisition device is mostly rectangular. Therefore, in some embodiments, in order to ensure that the circular laser texture can cover the rectangular binocular viewing angle range to the greatest extent and reduce the loss of light energy, the laser texture component 122 can include two laser texture generating devices 1220, and the two laser texture generating devices 1220 can be arranged side by side (i.e., arranged side by side left and right). Furthermore, in actual use, in order to make the structure of the laser texture component 122 more compact, the two laser texture generating devices 1220 can be arranged closely.

[0110] The processor 123 is arranged inside the fuselage 11, and is used to provide computing and control capabilities to control the drone 100 to execute any one of the obstacle detection methods provided in the embodiments of the present invention. For example, a control unit and an obstacle detection unit may be run in the processor 123, the control unit is used to start the laser texture component 122, and the obstacle detection unit is used to obtain the target binocular view captured by the binocular camera component 121 and perform obstacle detection based on the target binocular view. When the laser texture component 122 is started, the target binocular view contains the laser texture; when the laser texture component 122 is turned off, the target binocular view does not contain the laser texture.

[0111] Furthermore, the obstacle detection device 12 also includes a memory 124, such as Figure 5 As shown, the memory 124 is disposed inside the body 11 and is connected to the processor 123 in communication with the processor 123 via a bus or any other suitable connection method (in Figure 5 (The example is taken as the bus connection).

[0112] The memory 124, as a non-transient computer-readable storage medium, can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the obstacle detection method in the embodiment of the present invention. The processor 123 can implement the obstacle detection method in any of the following method embodiments by running the non-transient software programs, instructions and modules stored in the memory 124. Specifically, the memory 124 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 124 may also include a memory remotely arranged relative to the processor 123, and these remote memories may be connected to the processor 123 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0113] In actual applications, the processor 123 can first start the laser texture component 122 to emit the laser texture after determining to turn on the laser texture component 122, and start the binocular camera component 121 to acquire images; then, the processor 123 obtains the binocular view containing the laser texture acquired by the binocular camera component, and sets the binocular view containing the laser texture as the target binocular view, and then performs obstacle detection based on the target binocular view.

[0114] Furthermore, in view of the high power consumption of the laser texture component 122, in order to save energy, under normal circumstances (i.e., when there are no factors that affect the accuracy of binocular stereo matching, such as weak texture, repeated texture, weak light, etc.), the binocular camera component 121 can be turned off, and the binocular view not containing laser texture collected by the binocular camera component 121 is used as the target binocular view for obstacle detection; and under certain specific conditions (for example, dark light, weak texture, repeated texture, etc.), the laser texture component 122 is started, and the binocular view containing laser texture collected by the binocular camera component 121 is used as the target binocular view for obstacle detection.

[0115] Therefore, in some embodiments, the obstacle detection device 12 may further include: a brightness sensor for acquiring the brightness of the environment in which the drone 100 is located. Then, the control unit in the processor 123 may start the laser texturing component 122 only when the brightness sensor detects that the brightness of the environment in which the drone 100 is located is lower than a preset value.

[0116] In some embodiments, the obstacle detection device 12 may further include: a distance sensor for determining whether there is an obstacle within the detection range of the laser texture component 122. Thus, in this embodiment, the control unit in the processor 123 may start the laser texture component 122 only when the distance sensor determines that there is an obstacle within the detection range of the laser texture component 122. Further, in some other embodiments, the obstacle detection device 12 may further include: a texture detection device for determining whether the scene in front of the drone 100 is a weak texture scene or a repeated texture scene. Thus, in this embodiment, the control unit in the processor 123 may start the laser texture component 122 only when the distance sensor determines that there is an obstacle within the detection range of the laser texture component 122, and the texture detection device determines that the scene in front of the drone 100 is a weak texture scene or a repeated texture scene. Wherein, the texture detection device may specifically be a binocular camera device, which collects image information of the shooting scene of the binocular camera component 121 in real time, and determines the scene type of the shooting scene of the binocular camera component 121 based on the image information.

[0117] It should be understood that the functions of the brightness sensor, distance sensor and texture detection device can also be implemented by the binocular camera component 121 and the corresponding software modules in the processor 123 in the embodiment of the present invention.

[0118] In addition, it should be noted that the structure of the above-mentioned drone 100 is only for exemplary description. In practical applications, the obstacle detection method and related devices provided in the embodiments of the present invention can be further extended to other suitable drones or other movable carriers, and are not limited to the following. Figure 1 The drone 100 is shown.

[0119] Embodiment 2

[0120] Figure 6 is a flow chart of an obstacle detection method provided by an embodiment of the present invention. The method can be applied to any movable carrier having a binocular camera component and a laser texture component, such as Figure 1 The drone 100 is shown.

[0121] For details, please refer to Figure 6 The method may include but is not limited to the following steps:

[0122] Step 110: Start the laser texturing component to emit laser texturing.

[0123] As described above, the laser texture component is used to emit a laser texture that can be sensed by the binocular camera component. The projection range of the laser texture component can partially or completely cover the binocular viewing angle range of the binocular camera component. Thus, the laser texture emitted by the laser texture component can fill the sparsely textured area in the shooting scene of the binocular camera component and enhance the texture of the shooting scene of the binocular camera component.

[0124] In specific implementation, the processor of the obstacle detection device can send a start instruction to the laser texture component, and the laser texture component can emit a laser texture after receiving the start instruction. After the laser texture reaches the surface of an obstacle, a corresponding texture pattern can be presented on the surface of the obstacle to provide more feature matching points for subsequent stereo matching.

[0125] Step 120: Acquire the binocular view containing the laser texture captured by the binocular camera assembly, and set the binocular view containing the laser texture as the target binocular view.

[0126] The “target binocular view” refers to the target left view and the target right view used for obstacle detection.

[0127] After the laser texture component is started and the laser texture is emitted, the shooting scene of the binocular camera component includes the laser texture, so that the binocular view captured by the binocular camera component will also include image features corresponding to the laser texture.

[0128] In this embodiment, the binocular view containing the laser texture captured by the binocular camera assembly is set as the target binocular view for subsequent obstacle detection.

[0129] Step 130: Perform obstacle detection based on the target binocular view.

[0130] In this embodiment, obstacle detection can be performed based on the target binocular view according to a conventional obstacle detection method based on binocular vision. For example, stereo matching can be performed on the target binocular view based on binocular matching algorithms such as BM and SGBM to obtain a corresponding disparity map; then, a three-dimensional point cloud map of the shooting scene is calculated based on the disparity map and relevant parameters of the binocular camera assembly, thereby realizing obstacle detection in the direction of motion of the drone.

[0131] It can be seen from the above technical scheme that the beneficial effect of the embodiment of the present invention is that the obstacle detection method provided by the embodiment of the present invention can enhance the texture of the shooting scene of the binocular camera component by making the laser texture component present a laser texture within the binocular viewing angle of the binocular camera component. Therefore, without changing the original binocular matching algorithm and structure, the binocular stereo matching accuracy is improved, thereby improving the accuracy of obstacle detection.

[0132] Embodiment 3

[0133] In application scenarios that require high obstacle detection accuracy, for example, when a drone is landing, the obstacle detection method described in the second embodiment can be referred to, and the laser texture component can be started throughout the process to emit laser textures. However, in some other application scenarios, for example, when the scene texture is rich and the light is sufficient, only conventional binocular sensing (i.e., the laser component does not need to emit laser textures) can also achieve high obstacle detection accuracy.

[0134] Therefore, in order to ensure the accuracy of obstacle detection while reducing the energy consumption of the obstacle detection device, the embodiment of the present invention also provides another obstacle detection method. The difference between this method and the obstacle detection method described in the second embodiment is that before starting the laser texture component to emit the laser texture, first determine to turn on the laser texture component.

[0135] Specifically, see Figure 7 The method may include but is not limited to the following steps:

[0136] Step 210: Determine to start the laser texturing component.

[0137] In this embodiment, whether the laser texture component needs to be turned on can be determined in combination with the actual application environment, and the following step 220 is performed only when it is determined that the laser texture component needs to be turned on. If the laser texture component does not need to be turned on, the binocular view that does not contain the laser texture collected by the binocular camera assembly can be set as the target binocular view for obstacle detection.

[0138] Among them, since the laser texture component has a certain detection range, the laser texture emitted by it will only be projected onto the surface of the obstacle within its detection range to present a corresponding texture pattern, that is, the laser texture emitted by the laser texture component can actually only enhance the surface texture of the obstacle within its detection range, but cannot enhance the surface texture of the obstacle outside its detection range. Therefore, in some embodiments, the determination of turning on the laser texture component may specifically include: determining that there is an obstacle within the detection range of the laser texture component.

[0139] In specific implementation, whether there is an obstacle within the detection range of the laser texture component can be determined by determining whether the distance between the obstacle closest to the drone and the drone is less than or equal to the detection distance of the laser texture component: if the distance is less than or equal to the detection distance of the laser texture component, it is determined that there is an obstacle within the detection range of the laser texture component; otherwise, it is determined that there is no obstacle within the detection range of the laser texture component.

[0140] In some embodiments, the drone may be equipped with a distance sensor, so that the distance sensor can be used to detect obstacles in the shooting scene of the binocular camera assembly, and then determine the distance between the obstacle closest to the drone and the drone.

[0141] Alternatively, in other embodiments, the distance between the obstacle closest to the drone and the drone can also be determined by calculating and analyzing the binocular view captured by the binocular camera assembly. Specifically, the initial binocular view currently captured by the binocular camera assembly can be first acquired, and then based on the initial binocular view, the depth information in the shooting scene can be acquired to further determine the distance between the obstacle closest to the drone and the drone. The "initial binocular view" is the binocular view that does not contain the laser texture captured by the binocular camera assembly before the laser texture assembly is started.

[0142] Furthermore, since the laser texture component is mainly used to fill in the sparsely textured areas in the shooting scene of the binocular camera component to improve the stereo matching accuracy; and in some shooting scenes, it is possible that the scene itself is rich in texture and easy to identify feature matching points. Even if the laser texture component is not started, a high stereo matching accuracy can be achieved. At this time, if the laser texture component is started, the power consumption of the obstacle detection device will increase. Therefore, in some other embodiments, the determination to turn on the laser texture component may also include: determining that the shooting scene of the binocular camera component is a weak texture scene or a repeated texture scene. That is, in this embodiment, in addition to determining that there are obstacles within the detection range of the laser texture component, it is also necessary to determine that the shooting scene of the binocular camera component is a weak texture scene or a repeated texture scene before executing the following step 220.

[0143] Specifically, the specific implementation method of determining that the shooting scene of the binocular camera assembly is a weak texture scene may be:

[0144] Obtain one of the initial binocular views currently captured by the binocular camera assembly; perform gradient calculation on the one of the initial views to obtain the gradient value of each pixel in the one of the initial views; count the number N of pixels whose gradient value is less than or equal to the gradient threshold; if the number N is less than or equal to the number threshold Nth , it is determined that the shooting scene of the binocular camera assembly is a weak texture scene.

[0145] The "gradient threshold" can be set to any appropriate value between 10 and 100. If the gradient value of a pixel is less than or equal to the gradient threshold, the pixel can be considered as a weak texture point. th " can be determined according to the total number of pixels, for example, it can be 30% to 60% of the total number of pixels.

[0146] Among them, since the binocular matching algorithms such as BM have the characteristics of epipolar matching, in order to reduce the operation, only the horizontal gradient operation can be performed on the initial view. The gradient algorithm used may include but is not limited to: sobel, prewitt, robert, etc. In addition, in order to more accurately determine whether the shooting scene of the binocular camera assembly is a weak texture scene, in other embodiments, the above calculation can also be performed on another initial view in the initial binocular view, as long as in any initial view, the number N of pixel points whose gradient value is less than or equal to the gradient threshold is less than or equal to the number threshold N th , it is determined that the shooting scene of the binocular camera assembly is a weak texture scene.

[0147] In addition, a specific implementation method of determining that the shooting scene of the binocular camera assembly is a repeated texture scene may be:

[0148] Obtain the initial binocular view currently collected by the binocular camera assembly; perform stereo matching on the initial binocular view, and obtain the minimum cost value C corresponding to each matching block 1i and the next smallest value C 2i , where i represents the i-th matching block; if there is a matching block i that satisfies the following formula, it is determined that the shooting scene of the binocular camera assembly is a repeated texture scene:

[0149]

[0150] The value range of K is: 0.5≤K<1.

[0151] Among them, when performing stereo matching, different block matching cost algorithms such as SAD (sum of absolute difference), SSD (sum of squared distance), NCC (normalized cross correlation) can be used for calculation. If the minimum cost value C corresponding to a matching block i 1i and the next smallest value C 2iIf the matching block i is close to each other, it means that there are at least two best matches with close cost values. At this time, it can be considered that there are at least two repeated textures in the shooting scene, and the shooting scene is a repeated texture scene.

[0152] In addition, in an environment with insufficient light, it is difficult for the binocular camera assembly to obtain a clear binocular view. Even if the texture of the shooting scene is rich, it is difficult to obtain accurate obstacle detection results. Therefore, in other embodiments, the determination to turn on the laser texture assembly may also include: determining that the brightness of the environment in which the drone is located is lower than a preset value. That is, when it is determined that the brightness of the environment in which the drone is located is lower than a preset value, the following step 220 is executed.

[0153] Specifically, in some embodiments, the drone may be provided with a brightness sensor, so that by reading data from the brightness sensor, the brightness of the environment in which the drone is located can be obtained, and then it can be determined whether the brightness of the environment in which the drone is located is lower than a preset value.

[0154] Alternatively, in other embodiments, in order to simplify the structure of the drone, the brightness sensor may be omitted, and the binocular view captured by the binocular camera assembly may be analyzed to determine whether the brightness of the environment in which the drone is located is lower than a preset value. Specifically, one of the initial binocular views currently captured by the binocular camera assembly may be obtained; the brightness of the environment in which the drone is located may be determined based on the average grayscale value of each pixel point in one of the initial views, and then the brightness may be compared with the preset value to determine whether the brightness of the environment in which the drone is located is lower than the preset value. Among them, the specific implementation method of determining the ambient brightness based on the grayscale value can be referred to the relevant prior art, which will not be described in detail here.

[0155] Of course, in some other embodiments, in order to ensure the accuracy of the brightness detection result, the brightness sensor and the analysis result of the initial view can also be combined to determine whether the brightness of the environment in which the drone is located is lower than a preset value.

[0156] Furthermore, it should be understood that, based on the above description, in order to achieve the purpose of intelligently managing the power consumption of the laser texture component, it is also possible to combine actual factors such as brightness, distance, scene, etc. to comprehensively consider when to start the laser texture component to emit laser texture.

[0157] For example, in some embodiments, when it is determined that the brightness of the environment in which the drone is located is lower than a preset value, the following step 220 can be directly executed; and when it is determined that the brightness of the environment in which the drone is located is greater than or equal to the preset value, it is further determined whether there is an obstacle within the detection range of the laser texture component. If not, the laser texture component is not started; if so, the following step 220 is executed, or it is further determined whether the shooting scene of the binocular camera component is a weak texture scene or a repeated texture scene: if so, the following step 220 is executed, if not, the laser texture component is not started.

[0158] Step 220: Start the laser texturing component to emit laser texture.

[0159] Step 230: acquiring a binocular view including the laser texture captured by a binocular camera assembly, and setting the binocular view including the laser texture as a target binocular view;

[0160] Step 240: Perform obstacle detection based on the target binocular view.

[0161] It should be noted that the above steps 220 to 240 are respectively the same as Figure 6 Steps 110 to 130 in the obstacle detection method shown have the same technical features. Therefore, the specific implementation thereof can refer to the corresponding description of steps 110 to 130 in the above embodiment, and will not be repeated in this embodiment.

[0162] It can be seen from the above technical solution that the beneficial effect of the embodiment of the present invention is that the obstacle detection method provided by the embodiment of the present invention can intelligently manage the startup and shutdown of the laser texture component by starting the laser texture component to emit laser texture after determining to turn on the laser texture component, thereby saving energy without losing the obstacle detection accuracy.

[0163] Embodiment 4

[0164] Figure 8 is a schematic diagram of the structure of an obstacle detection device provided by an embodiment of the present invention. The obstacle detection device 80 can be operated as follows: Figure 1 The drone 100 is shown.

[0165] Specifically, see Figure 8 The obstacle detection device 80 includes: a determination unit 81, a control unit 82, an image acquisition unit 83 and a detection unit 84.

[0166] Among them, the determination unit 81 is used to determine whether to turn on the laser texture component; the control unit 82 is used to start the laser texture component to emit a laser texture; the image acquisition unit 83 is used to acquire the binocular view containing the laser texture captured by the binocular camera component, and set the binocular view containing the laser texture as the target binocular view; the detection unit 84 is used to perform obstacle detection based on the target binocular view.

[0167] In this embodiment, after the determination unit 81 determines to turn on the laser texture component, the laser texture component can be started by the control unit 82 to emit a laser texture; then, the binocular view containing the laser texture captured by the binocular camera component is acquired by the image acquisition unit 83, and the binocular view containing the laser texture is set as the target binocular view; finally, the detection unit 84 performs obstacle detection based on the target binocular view.

[0168] Wherein, in some embodiments, the determination unit 81 includes: a distance detection module 811, which is used to determine whether there is an obstacle within the detection range of the laser texture component. Specifically, in some embodiments, the distance detection module 811 is specifically used to: obtain the initial binocular view currently collected by the binocular camera component; based on the initial binocular view, determine the distance between the obstacle closest to the drone and the drone; if the distance is less than or equal to the detection distance of the laser texture component, it is determined that there is an obstacle within the detection range of the laser texture component.

[0169] Furthermore, in some embodiments, the determination unit 81 further includes: a weak texture detection module 812, which is used to determine that the shooting scene of the binocular camera assembly is a weak texture scene. Specifically, in some embodiments, the weak texture detection module 812 is specifically used to: obtain one of the initial binocular views currently captured by the binocular camera assembly; perform gradient operation on one of the initial views to obtain the gradient value of each pixel point in one of the initial views; count the number N of pixel points whose gradient value is less than or equal to the gradient threshold; if the number N is less than or equal to the number threshold N th , it is determined that the shooting scene of the binocular camera assembly is a weak texture scene.

[0170] Alternatively, in some other embodiments, the determination unit 81 further includes: a repeated texture detection module 813, which is used to determine that the shooting scene of the binocular camera assembly is a repeated texture scene. Specifically, in some embodiments, the repeated texture detection module 813 is specifically used to: obtain the initial binocular view currently collected by the binocular camera assembly; perform stereo matching on the initial binocular view, and obtain the minimum cost value C corresponding to each matching block 1iand the next smallest value C 2i , where i represents the i-th matching block; if there is a matching block i that satisfies the following formula, it is determined that the shooting scene of the binocular camera assembly is a repeated texture scene:

[0171]

[0172] The value range of K is: 0.5≤K<1.

[0173] In addition, in some other embodiments, the determination unit 81 includes: a brightness detection module 814, which is used to determine whether the brightness of the environment in which the drone is located is lower than a preset value. Specifically, in some embodiments, the brightness detection module 814 is specifically used to: obtain one of the initial binocular views currently captured by the binocular camera assembly; and determine the brightness of the environment in which the drone is located according to the average grayscale value of each pixel in one of the initial views.

[0174] It should be noted that, since the obstacle detection device and the obstacle detection method in the above method embodiment are based on the same inventive concept, the corresponding contents of the above method embodiments are also applicable to the present device embodiment and will not be described in detail here.

[0175] It can be seen from the above technical scheme that the beneficial effect of the embodiment of the present invention is that: the obstacle detection device provided by the embodiment of the present invention starts the laser texture component through the control unit, so that the laser texture component presents a laser texture within the binocular viewing angle of the binocular camera component, which can enhance the texture characteristics of the scene shot by the binocular camera component. Therefore, without changing the original binocular matching algorithm and structure, the binocular stereo matching accuracy is improved, thereby improving the accuracy of obstacle detection.

[0176] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, i.e., may be located in one place, or may be distributed to multiple network units. Some or all of the units / modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0177] The embodiment of the present invention further provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors, for example, Figure 5 The one or more processors 123 may execute the obstacle detection method in any of the above method embodiments, for example, executing the above described Figure 6 or Figure 7 Method steps 210 to 240 in.

[0178] Through the description of the above implementation methods, a person of ordinary skill in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program in a computer program product, and the computer program can be stored in a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a drone, the drone can execute the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0179] The above product can execute the obstacle detection method provided in the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the obstacle detection method. For technical details not described in detail in this embodiment, please refer to the obstacle detection method provided in the embodiment of the present invention.

[0180] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they may still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. An obstacle detection method, applied to a drone, characterized in that: The drone includes a binocular camera component and a laser texture component, and the method includes: Determine to turn on the laser texturing component; activating the laser texturing component to emit a laser texture; Acquire the binocular view containing the laser texture collected by the binocular camera assembly, and set the binocular view containing the laser texture as a target binocular view; Perform obstacle detection based on the target binocular view; The step of determining to start the laser texturing component includes: Determining that there is an obstacle within the detection range of the laser texturing component; The determining that there is an obstacle within the detection range of the laser texturing component includes: Acquire an initial binocular view currently captured by the binocular camera assembly; Based on the initial binocular view, determining the distance between the obstacle closest to the drone and the drone; If the distance is less than or equal to the detection distance of the laser texture component, it is determined that there is an obstacle within the detection range of the laser texture component; Determine that the shooting scene of the binocular camera assembly is a weak texture scene, and if it is a weak texture scene, determine to turn on the laser texture assembly; The determining to start the laser texturing component further includes: Determining that the shooting scene of the binocular camera assembly is a repeated texture scene; The determining that the shooting scene of the binocular camera assembly is a repeated texture scene includes: Perform stereo matching on the initial binocular view and obtain the minimum cost value C corresponding to each matching block 1i and the next smallest value C 2i , where i represents the i-th matching block; If there is a matching block i that satisfies the following formula, it is determined that the shooting scene of the binocular camera assembly is a repeated texture scene: The value range of K is: 0.5≤K<1.

2. The method according to claim 1, characterized in that The determining that the shooting scene of the binocular camera assembly is a weak texture scene includes: Acquire one of the initial binocular views currently captured by the binocular camera assembly; Performing a gradient operation on one of the initial views to obtain a gradient value of each pixel in one of the initial views; Counting the number N of pixel points whose gradient values ​​are less than or equal to the gradient threshold; If the number N is less than or equal to the quantity threshold N th , it is determined that the shooting scene of the binocular camera assembly is a weak texture scene.

3. The method according to claim 1, characterized in that The step of determining to start the laser texturing component includes: It is determined that the brightness of the environment in which the drone is located is lower than a preset value.

4. The method according to claim 3, characterized in that The determining that the brightness of the environment in which the drone is located is lower than a preset value includes: Acquire one of the initial binocular views currently captured by the binocular camera assembly; According to the average gray value of each pixel in one of the initial views, it is determined that the brightness of the environment in which the drone is located is lower than the preset value.

5. An obstacle detection device, applied to a drone, characterized in that: The drone includes a binocular camera component and a laser texture component, and the obstacle detection device includes: A determination unit, used for determining to turn on the laser texturing component; A control unit, used to start the laser texturing component to emit laser texture; An image acquisition unit, used for acquiring a binocular view including the laser texture acquired by the binocular camera assembly, and setting the binocular view including the laser texture as a target binocular view; A detection unit, configured to detect obstacles based on the target binocular view; A distance detection module, used to determine whether there is an obstacle within the detection range of the laser texturing component; The distance detection module is specifically used for: Acquire an initial binocular view currently captured by the binocular camera assembly; Based on the initial binocular view, determining the distance between the obstacle closest to the drone and the drone; If the distance is less than or equal to the detection distance of the laser texture component, it is determined that there is an obstacle within the detection range of the laser texture component; The determining unit further includes: A weak texture detection module, used to determine whether the shooting scene of the binocular camera assembly is a weak texture scene, and if it is a weak texture scene, determine to turn on the laser texture assembly; A repeated texture detection module, used to determine that the shooting scene of the binocular camera assembly is a repeated texture scene; The repeated texture detection module is specifically used for: Determining that the shooting scene of the binocular camera assembly is a repeated texture scene; Perform stereo matching on the initial binocular view and obtain the minimum cost value C corresponding to each matching block 1i and the next smallest value C 2i , where i represents the i-th matching block; If there is a matching block i that satisfies the following formula, it is determined that the shooting scene of the binocular camera assembly is a repeated texture scene: The value range of K is: 0.5≤K<1.

6. The device according to claim 5, characterized in that The weak texture detection module is specifically used for: Acquire one of the initial binocular views currently captured by the binocular camera assembly; Performing a gradient operation on one of the initial views to obtain a gradient value of each pixel in one of the initial views; Counting the number N of pixel points whose gradient values ​​are less than or equal to the gradient threshold; If the number N is less than or equal to the quantity threshold N th , it is determined that the shooting scene of the binocular camera assembly is a weak texture scene.

7. The device according to claim 5, characterized in that The determining unit comprises: The brightness detection module is used to determine whether the brightness of the environment in which the drone is located is lower than a preset value.

8. The device according to claim 7, characterized in that The brightness detection module is specifically used for: Acquire one of the initial binocular views currently captured by the binocular camera assembly; According to the average gray value of each pixel in one of the initial views, it is determined that the brightness of the environment in which the drone is located is lower than the preset value.

9. A drone, characterized in that: include: body; An arm connected to the fuselage; A power device, arranged on the machine arm; A binocular camera assembly, which is arranged on the fuselage and is used to collect a binocular view in the moving direction of the drone; A laser texture component, which is disposed on the fuselage and is used to emit a laser texture that can be sensed by the binocular camera component; A processor, which is disposed in the body and is respectively connected to the binocular camera assembly and the laser texturing assembly; and A memory communicatively connected to the processor; wherein, The memory stores instructions that can be executed by the processor, and the instructions are executed by the processor to enable the processor to perform the method according to any one of claims 1 to 4.

10. A non-transitory computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to enable a drone to execute the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Patrol device obstacle detection method based on initiative structure light

    CN103884281A

  • Obstacle detection method based on monocular camera and active structured light

    CN104570147A

  • Unmanned plane danger-avoiding detection system and method based on lasers and binocular vision

    CN105138002A

  • Depth image acquisition method based on combination stereo matching and structured light

    CN106504284A

  • Edge-based parallax image calculation methods and devices applied to binocular stereo vision

    CN107316326A