WO2020114432A1 - 一种水面检测方法、装置和无人机 - Google Patents

一种水面检测方法、装置和无人机 Download PDF

Info

Publication number
WO2020114432A1
WO2020114432A1 PCT/CN2019/123071 CN2019123071W WO2020114432A1 WO 2020114432 A1 WO2020114432 A1 WO 2020114432A1 CN 2019123071 W CN2019123071 W CN 2019123071W WO 2020114432 A1 WO2020114432 A1 WO 2020114432A1
Authority
WO
WIPO (PCT)
Prior art keywords
gradient amplitude
pixel
area
image
drone
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2019/123071
Other languages
English (en)
French (fr)
Inventor
吕浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Autel Robotics Co Ltd
Original Assignee
Autel Robotics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Autel Robotics Co Ltd filed Critical Autel Robotics Co Ltd
Publication of WO2020114432A1 publication Critical patent/WO2020114432A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C11/00Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying

Definitions

  • Embodiments of the present invention relate to the technical field of unmanned aerial vehicles, and in particular, to a water surface detection method, device, and unmanned aerial vehicle.
  • drones have been widely used in military and civilian fields. At present, drones have been able to achieve autonomous flight, and can independently complete reconnaissance, aerial photography, surveying and mapping tasks.
  • the inventor found that there are at least the following problems in the related art: when the drone autonomously landed, because it was impossible to determine whether the landing destination was the water surface, the drone easily landed on the water surface by mistake, which caused damage.
  • the purpose of the embodiments of the present invention is to provide a water surface detection method, device and drone, which can determine whether there is a water surface at the landing destination before the drone is landed, thereby reducing the damage caused by the drone landing on the water surface by mistake.
  • an embodiment of the present invention provides a water surface detection method for a drone.
  • the detection method includes:
  • the determining whether there is more than a predetermined number of light spots in the image includes:
  • the obtaining the number of light spots in the image includes:
  • each gradient amplitude of the pixel indicates the magnitude of the change in brightness of the pixel in the preset direction
  • the number of local peaks is counted, and the number of local peaks is taken as the number of light spots.
  • the obtaining the gradient amplitude of each pixel in the image according to the brightness value of each pixel in the image includes:
  • the gradient amplitude value of each pixel point is obtained according to the first direction gradient amplitude value and the second direction gradient amplitude value of each pixel point.
  • the searching for the local peak in the image according to the gradient amplitude of each pixel after the binarization process includes:
  • the first area and the second area are obtained with the pixel as the center.
  • the area of the second area is larger than the area of the first area. If the gradient amplitude in the first area is the number of the first value and If the number of gradient amplitude values in the second area is the same as the first value, the first area is a local peak;
  • S2 repeatedly execute S1 until each pixel in the image is traversed.
  • S1 if the first region is a local peak, then S1 further includes:
  • the gradient amplitude of the pixels in the first area is set to a zero value.
  • the first area is a first square area centered on the pixel point and the inscribed radius is the first pixel radius
  • the second area is centered on the pixel point and inscribed A second square area with a radius of a second pixel radius, the second pixel radius being greater than the first pixel radius.
  • the image is a grayscale image.
  • the water surface detection method further includes:
  • the drone is controlled to descend until the flying height of the drone is less than the specified height to ensure that the drone can generate the water surface ripples.
  • an embodiment of the present invention provides a water surface detection device for a drone.
  • the detection device includes:
  • An airflow generation module used to control the drone to generate airflow, and the airflow is used to generate water surface ripples;
  • An image acquisition module for acquiring an image of the landing area of the drone, wherein the light spot is an area whose brightness value is higher than the brightness value of the preset area around it;
  • the image processing module is used to determine whether there is more than a preset number of light spots in the image, and if the image processing module determines that there is more than a preset number of light spots in the image, it is determined that there is a water surface in the landing area.
  • the image processing module is specifically used to:
  • the image processing module includes:
  • the gradient amplitude acquisition submodule is used to acquire the gradient amplitude of each pixel in the image according to the brightness value of each pixel in the image, and the gradient amplitude of each pixel indicates that the pixel is in Set the magnitude of the change in brightness in the direction;
  • a binarization processing sub-module which is used to binarize the gradient amplitude of each pixel point, and set the gradient amplitude greater than or equal to the second preset gradient amplitude as the first value, and Setting the gradient amplitude value less than the second preset gradient amplitude value to zero;
  • a local peak search sub-module for searching for local peaks in the image according to the gradient amplitude of each pixel after the binarization process
  • the statistics sub-module is used to count the number of local peaks, and use the number of local peaks as the number of light spots.
  • the gradient amplitude acquisition sub-module is specifically used to:
  • the gradient amplitude value of each pixel point is obtained according to the first direction gradient amplitude value and the second direction gradient amplitude value of each pixel point.
  • the local peak search submodule is specifically used to:
  • the first area and the second area are obtained with the pixel as the center.
  • the area of the second area is larger than the area of the first area. If the gradient amplitude in the first area is the number of the first value and If the number of gradient amplitude values in the second area is the same as the first value, the first area is a local peak;
  • S2 repeatedly execute S1 until each pixel in the image is traversed.
  • the local peak search sub-module is further specifically used for:
  • the gradient amplitude of the pixels in the first area is set to zero.
  • the first area is a first square area centered on the pixel point and the inscribed radius is the first pixel radius
  • the second area is centered on the pixel point and inscribed A second square area with a radius of a second pixel radius, the second pixel radius being greater than the first pixel radius.
  • the image is a grayscale image.
  • the water surface detection device further includes:
  • the altitude control module is used to determine whether the flying height of the drone is less than the specified altitude
  • the drone is controlled to descend until the flying height of the drone is less than the specified height to ensure that the drone can generate the water surface ripples.
  • an embodiment of the present invention provides a drone.
  • the drone includes:
  • a machine arm connected to the fuselage
  • a power device the power device includes a motor provided on the arm and a propeller connected to the motor;
  • An image acquisition device which is provided on the fuselage, is used to acquire images of the landing area of the drone;
  • a flight control chip is provided on the fuselage, and the image acquisition device is electrically connected to the flight control chip;
  • a vision chip is provided on the fuselage, and the vision chip is electrically connected to the image acquisition device and the flight control chip;
  • the flight control chip is used for:
  • the vision chip is used for:
  • the vision chip is specifically used for:
  • the vision chip is specifically used for:
  • each gradient amplitude of the pixel indicates the magnitude of the change in brightness of the pixel in the preset direction
  • the number of local peaks is counted, and the number of local peaks is taken as the number of light spots.
  • the vision chip is specifically used for:
  • the gradient amplitude value of each pixel point is obtained according to the first direction gradient amplitude value and the second direction gradient amplitude value of each pixel point.
  • the vision chip is specifically used for:
  • the first area and the second area are obtained with the pixel as the center.
  • the area of the second area is larger than the area of the first area. If the gradient amplitude in the first area is the number of the first value and If the number of gradient amplitude values in the second area is the same as the first value, the first area is a local peak;
  • S2 repeatedly execute S1 until each pixel in the image is traversed.
  • the vision chip is specifically used for:
  • the gradient amplitude of the pixels in the first area is set to zero.
  • the first area is a first square area centered on the pixel point and the inscribed radius is the first pixel radius
  • the second area is centered on the pixel point and inscribed A second square area with a radius of a second pixel radius, the second pixel radius being greater than the first pixel radius.
  • the image is a grayscale image.
  • the flight control chip is also used to:
  • the drone is controlled to descend until the flying height of the drone is less than the specified height to ensure that the drone can generate the water surface ripples.
  • an embodiment of the present invention provides a non-volatile computer-readable storage medium that stores computer-executable instructions.
  • the drone is caused to perform the method as described above.
  • the water surface detection method, device and drone of the embodiments of the present invention control the drone to generate airflow to cause ripples in the landing area containing the water surface, and then determine the landing by determining whether there are more than a preset number of light spots in the landing area image Whether the area contains water surface can reduce the damage caused by the drone landing on the water surface by mistake.
  • FIG. 1 is a schematic diagram of an application scenario of a water surface detection method and device according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of the hardware structure of an embodiment of the drone of the present invention.
  • FIG. 3 is a schematic flowchart of an embodiment of the water surface detection method of the present invention.
  • FIG. 4 is a schematic flowchart of a step of obtaining the number of light spots in an image in an embodiment of the water surface detection method of the present invention
  • FIG. 5 is a gradient diagram in the X direction and a gradient diagram in the Y direction of the grayscale image in the embodiment of the present invention
  • FIG. 6 is a two-level gradient diagram in the X direction and a two-level gradient diagram in the Y direction of the grayscale image in the embodiment of the present invention
  • FIG. 7 is a schematic diagram of the grayscale image in the X direction and the Y gradient in the X direction and the original grayscale image after the second step is multiplied;
  • FIG. 8 is a schematic diagram and an original gray-scale image after binarization processing is performed on the product of the two-step gradient in the X direction and the two-step gradient in the Y direction in an embodiment of the present invention
  • FIG. 9 is a schematic structural view of an embodiment of the water surface detection device of the present invention.
  • FIG. 10 is a schematic structural view of an embodiment of the water surface detection device of the present invention.
  • FIG. 11 is a schematic structural view of an image processing module in an embodiment of the water surface detection device of the present invention.
  • FIG. 12 is a schematic diagram of the hardware structure of an embodiment of the drone of the present invention.
  • FIG. 13 is a schematic diagram of the hardware structure of the flight control chip in an embodiment of the drone of the present invention.
  • FIG. 14 is a schematic diagram of the hardware structure of the vision chip in an embodiment of the drone of the present invention.
  • the water surface detection method, device and drone provided in the embodiments of the present invention are suitable for the application scenario shown in FIG. 1, and the application scenario includes the drone 10 and the landing area 20.
  • the embodiment of the present invention can be applied to the occasion where the UAV 10 needs to land autonomously during autonomous flight.
  • the landing area 20 is an area where the drone 10 is about to land, and may be flat ground, mountain, or water.
  • the water surface will cause the drone 10 to be damaged.
  • the drone 10 autonomously lands it is necessary to determine whether the landing area 20 includes the water surface. If the drone 10 includes the water surface, it cannot be landed. Otherwise, the drone may be damaged.
  • the UAV 10 may be any suitable type of high-altitude or low-altitude aircraft, including fixed-wing unmanned aerial vehicles and rotary-wing unmanned aerial vehicles, such as helicopters, quadrotors, and aircraft having other numbers of rotors and/or rotor configurations.
  • the UAV 10 may also be other movable objects, such as manned vehicles, aerial models, unmanned airships, and unmanned hot air balloons.
  • FIG. 2 FIG. 2 only partially shows the composition of the drone 10.
  • the drone 10 includes a fuselage 11, an arm connected to the fuselage 11, a power device, and a device.
  • the power device is used to provide thrust and lift for the UAV 10 to fly, and includes a motor and wings driven by the motor, such as a motor provided on the arm and a propeller connected to the motor.
  • the control system is the central nerve of the UAV 10, and may include multiple functional units, such as a flight control system, a vision system, and other systems with specific functions.
  • the vision system includes an image acquisition device 12 and a vision chip 14 and the like, and the flight control system includes various sensors (such as a gyroscope and an accelerometer) and a flight control chip 15 and the like.
  • the drone 10 includes an airflow generating device 13 for generating airflow, so that when the landing area 20 contains the water surface, the airflow will generate ripples on the water surface.
  • the airflow generating device 13 may be a wing of the drone 10, such as a propeller of a rotorcraft, and the propeller may cause ripples on the water surface when rotating.
  • the airflow generating device 13 may also be a separately provided fan blade driven by a motor. For example, in a fixed-wing aircraft, a fan blade driven by a motor may be provided under the fuselage of the drone 10. The rotation of the leaves can cause ripples on the water surface.
  • the image acquisition device 12 is used to acquire images of the landing area 20, such as a high-definition camera or a motion camera.
  • the image acquisition device 12 may be disposed at any suitable location that is favorable for photographing the landing area 20.
  • the image acquisition device 12 is disposed at the bottom of the fuselage 11 to facilitate capturing images of the landing area 20 located below the drone 10 .
  • the vision chip 14 is used to process and recognize the image collected by the image collecting device 12, determine whether there is a water surface feature in the image, and determine whether the landing area 20 includes the water surface.
  • Various sensors of the flight control system can obtain the position and flight attitude of the UAV 10, and the flight control chip 15 is used to control the flight attitude of the UAV 10.
  • the flight control chip 15 controls the drone 10 to land, and when the visual chip 14 recognizes that the landing area 20 includes the water surface, the flight control chip 15 controls the drone 10 to stop landing or Fly to other places suitable for landing.
  • the ripples of the water surface will produce a sparkling effect under the light, and multiple spots will be formed in the image.
  • This spot can be used as a dynamic feature of the water surface, by judging whether the image of the landing area 20 Including a certain number of light spots can determine whether the landing area 20 includes the water surface.
  • the airflow generation device 13 of the drone 10 can be controlled by the flight control chip 15 to generate airflow, and then the vision chip 14 can acquire the image of the landing area 20 collected by the image acquisition device 12 and process and judge the image Whether the image contains more than a preset number of light spots, if it contains more than a preset number of light spots, it is determined that the landing area 20 has a water surface, otherwise, it is determined that the landing area 20 does not have a water surface.
  • the vision chip 14 determines that there is no water surface in the landing area 20, the flight control chip 15 is notified to control the drone 10 to land, and when the vision chip 14 determines that the landing area 20 has water surface, the flight control chip 15 is notified to control the drone 10 to stop landing .
  • the drone 10 is provided with a flight control chip 15, a vision chip 14, etc. to control the drone 10 respectively.
  • the drone 10 may not separately set the flight control chip and the vision except for the image acquisition device 12 for acquiring the image of the landing area, the airflow generation device 13, and various sensors.
  • Chip, and a unified processor 16 is used to control the UAV 10.
  • the processor 16 controls the airflow generating device 13 of the drone 10 to generate airflow, and then acquires the image of the landing area 20 collected by the image collecting device 12, processes the image, and determines whether the landing area 20 exists Water surface, and control the drone 10 to land or stop landing according to the judgment result.
  • the embodiment of the present invention in order to generate a light spot in the image of the landing area 20, the embodiment of the present invention needs to be in a light environment to determine whether there is water surface in the landing area 20. Therefore, the embodiment of the present invention is more suitable for daylight or sufficient lighting Occasions.
  • FIG. 3 is a schematic flowchart of a water surface detection method provided by an embodiment of the present invention. The method may be executed by the drone 10 shown in FIG. 1 or FIG. 2, and as shown in FIG. 3, the method includes:
  • the drone is controlled to generate airflow, and the airflow is used to generate water surface ripples.
  • this step may be performed by the flight control chip of the drone 10.
  • the flight control chip may control the airflow generating device of the drone 10 (such as a rotor or a separately provided motor-driven Fan blades) generate airflow. If there is a water surface in the landing area 20 where the drone 10 is about to descend, the air flow will cause a water surface ripple. In some embodiments, to ensure that the airflow generated by the airflow generating device can generate ripples on the water surface, the flight control chip also determines whether the flying height of the drone 10 is less than a specified height.
  • the flying height of the drone 10 is higher than the specified height, the flight control chip controls the drone 10 to descend until the height of the drone reaches the specified height or less than the specified height to ensure that the airflow reaching the water surface is sufficiently large.
  • the value of the specified height can be set according to the dynamic performance of the drone airflow generating device, for example, 0.5 to 1.5 meters.
  • the image of the landing area of the drone can be collected by the image collecting device of the drone 10, and the vision chip is connected to the image collecting device to obtain the image collected by the image collecting device.
  • the image may be a color image or a gray-scale image.
  • a gray-scale image is adopted, which has less data amount and simple and quick algorithm.
  • each pixel point expresses the brightness (ie, the depth of the color) with a brightness value
  • the gray value is the brightness value
  • each pixel point is expressed with a gray value Brightness (hereinafter, the image will be described as a grayscale image).
  • the vision chip processes the image after acquiring the image of the landing area of the drone, and determines whether there are more than a predetermined number of light spots in the image. If the number of light spots in the image reaches M, you can Make sure there is water on the landing area.
  • judging whether a certain area is a light spot can be judged by judging whether the gray value of the area is higher than the gray value of a certain area around it, if the gray value of the area is higher than that of a certain area around it Gray value, then the area is a light spot.
  • the spot area can be set to a circle, square or other shapes, and the size of the spot area and the preset area around it can be set according to the actual application.
  • the preset area may be a circular ring with a width of K pixels concentric with the spot area.
  • the spot area is set as a square with an inscribed radius of N pixels
  • the preset area may be a square ring with a ring width concentric with the spot area of K pixels.
  • N and K can take values according to specific applications, for example, N is 5, K is 3.
  • the preset number M can be set according to the size of the image taken during actual application, for example, 10, 11 or a slightly smaller or larger value.
  • obtaining the number of light spots in the image includes the following steps:
  • the gradient amplitude of each pixel in the image can be obtained.
  • the gradient amplitude of each pixel can be based on the gradient of each pixel in a first direction (for example, horizontal direction, represented by X) and a second direction (for example, vertical direction, represented by Y) that are perpendicular to each other obtain.
  • the gradient amplitude of each pixel can also be obtained according to the gradient in the horizontal direction, the vertical direction, and the diagonal direction.
  • the following example illustrates the process of obtaining the gradient amplitude of a pixel according to the gradient of the pixel in the X and Y directions, including the following steps:
  • the gradient may be a first-degree gradient or a second-level gradient, and relatively speaking, the second-level gradient has better anti-image noise effect.
  • the left side of FIG. 5 shows a step diagram in the X direction
  • the right side shows a step diagram in the Y direction.
  • 6 shows a two-step diagram in the X direction on the left, and a two-step diagram in the Y direction on the right.
  • the second step of the light spot area is significantly larger than the second step of other areas.
  • the second step is taken as an example.
  • the gradient of pixels in the grayscale image can be calculated using, for example, Sobel operator, Roberts operator, Prewitt operator, Lapacian operator, and so on.
  • the X-direction gradient amplitude and the Y-direction gradient amplitude can take the absolute values of the X-direction second step and the Y-direction second step.
  • the X-direction gradient amplitude in the X-direction gradient map whose X-direction gradient amplitude is less than the first preset gradient amplitude value T0 is set to a zero value (zero value is a relatively small value, such as 0, and the zero value is used as an example for the following description ), and at the same time, the X-direction gradient amplitude value of the pixel point with the X-direction gradient amplitude greater than TO but the gray value smaller than the preset brightness threshold G0 is set to 0. In this way, pixels with small changes in the gray value of the pixels and low brightness can be ignored, reducing the amount of calculation for subsequent calculations.
  • the Y-direction gradient amplitude in the Y-direction gradient map whose Y-direction gradient amplitude is less than the first preset gradient amplitude value T0 is set to 0, and at the same time, the Y-direction of the pixel point whose gray value is less than the preset brightness threshold G0
  • the gradient amplitude is set to 0.
  • TO and G0 can take values according to the actual application, for example, both T0 and G0 are 150.
  • the gradient amplitude of the pixel can be calculated according to the X-direction gradient amplitude and the Y-direction gradient amplitude after threshold processing.
  • the gradient amplitude of the pixel point may be the product of the X-direction gradient amplitude and the Y-direction gradient amplitude.
  • the right side of FIG. 7 shows the gradient map obtained by multiplying the X-direction two-step gradient amplitude and the Y-direction second-step gradient amplitude of the pixel point, where the left side of FIG. 7 is the original grayscale image.
  • the gradient amplitude of other pixels is 0. This can remove large gradients in the image due to factors such as gaps and linear grayscale mutations.
  • the gradient amplitude value whose gradient amplitude value is smaller than the second preset gradient amplitude value T1 is set to 0, and the gradient amplitude value whose gradient amplitude value is greater than or equal to T1 is set to the first value (i.e. relative A large value, such as 1, is described below using the first value as an example).
  • the right side of FIG. 8 shows an image obtained by binarizing the gradient amplitude of each pixel, and the left side of FIG. 8 is the original grayscale image.
  • T1 can take a value according to the actual application, such as 2000000.
  • each pixel after the binarization process can be traversed to determine whether the local peak is near the pixel. For each pixel, take the pixel as the center to obtain the first area and the second area concentric with the first area and larger than the area of the first area. If the number of gradients in the first area is 1 and If the number of gradient amplitude values in the second area is the same, it means that pixels with high gray values are mainly concentrated in the first area, and the first area is a local peak.
  • all pixels in the image are sequentially traversed to find each local peak in the image. In some of these embodiments, if it is determined that the first area is a local peak, in order to reduce the calculation amount for subsequent calculations, the gradient amplitude of the pixels in the first area may be set to 0.
  • the first area and the second area may be circular, square, or other shapes. Taking a square as an example, the first area may be a square centered on the pixel point and inscribed with a radius of N pixels, and the second area may be It is a square centered on the pixel and inscribed with a radius of N+K pixels.
  • N and K can take values according to specific applications, for example, N is 5, K is 3.
  • the area where the local peak is located represents a light spot, and the number of local peaks in the image is counted as the number of light spots.
  • the embodiment of the present invention controls the drone to generate airflow so that the landing area containing the water surface generates ripples, and then determines whether the landing area contains the water surface by judging whether there is more than a preset number of light spots in the landing area image, which can reduce the drone Damage caused by accidentally landing on the water.
  • an embodiment of the present invention also provides a water surface detection device, which can be used in the UAV 10 shown in FIG. 1 or FIG. 2.
  • the water surface detection device 900 includes:
  • the airflow generation module 901 is used to control the drone to generate airflow, and the airflow is used to generate water surface ripples;
  • the image acquisition module 902 is used to acquire an image of the landing area of the drone
  • the image processing module 903 is configured to determine whether there are more than a preset number of light spots in the image, wherein the light spots are an area whose brightness value is higher than the brightness value of the preset area around it;
  • the image processing module 903 determines that there is more than a preset number of light spots in the image, it is determined that there is a water surface in the landing area.
  • the embodiment of the present invention controls the drone to generate airflow so that the landing area containing the water surface generates ripples, and then determines whether the landing area contains the water surface by judging whether there is more than a preset number of light spots in the landing area image, which can reduce the drone Damage caused by accidentally landing on the water.
  • the image processing module 903 is specifically used to:
  • the image processing module 903 includes:
  • the gradient amplitude acquisition sub-module 9031 is configured to acquire the gradient amplitude of each pixel in the image according to the brightness value of each pixel in the image;
  • the binarization processing sub-module 9032 is used to perform binarization processing on the gradient amplitude of each pixel, and set the gradient amplitude whose gradient amplitude is greater than or equal to the second preset gradient amplitude as the first value, Setting the gradient amplitude value less than the second preset gradient amplitude value to zero;
  • the local peak search sub-module 9033 is used to search for local peaks in the image according to the gradient amplitude of each pixel after the binarization process;
  • the statistics sub-module 9034 is configured to count the number of local peaks, and use the number of local peaks as the number of light spots.
  • the gradient amplitude acquisition sub-module 9031 is specifically used to:
  • the gradient amplitude of each pixel is obtained according to the first direction gradient amplitude and the second direction gradient amplitude of each pixel.
  • the local peak search sub-module 9033 is specifically used to:
  • the first area and the second area are obtained with the pixel as the center.
  • the area of the second area is larger than the area of the first area. If the gradient amplitude in the first area is the number of the first value and If the number of gradient amplitude values in the second area is the same as the first value, the first area is a local peak;
  • S2 repeatedly execute S1 until each pixel in the image is traversed.
  • the local peak search sub-module 9033 is also specifically used to:
  • the gradient amplitude of the pixels in the first area is set to zero.
  • the first area is a first square area centered on the pixel point and the inscribed radius is the first pixel radius, and the second area is centered on the pixel point A second square area with a radius of a second pixel is greater than the radius of the first pixel.
  • the image is a grayscale image.
  • the water surface detection device 900 further includes:
  • the altitude control module 904 is used to determine whether the flying height of the drone is less than the specified altitude
  • the drone is controlled to descend until the flying height of the drone is less than the specified height to ensure that the drone can generate the water surface ripples.
  • the above-mentioned device can execute the method provided by the embodiments of the present application, and has functional modules and beneficial effects corresponding to the execution method.
  • the above-mentioned device can execute the method provided by the embodiments of the present application, and has functional modules and beneficial effects corresponding to the execution method.
  • the methods provided in the embodiments of the present application refer to the methods provided in the embodiments of the present application.
  • FIG. 12 is a schematic diagram of the hardware structure of an embodiment of the drone 10.
  • the drone 10 uses the processor 16 to control the drone 10.
  • the drone 10 includes The body 11, the image acquisition device 12 and the airflow generating device 13 provided on the body 11 include:
  • One or more processors 16 and a memory 17 are shown in FIG. 12 as an example.
  • the processor 16 and the memory 17 may be connected through a bus or in other ways.
  • the connection through a bus is used as an example.
  • the memory 17 is a non-volatile computer-readable storage medium, and can be used to store non-volatile software programs, non-volatile computer executable programs, and modules, such as program instructions corresponding to the water surface detection method in the embodiments of the present application.
  • / Module for example, the airflow generation module 901, the image acquisition module 902, and the image processing module 903 shown in FIG. 9).
  • the processor 16 executes various functional applications and data processing of the drone by running the non-volatile software programs, instructions, and modules stored in the memory 17, that is, the water surface detection method of the above method embodiment is implemented.
  • the memory 17 may include a storage program area and a storage data area, wherein the storage program area may store an operating system and application programs required for at least one function; the storage data area may store data created according to the use of the water surface detection device, and the like.
  • the memory 17 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device.
  • the memory 17 may optionally include memories remotely arranged with respect to the processor 16, and these remote memories may be connected to the drone via a network. Examples of the above network include but are not limited to the Internet, intranet, local area network, mobile communication network, and combinations thereof.
  • the one or more modules are stored in the memory 17, and when executed by the one or more processors 16, execute the water surface detection method in any of the above method embodiments, for example, execute the above-described FIG. 3
  • the method steps 101 to 103 and the method steps 1031 to 1034 in FIG. 4 are implemented; the functions of the modules 901-903 in FIG. 9, the modules 901-904 in FIG. 10, and the modules 9031-9034 in FIG. 11 are implemented.
  • An embodiment of the present application provides a non-volatile computer-readable storage medium that stores computer-executable instructions, which are executed by one or more processors, for example, in FIG. 12
  • a processor 16 of the above may enable the one or more processors to execute the water surface detection method in any of the above method embodiments, for example, performing the method steps 101 to 103 in FIG. 3 and the method in FIG. 4 described above Step 1031 to step 1034; realize the functions of the modules 901-903 in FIG. 9, the modules 901-904 in FIG. 10, and the modules 9031-9034 in FIG. 11.
  • the drone 10 uses the vision chip 14 and the flight control chip 15 to control the drone 10.
  • the flight control chip 15 may use the hardware structure shown in FIG. 13, and the vision chip 14 may use the hardware structure shown in FIG. 14.
  • the flight control chip 15 includes:
  • One or more first processors 151 and a first memory 152 are used as an example.
  • the first processor 151 and the first memory 152 may be connected by a bus or other means. In FIG. 13, the connection by a bus is used as an example.
  • the first memory 152 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs, and modules, as corresponding to the water surface detection method in the embodiments of the present application Program instructions/modules (for example, the airflow generating module 901 shown in FIG. 9).
  • the first processor 151 runs non-volatile software programs, instructions, and modules stored in the first memory 152 to execute various functional applications and data processing of the drone flight control chip.
  • the first memory 152 may include a storage program area and a storage data area, where the storage program area may store an operating system and application programs required for at least one function; the storage data area may store data created according to the use of the water surface detection device, and the like.
  • the first memory 152 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
  • the first memory 152 may optionally include memories remotely provided with respect to the first processor 151, and these remote memories may be connected to the drone via a network. Examples of the above network include but are not limited to the Internet, intranet, local area network, mobile communication network, and combinations thereof.
  • the one or more modules are stored in the first memory 152, and when executed by the one or more first processors 151, perform the steps performed by the flight control chip in any of the above method embodiments, for example, Perform the method step 101 in FIG. 3 described above; implement the functions of the module 901 in FIG. 9 and the module 901 in FIG. 10.
  • the vision chip 14 includes:
  • One or more second processors 141 and a second memory 142 are taken as an example.
  • the second processor 141 and the second memory 142 may be connected by a bus or other means.
  • the connection by a bus is used as an example.
  • the second memory 142 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs, and modules, as corresponding to the water surface detection method in the embodiments of the present application Program instructions/modules (for example, the image acquisition module 902 and the image processing module 903 shown in FIG. 9).
  • the second processor 141 executes various functional applications and data processing of the UAV vision chip by running non-volatile software programs, instructions, and modules stored in the second memory 142.
  • the second memory 142 may include a storage program area and a storage data area, where the storage program area may store an operating system and application programs required for at least one function; the storage data area may store data created according to the use of the water surface detection device, and the like.
  • the second memory 142 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
  • the second memory 142 may optionally include memories remotely disposed relative to the second processor 141, and these remote memories may be connected to the drone via a network. Examples of the above network include but are not limited to the Internet, intranet, local area network, mobile communication network, and combinations thereof.
  • the one or more modules are stored in the second memory 142, and when executed by the one or more second processors 141, perform the steps performed by the vision chip in any of the above method embodiments, for example, executing The method steps 102-103 in FIG. 3 and the method steps 1031 to 1034 in FIG. 4 described above; implementing modules 902-903 in FIG. 9, modules 902-904 in FIG. 10, and modules 9031-9034 in FIG. 11 Function.
  • the device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located One place, or can be distributed to multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each embodiment can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware.
  • a person of ordinary skill in the art may understand that all or part of the processes in the method of the foregoing embodiments may be completed by a computer program instructing relevant hardware.
  • the program may be stored in a computer-readable storage medium. When executed, it may include the processes of the foregoing method embodiments.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory (RandomAccessMemory, RAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

一种水面检测方法、装置和无人机(10),该检测方法包括:控制无人机(10)产生气流,气流用于产生水面波纹(101);获取无人机(10)降落区域的图像(102);确定图像中是否存在超过预设数量的光斑,如果存在,则确定降落区域存在水面(103)。其中,该光斑为一区域,该区域的亮度值高于其周围预设区域的亮度值。该方法通过控制无人机(10)产生气流,使得包含水面的降落区域产生波纹,然后通过判断降落区域图像中是否存在超过预设数量的光斑来确定降落区域是否包含水面,可以减小无人机(10)误降落在水面造成的损害。

Description

一种水面检测方法、装置和无人机 技术领域
本发明实施例涉及无人机技术领域,特别涉及一种水面检测方法、装置和无人机。
背景技术
随着无人机技术的发展,无人机在军事及民用领域都得到了广泛的应用。目前,无人机已经能实现自主飞行,能独自完成侦察、航拍、测绘等任务。
实现本发明过程中,发明人发现相关技术中至少存在如下问题:在无人机自主降落时由于无法判断降落目的地是否为水面,无人机容易误降落到水面上,从而对无人机造成损害。
发明内容
本发明实施例的目的是提供一种水面检测方法、装置和无人机,可以在无人机降落前判断降落目的地是否存在水面,从而减小无人机误降落到水面上造成的损害。
第一方面,本发明实施例提供了一种水面检测方法,用于无人机,所述检测方法包括:
控制所述无人机产生气流,所述气流用于产生水面波纹;
获取所述无人机降落区域的图像;
确定所述图像中是否存在超过预设数量的光斑,其中,所述光斑为一区域,该区域的亮度值高于其周围预设区域的亮度值;
如果存在,则确定所述降落区域存在水面。
在一些实施例中,所述确定所述图像中是否存在超过预设数量的光 斑,包括:
获得所述图像中光斑的数量;
确定所述光斑的数量是否超过所述预设数量。
在一些实施例中,所述获得所述图像中光斑的数量,包括:
根据所述图像中各像素点的亮度值获取所述图像中各像素点的梯度幅值,每一个所述像素点的梯度幅值均表示该像素点在预设方向上亮度值的变化大小;
对所述各像素点的梯度幅值进行二值化处理,将梯度幅值大于或者等于第二预设梯度幅值的梯度幅值置为第一值,将梯度幅值小于所述第二预设梯度幅值的梯度幅值置为零值;
根据二值化处理后的各像素点的梯度幅值寻找所述图像中的局部峰;
统计所述局部峰的数量,并将所述局部峰的数量作为所述光斑的数量。
在一些实施例中,所述根据所述图像中各像素点的亮度值获取所述图像中各像素点的梯度幅值,包括:
获取所述图像中各像素点的第一方向梯度和第二方向梯度,所述第一方向和所述第二方向垂直;
根据各像素点的所述第一方向梯度获得各像素点的第一方向梯度幅值,根据各像素点的所述第二方向梯度获得各像素点的第二方向梯度幅值;
将各像素点的第一方向梯度幅值中,亮度值小于预设亮度阈值以及第一方向梯度幅值小于第一预设梯度幅值的像素点的第一方向梯度幅值置为零值;
将各像素点的第二方向梯度幅值中,亮度值小于预设亮度阈值以及第二方向梯度幅值小于第一预设梯度幅值的像素点的第二方向梯度幅值置为零值;
根据各像素点的所述第一方向梯度幅值和所述第二方向梯度幅值获得所述各像素点的梯度幅值。
在一些实施例中,所述根据二值化处理后的各像素点的梯度幅值寻 找所述图像中的局部峰,包括:
S1:以像素点为中心获得第一区域和第二区域,所述第二区域的面积大于所述第一区域的面积,如果所述第一区域内梯度幅值为第一值的个数与所述第二区域内梯度幅值为第一值的个数一致,则所述第一区域为一个局部峰;
S2:重复执行S1,直至遍历所述图像中的各个像素点。
在一些实施例中,所述S1中,如果所述第一区域为一个局部峰,则所述S1还包括:
将所述第一区域内的像素点的梯度幅值置为零值。
在一些实施例中,所述第一区域为以所述像素点为中心、内接半径为第一像素半径的第一正方形区域,所述第二区域为以所述像素点为中心、内接半径为第二像素半径的第二正方形区域,所述第二像素半径大于所述第一像素半径。
在一些实施例中,所述图像为灰度图像。
在一些实施例中,所述水面检测方法还包括:
判断所述无人机的飞行高度是否小于指定高度;
若否,则控制所述无人机下降直至所述无人机的飞行高度小于所述指定高度以确保所述无人机能够产生所述水面波纹。
第二方面,本发明实施例提供了一种水面检测装置,用于无人机,所述检测装置包括:
气流产生模块,用于控制所述无人机产生气流,所述气流用于产生水面波纹;
图像获取模块,用于获取所述无人机降落区域的图像,其中,所述光斑为一区域,该区域的亮度值高于其周围预设区域的亮度值;
图像处理模块,用于确定所述图像中是否存在超过预设数量的光斑,如果所述图像处理模块确定所述图像中存在超过预设数量的光斑,则确定所述降落区域存在水面。
在一些实施例中,所述图像处理模块具体用于:
获得所述图像中光斑的数量;
确定所述光斑的数量是否超过所述预设数量。
在一些实施例中,所述图像处理模块包括:
梯度幅值获取子模块,用于根据所述图像中各像素点的亮度值获取所述图像中各像素点的梯度幅值,每一个所述像素点的梯度幅值均表示该像素点在预设方向上亮度值的变化大小;
二值化处理子模块,用于对所述各像素点的梯度幅值进行二值化处理,将梯度幅值大于或者等于第二预设梯度幅值的梯度幅值置为第一值,将梯度幅值小于所述第二预设梯度幅值的梯度幅值置为零值;
局部峰搜索子模块,用于根据二值化处理后的各像素点的梯度幅值寻找所述图像中的局部峰;
统计子模块,用于统计所述局部峰的数量,并将所述局部峰的数量作为所述光斑的数量。
在一些实施例中,所述梯度幅值获取子模块具体用于:
获取所述图像中各像素点的第一方向梯度和第二方向梯度,所述第一方向和所述第二方向垂直;
根据各像素点的所述第一方向梯度获得各像素点的第一方向梯度幅值,根据各像素点的所述第二方向梯度获得各像素点的第二方向梯度幅值;
将各像素点的第一方向梯度幅值中,亮度值小于预设亮度阈值以及第一方向梯度幅值小于第一预设梯度幅值的像素点的第一方向梯度幅值置为零值;
将各像素点的第二方向梯度幅值中,亮度值小于预设亮度阈值以及第二方向梯度幅值小于第一预设梯度幅值的像素点的第二方向梯度幅值置为零值;
根据各像素点的所述第一方向梯度幅值和所述第二方向梯度幅值获得所述各像素点的梯度幅值。
在一些实施例中,所述局部峰搜索子模块具体用于:
S1:以像素点为中心获得第一区域和第二区域,所述第二区域的面积大于所述第一区域的面积,如果所述第一区域内梯度幅值为第一值的个数与所述第二区域内梯度幅值为第一值的个数一致,则所述第一区域为一个局部峰;
S2:重复执行S1,直至遍历所述图像中的各个像素点。
在一些实施例中,所述局部峰搜索子模块还具体用于:
如果所述第一区域为一个局部峰,将所述第一区域内的像素点的梯度幅值置为零值。
在一些实施例中,所述第一区域为以所述像素点为中心、内接半径为第一像素半径的第一正方形区域,所述第二区域为以所述像素点为中心、内接半径为第二像素半径的第二正方形区域,所述第二像素半径大于所述第一像素半径。
在一些实施例中,所述图像为灰度图像。
在一些实施例中,所述水面检测装置还包括:
高度控制模块,用于判断所述无人机的飞行高度是否小于指定高度;
若否,则控制所述无人机下降直至所述无人机的飞行高度小于所述指定高度以确保所述无人机能够产生所述水面波纹。
第三方面,本发明实施例提供了一种无人机,所述无人机包括:
机身;
机臂,与所述机身相连;
动力装置,所述动力装置包括设于所述机臂的电机和与所述电机相连的螺旋桨;
图像采集装置,设置于所述机身,用于获取所述无人机降落区域的图像;
飞控芯片,设于所述机身,所述图像采集装置与所述飞控芯片电连接;以及
视觉芯片,设于所述机身,所述视觉芯片与所述图像采集装置和所述飞控芯片电连接;
其中,所述飞控芯片用于:
控制所述螺旋桨旋转以产生气流,所述气流用于产生水面波纹;
所述视觉芯片用于:
确定所述图像中是否存在超过预设数量的光斑,其中,所述光斑为一区域,该区域的亮度值高于其周围预设区域的亮度值;
如果存在,则确定所述降落区域存在水面。
在一些实施例中,所述视觉芯片具体用于:
获得所述图像中光斑的数量;
确定所述光斑的数量是否超过所述预设数量。
在一些实施例中,所述视觉芯片具体用于:
根据所述图像中各像素点的亮度值获取所述图像中各像素点的梯度幅值,每一个所述像素点的梯度幅值均表示该像素点在预设方向上亮度值的变化大小;
对所述各像素点的梯度幅值进行二值化处理,将梯度幅值大于或者等于第二预设梯度幅值的梯度幅值置为第一值,将梯度幅值小于所述第二预设梯度幅值的梯度幅值置为零值;
根据二值化处理后的各像素点的梯度幅值寻找所述图像中的局部峰;
统计所述局部峰的数量,并将所述局部峰的数量作为所述光斑的数量。
在一些实施例中,所述视觉芯片具体用于:
获取所述图像中各像素点的第一方向梯度和第二方向梯度,所述第一方向和所述第二方向垂直;
根据各像素点的所述第一方向梯度获得各像素点的第一方向梯度幅值,根据各像素点的所述第二方向梯度获得各像素点的第二方向梯度幅值;
将各像素点的第一方向梯度幅值中,亮度值小于预设亮度阈值以及第一方向梯度幅值小于第一预设梯度幅值的像素点的第一方向梯度幅值置为零值;
将各像素点的第二方向梯度幅值中,亮度值小于预设亮度阈值以及第二方向梯度幅值小于第一预设梯度幅值的像素点的第二方向梯度幅值置为零值;
根据各像素点的所述第一方向梯度幅值和所述第二方向梯度幅值获得所述各像素点的梯度幅值。
在一些实施例中,所述视觉芯片具体用于:
S1:以像素点为中心获得第一区域和第二区域,所述第二区域的面积大于所述第一区域的面积,如果所述第一区域内梯度幅值为第一值的个数与所述第二区域内梯度幅值为第一值的个数一致,则所述第一区域为一个局部峰;
S2:重复执行S1,直至遍历所述图像中的各个像素点。
在一些实施例中,所述视觉芯片具体用于:
如果所述第一区域为一个局部峰,将所述第一区域内的像素点的梯度幅值置为零值。
在一些实施例中,所述第一区域为以所述像素点为中心、内接半径为第一像素半径的第一正方形区域,所述第二区域为以所述像素点为中心、内接半径为第二像素半径的第二正方形区域,所述第二像素半径大于所述第一像素半径。
在一些实施例中,所述图像为灰度图像。
在一些实施例中,所述飞控芯片还用于:
判断所述无人机的飞行高度是否小于指定高度;
若否,则控制所述无人机下降直至所述无人机的飞行高度小于所述指定高度以确保所述无人机能够产生所述水面波纹。
第四方面,本发明实施例提供了一种非易失性计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,当所述计算机可执行指令被无人机执行时,使所述无人机执行如上所述的方法。
本发明实施例的水面检测方法、装置和无人机,通过控制无人机产生气流,使得包含水面的降落区域产生波纹,然后通过判断降落区域图像中是否存在超过预设数量的光斑来确定降落区域是否包含水面,可以减小无人机误降落在水面造成的损害。
附图说明
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。
图1是本发明实施例水面检测方法和装置的应用场景示意图;
图2是本发明无人机的一个实施例的硬件结构示意图;
图3是本发明水面检测方法的一个实施例的流程示意图;
图4是本发明水面检测方法的一个实施例中获得图像中光斑数量步骤的流程示意图;
图5是本发明实施例中灰度图像的X方向一阶梯度图和Y方向一阶梯度图;
图6是本发明实施例中灰度图像的X方向二阶梯度图和Y方向二阶梯度图;
图7是本发明实施例中灰度图像的X方向二阶梯度与Y方向二阶梯度相乘后的示意图以及原始灰度图像;
图8是本发明实施例中对X方向二阶梯度与Y方向二阶梯度的乘积进行二值化处理后的示意图以及原始灰度图像;
图9是本发明水面检测装置的一个实施例的结构示意图;
图10是本发明水面检测装置的一个实施例的结构示意图;
图11是本发明水面检测装置的一个实施例中图像处理模块的结构示意图;
图12是本发明无人机的一个实施例的硬件结构示意图;
图13是本发明无人机的一个实施例中飞控芯片的硬件结构示意图;
图14是本发明无人机的一个实施例中视觉芯片的硬件结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例提供的水面检测方法、装置和无人机适用于如图1所示的应用场景,所述应用场景包括无人机10和降落区域20。本发明实 施例可以应用在无人机10自主飞行过程中,需要自主降落的场合。降落区域20为无人机10即将降落的区域,可能为平地、山地或水面等。由于水面会造成无人机10损坏,无人机10在自主降落时,需要判断降落区域20是否包含水面,如果包含水面,则不能降落,否则会造成无人机损毁。
其中,无人机10可以是任何合适类型的高空或者低空飞行器,包括固定翼无人飞行器和旋转翼无人飞行器,例如直升机、四旋翼机和具有其它数量的旋翼和/或旋翼配置的飞行器。无人机10还可以是其他可移动物体,例如载人飞行器、航模、无人飞艇和无人热气球等。
其中,在一些实施例中,请参照图2(图2仅部分示出了无人机10的构成),无人机10包括机身11、与机身11相连的机臂、动力装置和设于机身11的控制系统。动力装置用于提供无人机10飞行的推力、升力,包括电机及由电机驱动的机翼,例如设于所述机臂的电机和与电机相连的螺旋桨。控制系统是无人机10的中枢神经,可以包括多个功能性单元,例如飞控系统、视觉系统以及其他具有特定功能的系统。视觉系统包括图像采集装置12和视觉芯片14等,飞控系统包括各类传感器(例如陀螺仪、加速计)和飞控芯片15等。
无人机10包括用于产生气流的气流产生装置13,这样当降落区域20包含水面时,气流将在水面上产生波纹。在其中一些实施例中,气流产生装置13可以是无人机10的机翼,例如旋翼飞行器的螺旋桨,螺旋桨在旋转时可以使水面产生波纹。在另一些实施例中,气流产生装置13还可以是单独设置的由电机驱动的扇叶,例如在固定翼飞行器中,可以在无人机10的机身下方设置由电机驱动的扇叶,扇叶的转动可以使水面产生波纹。
图像采集装置12用于采集降落区域20的图像,例如高清摄像头或者运动摄像机等。图像采集装置12可以设置于任何利于拍摄降落区域20的合适位置,在一些实施例中,图像采集装置12设置于机身11的底部,以利于拍摄位于无人机10下方的降落区域20的图像。视觉芯片14用于对图像采集装置12采集的图像进行处理和识别,判断图像中是否存在水面特征,以确定降落区域20是否包括水面。飞控系统的各类传 感器可以获得无人机10的位置和飞行姿态,飞控芯片15用于控制无人机10的飞行姿态。在视觉芯片14识别出降落区域20不包括水面时,飞控芯片15控制无人机10降落,在视觉芯片14识别出降落区域20包括水面时,飞控芯片15控制无人机10停止降落或飞至其他适合降落的地方。
在高光环境下,水面的波纹在光的照射下会产生波光粼粼的效果,反映到图像中就会形成多个光斑,该光斑可以作为水面的动态特征,通过判断降落区域20的图像中是否包括一定数量的光斑就可以确定降落区域20是否包括水面。
在一些实施例中,可以先通过飞控芯片15控制无人机10的气流产生装置13产生气流,然后视觉芯片14获取图像采集装置12采集的降落区域20的图像,并对图像进行处理、判断所述图像中是否包含超过预设数量的光斑,如果包含超过预设数量的光斑,则确定降落区域20存在水面,否则,确定降落区域20不存在水面。在视觉芯片14确定降落区域20不存在水面的场合,通知飞控芯片15控制无人机10降落,在视觉芯片14确定降落区域20存在水面的场合通知飞控芯片15控制无人机10停止降落。
在上述实施例中,无人机10分别设置飞控芯片15、视觉芯片14等分别对无人机10进行控制。在另一些实施例中,请参照图12,无人机10除设置用于获取降落区域图像的图像采集装置12、气流产生装置13、各类传感器之外,可以不分别设置飞控芯片和视觉芯片,而采用统一的处理器16对无人机10进行控制。在本实施例中,由处理器16控制无人机10的气流产生装置13产生气流,然后获取图像采集装置12采集的降落区域20的图像,对所述图像进行处理、判断降落区域20是否存在水面,并根据判断结果控制无人机10降落或者停止降落。
需要说明的是,为使降落区域20的图像中产生光斑,本发明实施例需要在有光的环境下才能判断出降落区域20是否存在水面,因此,本发明实施例更适用于白天或灯光充足的场合。
图3为本发明实施例提供的水面检测方法的流程示意图,所述方法 可以由图1或图2所示的无人机10执行,如图3所示,所述方法包括:
101:控制无人机产生气流,所述气流用于产生水面波纹。
在一些实施例中,该步骤可由无人机10的飞控芯片执行,在其中一些实施例中,飞控芯片可以控制无人机10的气流产生装置(例如旋翼或单独设置的由电机驱动的扇叶)产生气流。如果无人机10即将下降的降落区域20存在水面,该气流会使水面产生水面波纹。在一些实施例中,为确保气流产生装置产生的气流能在水面上产生波纹,飞控芯片还判断无人机10的飞行高度是否小于一指定高度。因为如果无人机10距离水面较远,即使无人机10产生的气流很大,经过衰减到达水面的气流也可能会变得很小,不足以在水面产生水面波纹。如果无人机10的飞行高度高于指定高度,飞控芯片控制无人机10下降,直至无人机的高度达到指定高度或者小于指定高度,以确保到达水面的气流足够大。其中,指定高度的值可以根据无人机气流产生装置的动力性能进行设置,例如0.5至1.5米。
102:获取所述无人机降落区域的图像。
在一些实施例中,可以通过无人机10的图像采集装置采集无人机降落区域的图像,视觉芯片与图像采集装置通信连接,可以获取图像采集装置采集的图像。其中,所述图像可以为彩色图像,也可以为灰度图像,相对来说,采用灰度图像,数据量少、算法简单快捷。在所述图像为彩色图像时,各个像素点以亮度值表示亮度(即色彩的深浅程度),在所述图像为灰色图像时,灰度值即亮度值,即各个像素点以灰度值表示亮度(以下以所述图像为灰度图像为例说明)。
103:确定所述图像中是否存在超过预设数量的光斑,如果存在,则确定所述降落区域存在水面,其中,所述光斑为一区域,该区域的亮度值高于其周围预设区域的亮度值。
在一些实施例中,视觉芯片获取无人机降落区域的图像后对图像进行处理,并判断图像中是否存在超过预设数量M的光斑,如果所述图像中光斑的数量达到M个,则可以确定降落区域存在水面。在其中一些实施例中判断某一区域是否为光斑可以通过判断该区域的灰度值是否高于其周围一定区域的灰度值来判断,如果该区域的灰度值高于其周围一 定区域的灰度值,则该区域为光斑。其中,光斑区域可以设定为圆形、正方形或者其他形状,光斑区域和其周围的预设区域的大小可以根据实际应用情况进行设定。例如如果光斑区域设定为半径为N个像素的圆形,则所述预设区域可以为与所述光斑区域同心的环宽为K个像素的圆环形。如果光斑区域设定为内接半径为N个像素的正方形,则所述预设区域可以为与所述光斑区域同心的环宽为K个像素的方环形。其中,N和K可以根据具体应用情况取值,例如N为5、K为3。预设数量M可以根据实际应用时拍摄的图像大小进行设定,例如10、11或稍小或更大的值。
具体的,请参照图4,在一些实施例中,获得所述图像中光斑的数量,包括以下步骤:
1031:根据所述图像中各像素点的亮度值获取所述图像中各像素点的梯度幅值,所述像素点的梯度幅值表示该像素点在预设方向上亮度值的变化大小。
为了提取图像中光斑的特征,可以获得图像中各像素点的梯度幅值。在一些实施例中,各像素点的梯度幅值可以根据各像素点在互相垂直的第一方向(例如水平方向,以X表示)和第二方向上(例如垂直方向,以Y表示)的梯度获得。在另一些实施例中,各像素点的梯度幅值也可以根据水平方向、垂直方向以及对角线方向的梯度获得。
以下举例说明根据像素点在X方向和Y方向上的梯度获取像素点梯度幅值的过程,包括以下步骤:
1031a:获取所述图像中各像素点在X方向和Y方向的梯度,根据各像素点的X方向梯度获得X方向梯度幅值,根据各像素点的Y方向梯度获得Y方向梯度幅值。
其中,所述梯度可以是一阶梯度,也可以是二阶梯度,相对来说,二阶梯度抗图像噪声效果更好。如图5所示,图5左侧示出了X方向的一阶梯度图,右侧示出了Y方向的一阶梯度图。图6左侧示出了X方向的二阶梯度图,右侧示出了Y方向的二阶梯度图。从图6可以看出,光斑区域的二阶梯度明显大于其他区域的二阶梯度,本实施例以二阶梯度为例说明。灰度图像中像素点的梯度可以采用例如Sobel算子、Roberts 算子、Prewitt算子、Lapacian算子等计算。X方向梯度幅值和Y方向梯度幅值可以取X方向二阶梯度和Y方向二阶梯度的绝对值。
1031b:将各像素点的X方向梯度幅值中、亮度值小于预设亮度阈值以及X方向梯度幅值小于第一预设梯度幅值的像素点的X方向梯度幅值置为零值;将各像素点的Y方向梯度幅值中、亮度值小于预设亮度阈值以及Y方向梯度幅值小于第一预设梯度幅值的像素点的Y方向梯度幅值置为零值。
即将X方向梯度图中X方向梯度幅值小于第一预设梯度幅值T0的X方向梯度幅值置为零值(零值即相对小值,例如0,以下以零值为0为例说明),同时将虽然X方向梯度幅值大于TO但灰度值小于预设亮度阈值G0的像素点的X方向梯度幅值置为0。这样可以忽略像素点灰度值变化小以及亮度低的像素点,减少后续计算的计算量。
同样的,将Y方向梯度图中Y方向梯度幅值小于第一预设梯度幅值T0的Y方向梯度幅值置为0,同时将灰度值小于预设亮度阈值G0的像素点的Y方向梯度幅值置为0。其中,TO和G0可以根据实际应用情况取值,例如T0、G0均为150。
1031c:根据各像素点的X方向梯度幅值和Y方向梯度幅度获得各像素点的梯度幅值。
可以根据阈值处理后的X方向梯度幅值和Y方向梯度幅值计算像素点的梯度幅值。在其中一些实施例中,像素点的梯度幅值可以是X方向梯度幅值和Y方向梯度幅值的乘积。图7右侧示出了将像素点的X方向二阶梯度幅值和Y方向二阶梯度幅值相乘后获得的梯度图,其中,图7左侧为原始灰度图。图7右侧的图中,仅保留了X方向和Y方向梯度都大的像素点,其他像素点的梯度幅值为0。这样可以去除图像中由于缝隙和直线型灰度突变等因素造成的大梯度。
1032:对所述各像素点的梯度幅值进行二值化处理,将梯度幅值大于或者等于第二预设梯度幅值的梯度幅值置为第一值,将梯度幅值小于所述第二预设梯度幅值的梯度幅值置为零值。
即将各像素点的梯度幅值中,梯度幅值小于第二预设梯度幅值T1的梯度幅值置为0,将梯度幅值大于或者等于T1的梯度幅值置为第一值 (即相对大值,例如1,以下以第一值为1为例说明)。图8右侧示出了对各像素点的梯度幅值进行二值化处理后获得的图像,图8左侧为原始灰度图。其中,T1可以根据实际应用情况取值,例如2000000。
1033:根据二值化处理后的各像素点的梯度幅值寻找所述图像中的局部峰。
在其中一些实施例中,寻找图像中的局部峰,可以遍历二值化处理后的每个像素点,确定该像素点附近是否为局部峰。针对每个像素点,以该像素点为中心获得第一区域和与第一区域同心且比第一区域面积大的第二区域,如果所述第一区域内梯度幅值为1的个数与所述第二区域内梯度幅值为1的个数一致,则说明灰度值高的像素点主要集中在第一区域内,则第一区域为一个局部峰。依次类推,顺序遍历图像中的所有像素点,找出图像中的各个局部峰。在其中一些实施例中,如果确定第一区域为局部峰,为减小后续计算的计算量,可以将该第一区域内的像素点的梯度幅值置为0。
其中,第一区域和第二区域可以为圆形、正方形或其他形状,以正方形为例,第一区域可以是以该像素点为中心、内接半径为N个像素的正方形,第二区域可以是以该像素点为中心、内接半径为N+K个像素的正方形。其中,N和K可以根据具体应用情况取值,例如N为5、K为3。
1034:统计所述局部峰的数量。
局部峰所在的区域代表一个光斑,统计出图像中局部峰的个数,即为光斑的个数。
本发明实施例通过控制无人机产生气流,使得包含水面的降落区域产生波纹,然后通过判断降落区域图像中是否存在超过预设数量的光斑来确定降落区域是否包含水面,可以减小无人机误降落在水面造成的损害。
相应的,如图9所示,本发明实施例还提供了一种水面检测装置,可以用于图1或图2所示的无人机10,水面检测装置900包括:
气流产生模块901,用于控制所述无人机产生气流,所述气流用于产生水面波纹;
图像获取模块902,用于获取所述无人机降落区域的图像;
图像处理模块903,用于确定所述图像中是否存在超过预设数量的光斑,其中,所述光斑为一区域,该区域的亮度值高于其周围预设区域的亮度值;
如果图像处理模块903确定所述图像中存在超过预设数量的光斑,则确定所述降落区域存在水面。
本发明实施例通过控制无人机产生气流,使得包含水面的降落区域产生波纹,然后通过判断降落区域图像中是否存在超过预设数量的光斑来确定降落区域是否包含水面,可以减小无人机误降落在水面造成的损害。
在其中一些实施例中,图像处理模块903具体用于:
获得所述图像中光斑的数量;
确定所述光斑的数量是否超过所述预设数量。
在其中一些实施例中,如图11所示,图像处理模块903包括:
梯度幅值获取子模块9031,用于根据所述图像中各像素点的亮度值获取所述图像中各像素点的梯度幅值;
二值化处理子模块9032,用于对所述各像素点的梯度幅值进行二值化处理,将梯度幅值大于或者等于第二预设梯度幅值的梯度幅值置为第一值,将梯度幅值小于所述第二预设梯度幅值的梯度幅值置为零值;
局部峰值搜索子模块9033,用于根据二值化处理后的各像素点的梯度幅值寻找所述图像中的局部峰;
统计子模块9034,用于统计所述局部峰的数量,并将所述局部峰的数量作为所述光斑的数量。
在其中一些实施例中,梯度幅值获取子模块9031具体用于:
获取所述图像中各像素点的第一方向梯度和第二方向梯度,所述第一方向和所述第二方向垂直;
根据各像素点的所述第一方向梯度获得各像素点的第一方向梯度幅值,根据各像素点的所述第二方向梯度获得各像素点的第二方向梯度幅值;
将各像素点的第一方向梯度幅值中,亮度值小于预设亮度阈值或第 一方向梯度幅值小于第一预设梯度幅值的像素点的第一方向梯度幅值置为零值;
将各像素点的第二方向梯度幅值中,亮度值小于预设亮度阈值或第二方向梯度幅值小于第一预设梯度幅值的像素点的第二方向梯度幅值置为零值;
根据各像素点的所述第一方向梯度幅值和所述第二方向梯度幅值获得各像素点的梯度幅值。
在其中一些实施例中,局部峰值搜索子模块9033具体用于:
S1:以像素点为中心获得第一区域和第二区域,所述第二区域的面积大于所述第一区域的面积,如果所述第一区域内梯度幅值为第一值的个数与所述第二区域内梯度幅值为第一值的个数一致,则所述第一区域为一个局部峰;
S2:重复执行S1,直至遍历所述图像中的各个像素点。
在其中一些实施例中,局部峰值搜索子模块9033还具体用于:
如果所述第一区域为一个局部峰,将所述第一区域内的像素点的梯度幅值置为零值。
在其中一些实施例中,所述第一区域为以所述像素点为中心、内接半径为第一像素半径的第一正方形区域,所述第二区域为以所述像素点为中心、内接半径为第二像素半径的第二正方形区域,所述第二像素半径大于所述第一像素半径。
在其中一些实施例中,所述图像为灰度图像。
在其中一些实施例中,如图10所示,水面检测装置900还包括:
高度控制模块904,用于判断所述无人机的飞行高度是否小于指定高度;
若否,则控制所述无人机下降直至所述无人机的飞行高度小于所述指定高度以确保所述无人机能够产生所述水面波纹。
需要说明的是,上述装置可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在装置实施例中详尽描述的技术细节,可参见本申请实施例所提供的方法。
图12为无人机10的一个实施例的硬件结构示意图,在该实施例中,无人机10采用处理器16对无人机10进行控制,如图12所示,无人机10除包括机身11、设置于机身11上的图像采集装置12和气流产生装置13之外,还包括:
一个或多个处理器16以及存储器17,图12中以一个处理器16为例。
处理器16和存储器17可以通过总线或者其他方式连接,图12中以通过总线连接为例。
存储器17作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的水面检测方法对应的程序指令/模块(例如,附图9所示的气流产生模块901、图像获取模块902、图像处理模块903)。处理器16通过运行存储在存储器17中的非易失性软件程序、指令以及模块,从而执行无人机的各种功能应用以及数据处理,即实现上述方法实施例的水面检测方法。
存储器17可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据水面检测装置的使用所创建的数据等。此外,存储器17可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器17可选包括相对于处理器16远程设置的存储器,这些远程存储器可以通过网络连接至无人机。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
所述一个或者多个模块存储在所述存储器17中,当被所述一个或者多个处理器16执行时,执行上述任意方法实施例中的水面检测方法,例如,执行以上描述的图3中的方法步骤101至步骤103、图4中的方法步骤1031至步骤1034;实现图9中的模块901-903、图10中模块901-904、图11中模块9031-9034的功能。
上述产品可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本 申请实施例所提供的方法。
本申请实施例提供了一种非易失性计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令被一个或多个处理器执行,例如图12中的一个处理器16,可使得上述一个或多个处理器可执行上述任意方法实施例中的水面检测方法,例如,执行以上描述的图3中的方法步骤101至步骤103、图4中的方法步骤1031至步骤1034;实现图9中的模块901-903、图10中模块901-904、图11中模块9031-9034的功能。
在图2所示的实施例中,无人机10利用视觉芯片14和飞控芯片15对无人机10进行控制。其中,飞控芯片15可以采用图13所示的硬件结构,视觉芯片14可以采用图14所示的硬件结构。
如图13所示,飞控芯片15包括:
一个或多个第一处理器151以及第一存储器152,图13中以一个第一处理器151为例。
第一处理器151和第一存储器152可以通过总线或者其他方式连接,图13中以通过总线连接为例。
第一存储器152作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的水面检测方法对应的程序指令/模块(例如,附图9所示的气流产生模块901)。第一处理器151通过运行存储在第一存储器152中的非易失性软件程序、指令以及模块,从而执行无人机飞控芯片的各种功能应用以及数据处理。
第一存储器152可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据水面检测装置的使用所创建的数据等。此外,第一存储器152可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,第一存储器152可选包括相对于第一处理器151远程设置的 存储器,这些远程存储器可以通过网络连接至无人机。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
所述一个或者多个模块存储在所述第一存储器152中,当被所述一个或者多个第一处理器151执行时,执行上述任意方法实施例中由飞控芯片执行的步骤,例如,执行以上描述的图3中的方法步骤101;实现图9中的模块901、图10中模块901的功能。
如图14所示,视觉芯片14包括:
一个或多个第二处理器141以及第二存储器142,图14中以一个第二处理器141为例。
第二处理器141和第二存储器142可以通过总线或者其他方式连接,图14中以通过总线连接为例。
第二存储器142作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的水面检测方法对应的程序指令/模块(例如,附图9所示的图像获取模块902、图像处理模块903)。第二处理器141通过运行存储在第二存储器142中的非易失性软件程序、指令以及模块,从而执行无人机视觉芯片的各种功能应用以及数据处理。
第二存储器142可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据水面检测装置的使用所创建的数据等。此外,第二存储器142可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,第二存储器142可选包括相对于第二处理器141远程设置的存储器,这些远程存储器可以通过网络连接至无人机。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
所述一个或者多个模块存储在所述第二存储器142中,当被所述一个或者多个第二处理器141执行时,执行上述任意方法实施例中由视觉芯片执行的步骤,例如,执行以上描述的图3中的方法步骤102-103、图4中的方法步骤1031至步骤1034;实现图9中的模块902-903、图 10中模块902-904、图11中的模块9031-9034的功能。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
通过以上的实施例的描述,本领域普通技术人员可以清楚地了解到各实施例可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件。本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(RandomAccessMemory,RAM)等。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;在本发明的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,步骤可以以任意顺序实现,并存在如上所述的本发明的不同方面的许多其它变化,为了简明,它们没有在细节中提供;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (28)

  1. 一种水面检测方法,用于无人机,其特征在于,所述检测方法包括:
    控制所述无人机产生气流,所述气流用于产生水面波纹;
    获取所述无人机降落区域的图像;
    确定所述图像中是否存在超过预设数量的光斑,其中,所述光斑为一区域,该区域的亮度值高于其周围预设区域的亮度值;
    如果存在,则确定所述降落区域存在水面。
  2. 根据权利要求1所述的水面检测方法,其特征在于,所述确定所述图像中是否存在超过预设数量的光斑,包括:
    获得所述图像中光斑的数量;
    确定所述光斑的数量是否超过所述预设数量。
  3. 根据权利要求2所述的水面检测方法,其特征在于,所述获得所述图像中光斑的数量,包括:
    根据所述图像中各像素点的亮度值获取所述图像中各像素点的梯度幅值,每一个所述像素点的梯度幅值均表示该像素点在预设方向上亮度值的变化大小;
    对所述各像素点的梯度幅值进行二值化处理,将梯度幅值大于或者等于第二预设梯度幅值的梯度幅值置为第一值,将梯度幅值小于所述第二预设梯度幅值的梯度幅值置为零值;
    根据二值化处理后的各像素点的梯度幅值寻找所述图像中的局部峰;
    统计所述局部峰的数量,并将所述局部峰的数量作为所述光斑的数量。
  4. 根据权利要求3所述的水面检测方法,其特征在于,所述根据所述图像中各像素点的亮度值获取所述图像中各像素点的梯度幅值,包括:
    获取所述图像中各像素点的第一方向梯度和第二方向梯度,所述第 一方向和所述第二方向垂直;
    根据各像素点的所述第一方向梯度获得各像素点的第一方向梯度幅值,根据各像素点的所述第二方向梯度获得各像素点的第二方向梯度幅值;
    将各像素点的第一方向梯度幅值中,亮度值小于预设亮度阈值以及第一方向梯度幅值小于第一预设梯度幅值的像素点的第一方向梯度幅值置为零值;
    将各像素点的第二方向梯度幅值中,亮度值小于预设亮度阈值以及第二方向梯度幅值小于第一预设梯度幅值的像素点的第二方向梯度幅值置为零值;
    根据各像素点的所述第一方向梯度幅值和所述第二方向梯度幅值获得所述各像素点的梯度幅值。
  5. 根据权利要求3或4所述的水面检测方法,其特征在于,所述根据二值化处理后的各像素点的梯度幅值寻找所述图像中的局部峰,包括:
    S1:以像素点为中心获得第一区域和第二区域,所述第二区域的面积大于所述第一区域的面积,如果所述第一区域内梯度幅值为第一值的个数与所述第二区域内梯度幅值为第一值的个数一致,则所述第一区域为一个局部峰;
    S2:重复执行S1,直至遍历所述图像中的各个像素点。
  6. 根据权利要求5所述的水面检测方法,其特征在于,所述S1中,如果所述第一区域为一个局部峰,则所述S1还包括:
    将所述第一区域内的像素点的梯度幅值置为零值。
  7. 根据权利要求5或6所述的水面检测方法,其特征在于,所述第一区域为以所述像素点为中心、内接半径为第一像素半径的第一正方形区域,所述第二区域为以所述像素点为中心、内接半径为第二像素半径的第二正方形区域,所述第二像素半径大于所述第一像素半径。
  8. 根据权利要求1-7任意一项所述的水面检测方法,其特征在于,所述图像为灰度图像。
  9. 根据权利要求1-8任意一项所述的水面检测方法,其特征在于, 所述水面检测方法还包括:
    判断所述无人机的飞行高度是否小于指定高度;
    若否,则控制所述无人机下降直至所述无人机的飞行高度小于所述指定高度以确保所述无人机能够产生所述水面波纹。
  10. 一种水面检测装置,用于无人机,其特征在于,所述检测装置包括:
    气流产生模块,用于控制所述无人机产生气流,所述气流用于产生水面波纹;
    图像获取模块,用于获取所述无人机降落区域的图像;
    图像处理模块,用于确定所述图像中是否存在超过预设数量的光斑,其中,所述光斑为一区域,该区域的亮度值高于其周围预设区域的亮度值;
    如果所述图像处理模块确定所述图像中存在超过预设数量的光斑,则确定所述降落区域存在水面。
  11. 根据权利要求10所述的水面检测装置,其特征在于,所述图像处理模块具体用于:
    获得所述图像中光斑的数量;
    确定所述光斑的数量是否超过所述预设数量。
  12. 根据权利要求11所述的水面检测装置,其特征在于,所述图像处理模块包括:
    梯度幅值获取子模块,用于根据所述图像中各像素点的亮度值获取所述图像中各像素点的梯度幅值,每一个所述像素点的梯度幅值均表示该像素点在预设方向上亮度值的变化大小;
    二值化处理子模块,用于对所述各像素点的梯度幅值进行二值化处理,将梯度幅值大于或者等于第二预设梯度幅值的梯度幅值置为第一值,将梯度幅值小于所述第二预设梯度幅值的梯度幅值置为零值;
    局部峰搜索子模块,用于根据二值化处理后的各像素点的梯度幅值寻找所述图像中的局部峰;
    统计子模块,用于统计所述局部峰的数量,并将所述局部峰的数量 作为所述光斑的数量。
  13. 根据权利要求12所述的水面检测装置,其特征在于,所述梯度幅值获取子模块具体用于:
    获取所述图像中各像素点的第一方向梯度和第二方向梯度,所述第一方向和所述第二方向垂直;
    根据各像素点的所述第一方向梯度获得各像素点的第一方向梯度幅值,根据各像素点的所述第二方向梯度获得各像素点的第二方向梯度幅值;
    将各像素点的第一方向梯度幅值中,亮度值小于预设亮度阈值以及第一方向梯度幅值小于第一预设梯度幅值的像素点的第一方向梯度幅值置为零值;
    将各像素点的第二方向梯度幅值中,亮度值小于预设亮度阈值以及第二方向梯度幅值小于第一预设梯度幅值的像素点的第二方向梯度幅值置为零值;
    根据各像素点的所述第一方向梯度幅值和所述第二方向梯度幅值获得所述各像素点的梯度幅值。
  14. 根据权利要求12或13所述的水面检测装置,其特征在于,所述局部峰搜索子模块具体用于:
    S1:以像素点为中心获得第一区域和第二区域,所述第二区域的面积大于所述第一区域的面积,如果所述第一区域内梯度幅值为第一值的个数与所述第二区域内梯度幅值为第一值的个数一致,则所述第一区域为一个局部峰;
    S2:重复执行S1,直至遍历所述图像中的各个像素点。
  15. 根据权利要求14所述的水面检测装置,其特征在于,所述局部峰搜索子模块还具体用于:
    如果所述第一区域为一个局部峰,将所述第一区域内的像素点的梯度幅值置为零值。
  16. 根据权利要求14或15所述的水面检测装置,其特征在于,所述第一区域为以所述像素点为中心、内接半径为第一像素半径的第一正方形区域,所述第二区域为以所述像素点为中心、内接半径为第二像素 半径的第二正方形区域,所述第二像素半径大于所述第一像素半径。
  17. 根据权利要求10-16任意一项所述的水面检测装置,其特征在于,所述图像为灰度图像。
  18. 根据权利要求10-17任意一项所述的水面检测装置,其特征在于,所述水面检测装置还包括:
    高度控制模块,用于判断所述无人机的飞行高度是否小于指定高度;
    若否,则控制所述无人机下降直至所述无人机的飞行高度小于所述指定高度以确保所述无人机能够产生所述水面波纹。
  19. 一种无人机,其特征在于,所述无人机包括:
    机身;
    机臂,与所述机身相连;
    动力装置,所述动力装置包括设于所述机臂的电机和与所述电机相连的螺旋桨;
    图像采集装置,设置于所述机身,用于获取所述无人机降落区域的图像;
    飞控芯片,设于所述机身,所述图像采集装置与所述飞控芯片电连接;以及
    视觉芯片,设于所述机身,所述视觉芯片与所述图像采集装置和所述飞控芯片电连接;
    其中,所述飞控芯片用于:
    控制所述螺旋桨旋转以产生气流,所述气流用于产生水面波纹;
    所述视觉芯片用于:
    确定所述图像中是否存在超过预设数量的光斑,其中,所述光斑为一区域,该区域的亮度值高于其周围预设区域的亮度值;
    如果存在,则确定所述降落区域存在水面。
  20. 根据权利要求19所述的无人机,其特征在于,所述视觉芯片具体用于:
    获得所述图像中光斑的数量;
    确定所述光斑的数量是否超过所述预设数量。
  21. 根据权利要求20所述的无人机,其特征在于,所述视觉芯片具体用于:
    根据所述图像中各像素点的亮度值获取所述图像中各像素点的梯度幅值,每一个所述像素点的梯度幅值均表示该像素点在预设方向上亮度值的变化大小;
    对所述各像素点的梯度幅值进行二值化处理,将梯度幅值大于或者等于第二预设梯度幅值的梯度幅值置为第一值,将梯度幅值小于所述第二预设梯度幅值的梯度幅值置为零值;
    根据二值化处理后的各像素点的梯度幅值寻找所述图像中的局部峰;
    统计所述局部峰的数量,并将所述局部峰的数量作为所述光斑的数量。
  22. 根据权利要求21所述的无人机,其特征在于,所述视觉芯片具体用于:
    获取所述图像中各像素点的第一方向梯度和第二方向梯度,所述第一方向和所述第二方向垂直;
    根据各像素点的所述第一方向梯度获得各像素点的第一方向梯度幅值,根据各像素点的所述第二方向梯度获得各像素点的第二方向梯度幅值;
    将各像素点的第一方向梯度幅值中,亮度值小于预设亮度阈值以及第一方向梯度幅值小于第一预设梯度幅值的像素点的第一方向梯度幅值置为零值;
    将各像素点的第二方向梯度幅值中,亮度值小于预设亮度阈值以及第二方向梯度幅值小于第一预设梯度幅值的像素点的第二方向梯度幅值置为零值;
    根据各像素点的所述第一方向梯度幅值和所述第二方向梯度幅值获得所述各像素点的梯度幅值。
  23. 根据权利要求21或22所述的无人机,其特征在于,所述视觉芯片具体用于:
    S1:以像素点为中心获得第一区域和第二区域,所述第二区域的面积大于所述第一区域的面积,如果所述第一区域内梯度幅值为第一值的个数与所述第二区域内梯度幅值为第一值的个数一致,则所述第一区域为一个局部峰;
    S2:重复执行S1,直至遍历所述图像中的各个像素点。
  24. 根据权利要求23所述的无人机,其特征在于,所述视觉芯片具体用于:
    如果所述第一区域为一个局部峰,将所述第一区域内的像素点的梯度幅值置为零值。
  25. 根据权利要求23或24所述的无人机,其特征在于,所述第一区域为以所述像素点为中心、内接半径为第一像素半径的第一正方形区域,所述第二区域为以所述像素点为中心、内接半径为第二像素半径的第二正方形区域,所述第二像素半径大于所述第一像素半径。
  26. 根据权利要求19-25任意一项所述的无人机,其特征在于,所述图像为灰度图像。
  27. 根据权利要求19-26任意一项所述的无人机,其特征在于,所述飞控芯片还用于:
    判断所述无人机的飞行高度是否小于指定高度;
    若否,则控制所述无人机下降直至所述无人机的飞行高度小于所述指定高度以确保所述无人机能够产生所述水面波纹。
  28. 一种非易失性计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机可执行指令,当所述计算机可执行指令被无人机执行时,使所述无人机执行如权利要求1-9任一项所述的方法。
PCT/CN2019/123071 2018-12-05 2019-12-04 一种水面检测方法、装置和无人机 Ceased WO2020114432A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811482088.X 2018-12-05
CN201811482088.XA CN109520478B (zh) 2018-12-05 2018-12-05 一种水面检测方法、装置和无人机

Publications (1)

Publication Number Publication Date
WO2020114432A1 true WO2020114432A1 (zh) 2020-06-11

Family

ID=65794663

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/123071 Ceased WO2020114432A1 (zh) 2018-12-05 2019-12-04 一种水面检测方法、装置和无人机

Country Status (2)

Country Link
CN (1) CN109520478B (zh)
WO (1) WO2020114432A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109520478B (zh) * 2018-12-05 2020-10-23 深圳市道通智能航空技术有限公司 一种水面检测方法、装置和无人机
CN112567383A (zh) * 2020-03-06 2021-03-26 深圳市大疆创新科技有限公司 物体检测方法、可移动平台、设备和存储介质
CN111982031B (zh) * 2020-08-24 2021-12-31 衡阳市大雁地理信息有限公司 基于无人机视觉的水面面积测量方法

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110264314A1 (en) * 2010-04-27 2011-10-27 Honeywell International Inc. Ground proximity sensor
CN103389075A (zh) * 2013-07-22 2013-11-13 北京理工大学 基于可见光偏振成像的实时非接触水面波纹测量方法
CN103744429A (zh) * 2013-02-07 2014-04-23 山东英特力光通信开发有限公司 一种小型无人直升机飞行控制系统
CN104765042A (zh) * 2015-03-24 2015-07-08 江苏省交通规划设计院股份有限公司 一种水面目标检测识别系统
CN104828244A (zh) * 2014-02-11 2015-08-12 苏卡斯航空电子设备有限公司 用于飞行器的安全装置和确定飞行器降落表面类型的方法
CN106103274A (zh) * 2015-07-02 2016-11-09 深圳市大疆创新科技有限公司 无人机、其控制系统及方法,以及无人机降落控制方法
CN109520478A (zh) * 2018-12-05 2019-03-26 深圳市道通智能航空技术有限公司 一种水面检测方法、装置和无人机
US20190193852A1 (en) * 2017-12-21 2019-06-27 Autel Robotics Co., Ltd. Water surface detection method and apparatus, unmanned aerial vehicle landing method and apparatus and unmanned aerial vehicle

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101533105B (zh) * 2008-10-10 2011-07-20 西安电子科技大学 基于激光光斑漂移的水中动态目标尾迹探测系统及方法
CN102954772B (zh) * 2011-12-13 2015-05-13 中国科学院对地观测与数字地球科学中心 一种基于线激光器的海冰表面粗糙度测量方法
CN102759731B (zh) * 2012-07-25 2014-03-12 武汉大学 基于星载激光测高仪回波的海洋表面风、浪特性反演方法
US20150204682A1 (en) * 2012-08-14 2015-07-23 Tata Consultancy Services Limited Gps based water logging detection and notification
US10444954B2 (en) * 2013-11-11 2019-10-15 Here Global B.V. Distinguishable geographic area presentation
CN104765073B (zh) * 2015-03-24 2017-09-01 中设设计集团股份有限公司 一种激光水面漂浮物体识别方法
CN105158218A (zh) * 2015-07-28 2015-12-16 青岛市光电工程技术研究院 一种非接触式水面浮油监测装置与方法
CN107657623A (zh) * 2017-08-28 2018-02-02 北京工业大学 一种用于无人机的河道线检测系统与方法
CN108346149B (zh) * 2018-03-02 2021-03-12 北京郁金香伙伴科技有限公司 图像检测、处理方法、装置及终端

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110264314A1 (en) * 2010-04-27 2011-10-27 Honeywell International Inc. Ground proximity sensor
CN103744429A (zh) * 2013-02-07 2014-04-23 山东英特力光通信开发有限公司 一种小型无人直升机飞行控制系统
CN103389075A (zh) * 2013-07-22 2013-11-13 北京理工大学 基于可见光偏振成像的实时非接触水面波纹测量方法
CN104828244A (zh) * 2014-02-11 2015-08-12 苏卡斯航空电子设备有限公司 用于飞行器的安全装置和确定飞行器降落表面类型的方法
CN104765042A (zh) * 2015-03-24 2015-07-08 江苏省交通规划设计院股份有限公司 一种水面目标检测识别系统
CN106103274A (zh) * 2015-07-02 2016-11-09 深圳市大疆创新科技有限公司 无人机、其控制系统及方法,以及无人机降落控制方法
US20190193852A1 (en) * 2017-12-21 2019-06-27 Autel Robotics Co., Ltd. Water surface detection method and apparatus, unmanned aerial vehicle landing method and apparatus and unmanned aerial vehicle
CN109520478A (zh) * 2018-12-05 2019-03-26 深圳市道通智能航空技术有限公司 一种水面检测方法、装置和无人机

Also Published As

Publication number Publication date
CN109520478A (zh) 2019-03-26
CN109520478B (zh) 2020-10-23

Similar Documents

Publication Publication Date Title
US12130636B2 (en) Methods and system for autonomous landing
US11526998B2 (en) Methods and system for infrared tracking
US10778967B2 (en) Systems and methods for improving performance of a robotic vehicle by managing on-board camera defects
US20190068829A1 (en) Systems and Methods for Improving Performance of a Robotic Vehicle by Managing On-board Camera Obstructions
US20210009270A1 (en) Methods and system for composing and capturing images
WO2020125726A1 (zh) 一种无人机自主降落方法、装置及无人机
WO2020215188A1 (zh) 飞行航线的生成方法、控制装置及无人机系统
US20180181129A1 (en) Method and apparatus for controlling flight of unmanned aerial vehicle and unmanned aerial vehicle
WO2020143576A1 (zh) 调整机载雷达的主探测方向的方法、装置和无人机
WO2020125725A1 (zh) 一种无人机降落避障方法、装置及无人机
WO2020114432A1 (zh) 一种水面检测方法、装置和无人机
WO2019128275A1 (zh) 一种拍摄控制方法、装置及飞行器
CN110286091A (zh) 一种基于无人机的近地遥感图像采集方法
WO2018039925A1 (en) Method and system for detecting obstructive object at projected locations within images
De Croon et al. Sky segmentation approach to obstacle avoidance
Supriyono et al. Design, building and performance testing of GPS and computer vision combination for increasing landing precision of quad-copter drone
WO2020207411A1 (zh) 一种图像数据处理方法、装置、图像处理芯片及飞行器
WO2021238743A1 (zh) 一种无人机飞行控制方法、装置及无人机
US10577101B2 (en) Water surface detection method and apparatus, unmanned aerial vehicle landing method and apparatus and unmanned aerial vehicle
EP3368412B1 (en) An air vehicle and imaging apparatus therefor
GB2545076B (en) Unmanned aerial vehicle with rotary body and imaging system
KR20170087370A (ko) 가변 기상 하에서도 안정적인 비행이 가능한 무인 항공기
Singh et al. Investigating feasibility of target detection by visual servoing using UAV for oceanic applications
Gao et al. Onboard optical flow and vision based localization for a quadrotor in unstructured indoor environments
Akhara et al. Combining GPS and Computer Vision for Increasing Landing Precision of Quadcopter Drone

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19893947

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19893947

Country of ref document: EP

Kind code of ref document: A1