Obstacle detection method, device, drone and storage medium
By using the pose data and parallax map of the drone to extract and cluster the strip-shaped parallax features of obstacles, the problem of short obstacle detection distance and many false detections in the existing technology is solved, and a more efficient and accurate detection method is achieved. Obstacle detection for drone devices with lightweight computing resources.
Patent Information
- Application Number
- CN202010651551.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-08
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-07-08
AI Technical Summary
Existing obstacle detection methods based on binocular sensors have short detection distances and too many false detections, resulting in insufficient obstacle avoidance capabilities during autonomous flight of UAVs.
By obtaining the pose data and disparity map of the drone, the pixel connectivity in the first specified direction in the disparity map is determined, the strip disparity features are extracted, and clustered to determine obstacle information. The method includes obtaining the correspondence between pose data and disparity map, performing pose correction and pixel connectivity detection, using safety equipotential lines to divide the detection area, and downsampling and compression processing to reduce computing resource consumption.
It improves the accuracy and reliability of obstacle detection, reduces detection time, is suitable for drone equipment with lightweight computing resources, and avoids the drift of obstacle information caused by drone movement.
Smart Images

Figure CN111899170B
Abstract
Description
Technical Field
[0001] The present application relates to the field of obstacle avoidance technology, and specifically to an obstacle detection method, device, drone and storage medium. Background Art
[0002] In drone delivery business, the ability of drones to avoid obstacles in autonomous flight is essential. In drone obstacle avoidance solutions, binocular sensors have gradually become one of the main sensors for most drone obstacle avoidance due to their advantages such as low price, low power consumption, low weight, and rich obstacle information. At present, most methods for obstacle detection based on binocular sensors directly use the disparity data or depth data calculated by binocular sensor matching and directly convert them into three-dimensional space points as obstacles. However, the disadvantages of this type of method are also obvious, such as short detectable distance, too many false detections, etc., which are not conducive to practical applications. Summary of the invention
[0003] In view of the above problems, the present application is proposed to provide an obstacle detection method, device, drone and storage medium that overcome the above problems or at least partially solve the above problems.
[0004] According to one aspect of the present application, there is provided an obstacle detection method, comprising: obtaining posture data and a disparity map of a drone, the posture data and the disparity map having a corresponding relationship; determining pixel connectivity in a first specified direction in the disparity map according to the posture data, and extracting strip disparity features from the disparity map according to the pixel connectivity; clustering the strip disparity features to obtain clustering information; and determining obstacle information according to the clustering information.
[0005] Optionally, in the above method, obtaining the pose data and disparity map of the drone includes: obtaining the original image captured by the image acquisition device of the drone; searching for pose data whose timestamp matches the original image in a pose data cache, and generating the disparity map based on the original image.
[0006] Optionally, in the above method, generating the disparity map according to the original image includes: generating an initial disparity map according to the original image; and compressing the initial disparity map to obtain the disparity map.
[0007] Optionally, in the above method, the compression processing includes: downsampling processing and / or compressing the pixel points along the second specified direction.
[0008] Optionally, in the above method, determining the pixel connectivity in the first specified direction in the disparity map based on the posture data of the drone includes: using the posture data to perform posture correction on the disparity map to obtain a corrected image; dividing the pixel points in the target area of the corrected image into multiple groups according to the first specified direction, and performing pixel connectivity detection on each group of pixel points.
[0009] Optionally, in the above method, the pixel connectivity detection includes: determining the spatial description information of each pixel point based on the disparity information of each pixel point and the posture data of the drone; determining the pixel connectivity based on the spatial description information of each pixel point and a preset spatial threshold, and the spatial threshold includes a height threshold and / or a distance threshold.
[0010] Optionally, in the above method, determining the pixel connectivity in the first specified direction in the disparity map based on the posture data of the drone also includes: determining the safety equipotential lines in the disparity map based on the posture data of the drone and a preset safe flight distance; and determining the target area in the corrected image that requires pixel connectivity detection based on the safety equipotential lines.
[0011] According to another aspect of the present application, an obstacle detection device is provided, including: an acquisition unit, used to acquire posture data and a disparity map of a drone, the posture data and the disparity map having a corresponding relationship; a feature extraction unit, used to determine the pixel connectivity in a first specified direction in the disparity map according to the posture data, and extract strip disparity features from the disparity map according to the pixel connectivity; a clustering unit, used to cluster the strip disparity features to obtain clustering information; and an obstacle information unit, used to determine obstacle information based on the clustering information.
[0012] Optionally, in the above-mentioned device, the acquisition unit is used to acquire the original image captured by the image acquisition device of the drone; search for the pose data whose timestamp matches the original image in the pose data cache area, and generate the disparity map based on the original image.
[0013] Optionally, in the above device, the acquisition unit is used to generate an initial disparity map according to the original image; and compress the initial disparity map to obtain the disparity map.
[0014] Optionally, in the above device, the acquisition unit is used to downsample the initial disparity map and / or compress the pixels in the initial disparity map along a second specified direction.
[0015] Optionally, in the above-mentioned device, the feature extraction unit is used to use the posture data to perform posture correction on the disparity map to obtain a corrected image; divide the pixel points in the target area of the corrected image into multiple groups according to a first specified direction, and perform pixel connectivity detection on each group of pixel points.
[0016] Optionally, in the above-mentioned device, the feature extraction unit is used to determine the spatial description information of each pixel point based on the disparity information of each pixel point and the posture data of the drone; determine the pixel connectivity based on the spatial description information of each pixel point and a preset spatial threshold, and the spatial threshold includes a height threshold and / or a distance threshold.
[0017] Optionally, in the above-mentioned device, the feature extraction unit is used to determine the safety equipotential lines in the disparity map according to the posture data of the drone and a preset safe flight distance; and determine the target area in the corrected image that needs to be tested for pixel connectivity according to the safety equipotential lines.
[0018] According to another aspect of the present application, a drone is provided, comprising: a processor; and a memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor executes any of the methods described above.
[0019] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, they implement any of the methods described above.
[0020] As can be seen from the above, the technical solution of the present application uses the posture data and disparity map of the drone with corresponding relationship to extract strip disparity features, and determines the obstacle information according to the clustering information of the strip disparity feature clustering. This technical solution uses the posture data of the drone when detecting obstacles, which can avoid the drift of obstacle information caused by the drone's own movement, and the whole process is low in complexity and consumes less computing resources. It reduces the obstacle detection time while ensuring the obstacle detection accuracy, and is particularly suitable for equipment such as drones that rely on lightweight computing resources for obstacle detection.
[0021] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0023] Figure 1 A schematic diagram of a process of an obstacle detection method according to an embodiment of the present application is shown;
[0024] Figure 2 A schematic diagram of an obstacle detection process according to an embodiment of the present application is shown;
[0025] Figure 3 A flow chart of strip disparity feature extraction according to an embodiment of the present application is shown;
[0026] Figure 4 The effect diagram of marking strip-shaped parallax features and contour lines in the image taken by the drone is shown;
[0027] Figure 5 A schematic structural diagram of an obstacle detection device according to an embodiment of the present application is shown;
[0028] Figure 6 A schematic diagram of the structure of a drone according to an embodiment of the present application is shown;
[0029] Figure 7 A schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0030] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0031] Figure 1 FIG. 1 is a flow chart of an obstacle detection method according to an embodiment of the present application. Figure 1 As shown, the obstacle detection method includes:
[0032] Step S110, obtaining the posture data and disparity map of the drone, wherein the posture data and the disparity map have a corresponding relationship.
[0033] Posture data mainly refers to position data and attitude data, which can be obtained through the UAV's flight control system (flight control). Since the UAV also needs to rely on posture data during normal flight, the acquisition of posture data can be achieved without adding additional hardware.
[0034] The disparity map is usually obtained by calculating the disparity value of the original image collected by a multi-eye sensor (currently the most commonly used is a binocular camera). The pixel points in the disparity map have image coordinates (x, y) and disparity values d.
[0035] Step S120 , determining pixel connectivity in a first specified direction in the disparity map according to the posture data, and extracting strip disparity features from the disparity map according to the pixel connectivity.
[0036] For example, the first specified direction is the column direction, then determining the pixel connectivity in the first specified direction is actually determining whether adjacent pixels in the same column are connected. The result of the determination is clustering the pixels according to the pixel connectivity, and what is obtained is a line composed of pixel points, that is, a strip parallax feature.
[0037] Step S130: clustering the strip disparity features to obtain clustering information. Thus, the strip disparity features corresponding to the same obstacle can be clustered into one category.
[0038] Step S140, determining obstacle information according to cluster information. Specifically, feature extraction may be performed on the cluster information, and the extracted features include but are not limited to the distance to the obstacle, the three-dimensional size, geometric shape, category, posture, etc. of the obstacle.
[0039] visible, Figure 1 The method shown utilizes the posture data of the drone when detecting obstacles, which can avoid the drift of obstacle information caused by the drone's own movement. The entire process has low complexity and consumes less computing resources. It reduces the obstacle detection time while ensuring the obstacle detection accuracy. It is particularly suitable for devices such as drones that rely on lightweight computing resources for obstacle detection.
[0040] In one embodiment of the present application, in the above method, obtaining the pose data and disparity map of the drone includes: obtaining the original image captured by the image acquisition device of the drone; searching for pose data whose timestamp matches the original image in the pose data cache, and generating a disparity map based on the original image.
[0041] Specifically, the pose data and the original image can be time-stamp aligned in advance to ensure the correspondence between the pose data and the original image, thereby ensuring the correspondence between the pose data and the disparity map. A pose data cache can be set to facilitate the search of pose data. Since the generation frequency of pose data is not necessarily consistent with the acquisition frequency of the original image, there may be multiple pose data with timestamps matching the original image. In this case, the pose data corresponding to the timestamp can be interpolated based on these found pose data.
[0042] The disparity map can be generated by any method in the prior art, which will not be described in detail here.
[0043] In one embodiment of the present application, in the above method, generating a disparity map according to the original image includes: generating an initial disparity map according to the original image; and compressing the initial disparity map to obtain the disparity map.
[0044] Drones and other devices have strict requirements on weight and power consumption, so it is difficult to deploy high-computing hardware such as GPUs. Therefore, in order to reduce the demand for computing resources and power, the initial disparity map can be compressed to reduce the consumption of subsequent processing. Compression here mainly refers to the compression of information volume, ensuring effective information as much as possible and discarding redundant information.
[0045] In one embodiment of the present application, in the above method, the compression processing includes: downsampling processing and / or compressing the pixel points along the second specified direction.
[0046] Downsampling can reduce the size of the image. The disparity map after downsampling can speed up the subsequent processing while retaining the obstacle information. In one embodiment, the disparity map can be downsampled to a size of 640×480, and the interpolation method of downsampling can use the nearest neighbor interpolation to ensure that the distance corresponding to each pixel is the real value.
[0047] In addition, the pixels can be compressed along the second specified direction, which can be perpendicular to the first specified direction. For example, if the first specified direction is the column direction, the second specified direction is the row direction. For example, when the compression ratio is 5, an image with a width of 640 and a height of 480 will be compressed to an image with a width of 128 and a height of 480. During compression, all valid pixels can be sampled by median filtering. The digital units in the above examples are all pixels.
[0048] In one embodiment of the present application, in the above method, determining the pixel connectivity in the first specified direction in the disparity map based on the posture data of the drone includes: performing posture correction on the disparity map using the posture data to obtain a corrected image; dividing the pixel points in the target area of the corrected image into multiple groups according to the first specified direction, and performing pixel connectivity detection on each group of pixel points.
[0049] When the drone performs actions such as turning and lateral flight, there will be a rolling angle, which will cause the original image collected to no longer be vertical, and thus the disparity map will also be non-vertical. Therefore, using the posture data to correct the disparity image can avoid image distortion affecting the obstacle detection effect.
[0050] For multiple groups of pixel points that are divided (for example, if divided by columns, multiple columns of pixel points are obtained), pixel connectivity detection can be performed in parallel to improve efficiency.
[0051] In one embodiment of the present application, in the above method, pixel connectivity detection includes: determining the spatial description information of each pixel point based on the disparity information of each pixel point and the posture data of the drone; determining the pixel connectivity based on the spatial description information of each pixel point and a preset spatial threshold, the spatial threshold including a height threshold and / or a distance threshold.
[0052] The spatial description information can be the coordinate information of the target corresponding to the pixel in the world coordinate system. Obstacles are often not isolated points, but occupy a part of the space. Therefore, obstacles in the image should also correspond to an area. Then, according to whether the spatial description information of the pixels in the area is similar, it can be determined whether two pixels correspond to the same obstacle. Pixel connectivity detection is also designed and implemented based on the above ideas.
[0053] In one embodiment of the present application, in the above method, determining the pixel connectivity in the first specified direction in the disparity map based on the posture data of the drone also includes: determining the safety equipotential lines in the disparity map based on the posture data of the drone and a preset safe flight distance; and determining the target area in the corrected image that requires pixel connectivity detection based on the safety equipotential lines.
[0054] The images taken by drones actually contain many areas where drones will not fly, such as the lower space above the ground. This also means that when performing obstacle detection based on the disparity map, many obstacles near the ground do not need to be paid attention to. Therefore, the concept of safety equipotential lines can be introduced, that is, the safety equipotential lines are used to divide the target areas in the image that need to be paid attention to (pixel connectivity detection is required) and the areas that do not need to be paid attention to. Specifically, the safety equipotential lines can be safety contour lines, which can be defined as the height at which the drone is guaranteed not to collide when flying forward at the current flight altitude, and the lines connected at the y coordinates on the horizontal coordinate x of the image. For example, if the current drone flight altitude is 20 meters, assuming that the drone will not collide with obstacles below 5 meters below the drone, the line formed on the disparity map corresponding to the height of 15 meters is the safety contour line. The disparity map below the safety contour line can be left unprocessed, because the obstacles corresponding to this part of the image will not pose a threat to the flight safety of the drone.
[0055] The following is a more specific implementation method for describing the possible implementation process of the solution of the present application.
[0056] Figure 2 FIG. 2 shows a schematic diagram of an obstacle detection process according to an embodiment of the present application. Figure 2 As shown, the specific process includes:
[0057] Step S210 , based on the binocular image (original image) captured by the binocular camera, a general binocular stereo matching technology is used to generate a disparity map.
[0058] Step S220: Downsampling the disparity map according to actual needs.
[0059] In step S230 , the pixels of the disparity map processed in step S220 are compressed along the horizontal axis.
[0060] Step S240, align the flight control posture data and the binocular image with the timestamp to ensure the accuracy of the binocular parallax data projected to the world coordinates. A cache area for the posture rotation and translation matrix can be set. When the binocular image arrives, the two posture data closest to the binocular image timestamp are selected in the cache area, and interpolation is performed to obtain the accurate binocular camera position posture data when the binocular camera is exposed.
[0061] Step S250: extracting strip disparity features.
[0062] Step S260, calculating the safety contour H(x) of the drone in the disparity map.
[0063] Step S270: cluster the strip disparity features to obtain cluster information. This step may use a conventional point cloud clustering method, such as Euclidean clustering.
[0064] Step S280: Extract features from the clustering information, such as the distance to the obstacle, the three-dimensional size, geometric shape, category, and pose of the obstacle.
[0065] Step S290: Determine the obstacle information based on the features extracted from the clustering information for obstacle avoidance.
[0066] Figure 3 The flowchart shows the extraction of strip parallax features according to an embodiment of the present application. Figure 3 Each step of can be considered a sub-step of the above step S250. For example, Figure 3 As shown, for the compressed parallax map, in step S310, it is first corrected using the roll angle.
[0067] Step S320: Judge whether the number of columns x of the image is less than the image width. If it is greater than or equal to the image width, end all calculations and output the middle-level features of all columns. Since the processing of different columns is independent of each other, the steps of different columns can be accelerated by parallel computing.
[0068] Step S330: Judge whether the number of rows y of the image is less than the image height. If it is greater than or equal to the image height, exit the calculation of column x.
[0069] Step S340: For the valid pixel points I(x, y, d) on the parallax image (where x and y are the coordinates of the pixel points in the image, and d is the parallax value), calculate the corresponding coordinates (X, Y, Z) of the pixel points in the world coordinate system according to the pose data.
[0070] Step S350: Judge whether Z in the world coordinate points (X, Y, Z) is less than the height value of the safety equipotential line H(x). If it is less than the height value, terminate the calculation of column x. Otherwise, perform step S360.
[0071] Step S360: Judge whether the current pixel point (x, y, d1), world coordinates (X1, Y1, Z1) can be connected to the upper pixel point (x, y - 1, d2), world coordinates (X2, Y2, Z2). The judgment criteria are: the height difference is less than the height threshold, that is, abs(Y1 - Y2) < Thresh_Y; and, the distance difference is less than the distance threshold, that is, abs(Z1 - Z2) < Thresh_Z.
[0072] If the judgment in step S360 passes, execute step S370 to merge the pixel point into the upper strip parallax feature.
[0073] If the judgment in step S370 fails, then execute step S380, which means that the calculation of the strip parallax feature ending with the upper pixel point (x, y - 1, d2) is completed, and it is stored.
[0074] Step S390 , starting from the current pixel (x, y, d1), a new strip disparity feature is determined.
[0075] Figure 4 The effect diagram of marking strip parallax features and contour lines in the image taken by the drone is shown. Figure 4 There is an isolated tree on the left and a row of trees on the right. The dark strip image with clearly distinguishable shapes is the display effect of the strip parallax feature. The curved line below the dark strip image is the safety contour line. The horizontal line in the middle is the line corresponding to the drone's roll angle.
[0076] Figure 5 FIG. 2 shows a schematic diagram of the structure of an obstacle detection device according to an embodiment of the present application. Figure 5 As shown, the obstacle detection device 500 includes:
[0077] The acquisition unit 510 is used to acquire the posture data and disparity map of the drone, and the posture data and the disparity map have a corresponding relationship.
[0078] Posture data mainly refers to position data and attitude data, which can be obtained through the UAV's flight control system (flight control). Since the UAV also needs to rely on posture data during normal flight, the acquisition of posture data can be achieved without adding additional hardware.
[0079] The disparity map is usually obtained by calculating the disparity value of the original image collected by a multi-eye sensor (currently the most commonly used is a binocular camera). The pixel points in the disparity map have image coordinates (x, y) and disparity values d.
[0080] The feature extraction unit 520 is used to determine the pixel connectivity in the first specified direction in the disparity map according to the posture data, and extract the strip disparity feature from the disparity map according to the pixel connectivity.
[0081] For example, the first specified direction is the column direction, then determining the pixel connectivity in the first specified direction is actually determining whether adjacent pixels in the same column are connected. The result of the determination is clustering the pixels according to the pixel connectivity, and what is obtained is a line composed of pixel points, that is, a strip parallax feature.
[0082] The clustering unit 530 is used to cluster the strip disparity features to obtain clustering information, so that the strip disparity features corresponding to the same obstacle can be clustered into one category.
[0083] The obstacle information unit 540 is used to determine obstacle information according to the clustering information.
[0084] Specifically, feature extraction may be performed on the clustering information, and the extracted features include but are not limited to the distance to the obstacle, the three-dimensional size, geometric shape, category, posture, etc. of the obstacle.
[0085] visible, Figure 5 The device shown utilizes the posture data of the drone when detecting obstacles, which can avoid the drift of obstacle information caused by the drone's own movement. The entire process has low complexity and consumes less computing resources. It reduces the obstacle detection time while ensuring the obstacle detection accuracy. It is particularly suitable for equipment such as drones that rely on lightweight computing resources for obstacle detection.
[0086] In one embodiment of the present application, in the above-mentioned device, the acquisition unit 510 is used to obtain the original image captured by the image acquisition device of the drone; search for the pose data whose timestamp matches the original image in the pose data cache area, and generate a disparity map based on the original image.
[0087] In one embodiment of the present application, in the above-mentioned device, the acquisition unit 510 is used to generate an initial disparity map according to the original image; and compress the initial disparity map to obtain the disparity map.
[0088] In one embodiment of the present application, in the above-mentioned apparatus, the acquisition unit 510 is configured to perform downsampling processing on the initial disparity map and / or compress the pixels in the initial disparity map along the second specified direction.
[0089] In one embodiment of the present application, in the above-mentioned device, the feature extraction unit 520 is used to perform posture correction on the disparity map using posture data to obtain a corrected image; divide the pixel points in the target area of the corrected image into multiple groups according to a first specified direction, and perform pixel connectivity detection on each group of pixel points.
[0090] In one embodiment of the present application, in the above-mentioned device, the feature extraction unit 520 is used to determine the spatial description information of each pixel point based on the disparity information of each pixel point and the posture data of the drone; determine the pixel connectivity based on the spatial description information of each pixel point and a preset spatial threshold, and the spatial threshold includes a height threshold and / or a distance threshold.
[0091] In one embodiment of the present application, in the above-mentioned device, the feature extraction unit 520 is used to determine the safety equipotential lines in the disparity map according to the posture data of the UAV and the preset safe flight distance; and determine the target area in the corrected image that needs to be tested for pixel connectivity according to the safety equipotential lines.
[0092] It should be noted that the specific implementation of the above-mentioned device embodiments can be carried out with reference to the specific implementation of the above-mentioned corresponding method embodiments, which will not be repeated here.
[0093] In summary, the technical solution of the present application utilizes the posture data and disparity map of the drone with corresponding relationship to extract strip disparity features, and determines the obstacle information based on the clustering information of the strip disparity feature clustering. This technical solution utilizes the posture data of the drone when detecting obstacles, which can avoid the drift of obstacle information caused by the drone's own movement, and the whole process is low in complexity and consumes less computing resources. It reduces the obstacle detection time while ensuring the obstacle detection accuracy, and is particularly suitable for equipment such as drones that rely on lightweight computing resources for obstacle detection.
[0094] It should be noted that:
[0095] The algorithm and display provided herein are not inherently related to any particular computer, virtual device or other equipment. Various general purpose devices can also be used together with the teachings based on this. According to the above description, it is obvious to construct the structure required for this type of device. In addition, the application is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the application described herein, and the description of the specific language above is for the purpose of disclosing the best mode of the application.
[0096] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0097] Similarly, it should be understood that in order to streamline the present application and help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be interpreted as reflecting the following intention: the claimed application requires more features than the features clearly stated in each claim. More specifically, as reflected in the claims below, the inventive aspects are less than all the features of the single embodiment disclosed above. Therefore, the claims following the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present application.
[0098] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0099] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present application and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.
[0100] The various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the obstacle detection device according to the embodiment of the present application. The present application may also be implemented as a device or device program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present application may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0101] For example, Figure 6A schematic diagram of the structure of a drone according to an embodiment of the present application is shown. The drone 600 includes a processor 610 and a memory 620 arranged to store computer executable instructions (computer readable program code). The memory 620 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. The memory 620 has a storage space 630 for storing a computer readable program code 631 for executing any method step in the above method. For example, the storage space 630 for storing computer readable program code may include individual computer readable program codes 631 for implementing various steps in the above method, respectively. The computer readable program code 631 may be read from or written to one or more computer program products. These computer program products include program code carriers such as a hard disk, a compact disk (CD), a memory card or a floppy disk. Such a computer program product is typically, for example Figure 7 The computer-readable storage medium. Figure 7 A schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable storage medium 700 stores a computer-readable program code 631 for executing the method steps according to the present application, which can be read by the processor 610 of the drone 600. When the computer-readable program code 631 is executed by the drone 600, the drone 600 executes the various steps in the method described above. Specifically, the computer-readable program code 631 stored in the computer-readable storage medium can execute the method shown in any of the above embodiments. The computer-readable program code 631 can be compressed in an appropriate form.
[0102] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets should not be constructed as a limitation to the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names.
Claims
1. An obstacle detection method, characterized in that: include: Acquire the posture data and disparity map of the drone, wherein the posture data and the disparity map have a corresponding relationship; Determine pixel connectivity in a first specified direction in the disparity map according to the pose data, and extract strip disparity features from the disparity map according to the pixel connectivity; Clustering the strip-shaped disparity features to obtain clustering information; Determining obstacle information according to the clustering information; Wherein, determining the pixel connectivity in the first specified direction in the disparity map according to the posture data of the drone includes: Performing posture correction on the disparity map using the posture data to obtain a corrected image; Dividing the pixel points in the target area of the corrected image into a plurality of groups according to a first specified direction, and performing pixel connectivity detection on each group of pixel points; Wherein, determining the pixel connectivity in the first specified direction in the disparity map according to the posture data of the drone also includes: Determining the safety equipotential lines in the disparity map according to the posture data of the UAV and a preset safe flight distance; Determining a target area in the corrected image that needs to be subjected to pixel connectivity detection according to the safety equipotential lines; The safety equipotential line is used to represent the height at which the UAV is guaranteed not to collide when flying, and the target area is an area where the corresponding safety equipotential line is higher than a preset height when the UAV is flying.
2. The method according to claim 1, characterized in that The step of obtaining the posture data and disparity map of the drone includes: Obtaining the original image captured by the image acquisition device of the UAV; The pose data having a timestamp matching the original image is searched in the pose data buffer area, and the disparity map is generated according to the original image.
3. The method according to claim 2, characterized in that Generating the disparity map according to the original image comprises: generating an initial disparity map according to the original image; The initial disparity map is compressed to obtain the disparity map.
4. The method according to claim 3, characterized in that The compression process includes: downsampling process and / or compressing the pixel points along the second specified direction.
5. The method according to claim 1, characterized in that The pixel connectivity detection comprises: Determine the spatial description information of each pixel point based on the parallax information of each pixel point and the posture data of the drone; The pixel connectivity is determined according to the spatial description information of each pixel point and a preset spatial threshold, where the spatial threshold includes a height threshold and / or a distance threshold.
6. An obstacle detection device, characterized in that: include: An acquisition unit, used to acquire the posture data and disparity map of the drone, wherein the posture data and the disparity map have a corresponding relationship; a feature extraction unit, configured to determine pixel connectivity in a first specified direction in the disparity map according to the pose data, and extract strip disparity features from the disparity map according to the pixel connectivity; A clustering unit, used for clustering the strip disparity features to obtain clustering information; An obstacle information unit, used to determine obstacle information according to the clustering information; The feature extraction unit is specifically used for: Performing posture correction on the disparity map using the posture data to obtain a corrected image; Dividing the pixel points in the target area of the corrected image into a plurality of groups according to a first specified direction, and performing pixel connectivity detection on each group of pixel points; The feature extraction unit is further specifically used for: Determining the safety equipotential lines in the disparity map according to the posture data of the UAV and a preset safe flight distance; Determining a target area in the corrected image that needs to be subjected to pixel connectivity detection according to the safety equipotential lines; The safety equipotential line is used to represent the height at which the UAV is guaranteed not to collide when flying, and the target area is an area where the corresponding safety equipotential line is higher than a preset height when the UAV is flying.
7. A drone, characterized in that: The drone comprises: a processor; and a memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor performs the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, the method according to any one of claims 1 to 5 is implemented.
