A method and apparatus for obstacle detection

By adjusting the parameters of the Gaussian mixture model using gradient histograms on the UAV take-off and landing platform, the impact of environmental changes on obstacle detection was addressed, improving detection accuracy and adaptability, especially for the identification of stationary or slowly moving obstacles.

CN116524452BActive Publication Date: 2025-12-23BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210066219.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-20
Publication Date
2025-12-23
Estimated Expiration
2042-01-20

AI Technical Summary

Technical Problem

Existing obstacle detection methods are easily affected by environmental changes such as lighting and shadows on UAV take-off and landing platforms, resulting in poor detection accuracy, especially for stationary or slowly moving obstacles.

Method used

The Gaussian mixture model is input with gradient histograms. The parameters of the Gaussian mixture model are adjusted by judging whether the obstacle detection results meet the preset conditions, so as to reduce the impact of environmental changes on the detection results. Furthermore, the detection accuracy is improved through multi-scale fusion and adaptive updates.

Benefits of technology

It improves the accuracy of obstacle detection on UAV take-off and landing platforms, reduces the impact of lighting and shadows on detection results, and enhances the ability to detect stationary or slowly moving obstacles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116524452B_ABST
    Figure CN116524452B_ABST
Patent Text Reader

Abstract

The present specification discloses a method and device for obstacle detection, obtaining an image of a current frame, determining a gradient histogram of the image, inputting the gradient histogram of the image into a Gaussian mixture model, determining an obstacle detection result output by the Gaussian mixture model, determining whether the obstacle detection result satisfies a preset condition, and when the obstacle detection result satisfies the condition, adjusting parameters of the Gaussian mixture model using the gradient histogram of the image. It can be seen that the present method creatively inputs the gradient histogram of the image into the Gaussian mixture model, reduces the influence of light and shadow on the obstacle detection result, and after determining the obstacle detection result of the image, determines whether to update the parameters of the Gaussian mixture model by judging whether the image contains obstacles, realizes selective updating of the Gaussian mixture model, and improves the accuracy of the Gaussian mixture model in detecting obstacles in the image.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present specification relates to the field of obstacle detection, and in particular, to a method and device for obstacle detection. BACKGROUND

[0002] At present, with the development of technology, unmanned aerial vehicles are widely used in the fields of electric power, meteorology, agriculture, distribution, etc. In order to ensure the safety of the unmanned aerial vehicle, it is necessary to detect whether there is an obstacle on the unmanned aerial vehicle landing platform in real time during the landing process of the unmanned aerial vehicle, so as to avoid the influence of the obstacle on the unmanned aerial vehicle landing platform on the landing of the unmanned aerial vehicle.

[0003] In the prior art, when performing obstacle detection, a method of optical flow, a background difference method, a Gaussian mixture model or a deep learning algorithm is generally used to achieve the obstacle detection. Among them, when the Gaussian mixture model is used to detect obstacles, first, a Gaussian mixture model is established, then a background difference method is used to obtain moving objects, and finally, the detection result of the current frame is output. SUMMARY

[0004] The present specification provides a method and device for obstacle detection to partially solve the above problems existing in the prior art.

[0005] The present specification adopts the following technical solutions:

[0006] The present specification provides a method for obstacle detection, comprising:

[0007] obtaining an image of a current frame, and determining a gradient histogram of the image;

[0008] inputting the gradient histogram into a Gaussian mixture model, and determining an obstacle detection result of the image output by the Gaussian mixture model;

[0009] when the obstacle detection result meets a preset condition, adjusting parameters of the Gaussian mixture model according to the gradient histogram, wherein the condition is that the detection result indicates that there is no obstacle in the image.

[0010] Optionally, obtaining an image of a current frame, and determining a gradient histogram of the image, specifically comprising:

[0011] obtaining an image of a current frame, dividing the image into a plurality of regions, and determining a gradient histogram of each region;

[0012] for each region, determining a gradient histogram component of each gradient direction according to the gradient histogram of the region and a preset gradient direction;

[0013] taking the gradient histogram components of each gradient direction in each region as the gradient histogram of the image.

[0014] Optionally, the gradient histogram is input into a Gaussian mixture model, and the obstacle detection result of the image output by the Gaussian mixture model is determined, specifically comprising:

[0015] For each region, the gradient histogram component corresponding to each gradient direction of the region is input into the Gaussian mixture model corresponding to each gradient direction, and the obstacle prediction result corresponding to each gradient direction output by the Gaussian mixture model corresponding to each gradient direction is determined.

[0016] According to the obstacle prediction result corresponding to each gradient direction, the obstacle prediction result of the region is determined.

[0017] According to the obstacle prediction result of each region, the obstacle detection result of the image is determined.

[0018] Optionally, the obstacle detection result of the image is determined according to the obstacle prediction result of each region, specifically comprising:

[0019] According to the region in which the obstacle prediction result of the image is an obstacle, a connected domain is determined.

[0020] It is judged whether the area of the connected domain is not less than a preset obstacle threshold.

[0021] If yes, it is determined that the obstacle detection result of the image is that there is an obstacle.

[0022] If no, it is determined that the obstacle detection result of the image is that there is no obstacle.

[0023] Optionally, the method further comprises:

[0024] Obtaining the obstacle detection result of each historical frame of a first number before the current frame; original result

[0025] From the current frame and the first number of each historical frame, the number of frames in which the obstacle detection result is an obstacle is determined as a second number.

[0026] It is judged whether the second number is greater than a preset third number.

[0027] If yes, the obstacle detection result of the current frame is updated to be that there is an obstacle; adjustment result

[0028] If no, the obstacle detection result of the current frame is updated to be that there is no obstacle.

[0029] Optionally, the method further comprises:

[0030] Obtaining the obstacle detection result of each historical frame of a fourth number before the current frame;

[0031] determine, from the current frame and the fourth number of historical frames, a number of frames in which the obstacle detection result is that an obstacle exists, as a fifth number;

[0032] determine whether the fifth number is not greater than a preset sixth number;

[0033] if yes, adjust parameters of the Gaussian mixture model according to the gradient histogram;

[0034] if no, do not adjust the parameters of the Gaussian mixture model.

[0035] Optionally, the gradient histogram of the image is determined, and specifically includes:

[0036] input the image into a preset first Gaussian function to determine a first filtering result;

[0037] input the image into a preset second Gaussian function to determine a second filtering result;

[0038] determine a Gaussian difference filtering result of the image according to a difference between the first filtering result and the second filtering result;

[0039] determine the gradient histogram of the image according to the Gaussian difference filtering result of the image.

[0040] The present specification provides an obstacle detection device, comprising:

[0041] an acquisition module that acquires an image of a current frame and determines a gradient histogram of the image;

[0042] a detection module that inputs the gradient histogram into a Gaussian mixture model and determines an obstacle detection result of the image output by the Gaussian mixture model;

[0043] a training module that, when the obstacle detection result meets a preset condition, adjusts parameters of the Gaussian mixture model according to the gradient histogram, wherein the condition is that the detection result indicates that the image does not contain an obstacle.

[0044] The present specification provides a computer-readable storage medium that stores a computer program, and the computer program is executed by a processor to implement the above obstacle detection method.

[0045] The present specification provides an unmanned aerial vehicle landing platform that includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the program to implement the above obstacle detection method.

[0046] The above at least one technical solution adopted by the present specification can achieve the following beneficial effects:

[0047] In the method for obstacle detection provided in the present specification, the unmanned aerial vehicle landing platform acquires an image of a current frame, determines a gradient histogram of the image, inputs the gradient histogram of the image into a Gaussian mixture model, determines an obstacle detection result output by the Gaussian mixture model, and then determines whether the obstacle detection result meets a preset condition according to the obstacle detection result. When the obstacle detection result meets the condition, the parameters of the Gaussian mixture model are adjusted using the gradient histogram of the image.

[0048] As can be seen from the above method, the gradient histogram of the image is creatively input into the Gaussian mixture model, which reduces the influence of light and shadow on the obstacle detection result. After the obstacle detection result of the image is determined, it is determined whether to update the parameters of the Gaussian mixture model by judging whether the image contains obstacles, which realizes selective updating of the Gaussian mixture model and improves the accuracy of the Gaussian mixture model in detecting obstacles in the image. BRIEF DESCRIPTION OF DRAWINGS

[0049] The accompanying drawings used to provide further understanding of the present specification, form a part of the present specification, the illustrative embodiments of the present specification and the description thereof are used to explain the present specification, and do not constitute improper limitation on the present specification. In the drawings:

[0050] Figure 1 It is a flowchart of the method for obstacle detection in the present specification;

[0051] Figure 2 It is a step schematic diagram of the method for obstacle detection provided in the present specification;

[0052] Figure 3 It is a schematic diagram of the device for obstacle detection provided in the present specification;

[0053] Figure 4 It is a schematic diagram of the unmanned aerial vehicle landing platform corresponding to Figure 1 provided in the present specification. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical scheme and advantages of the present specification clearer, the technical scheme of the present specification will be described clearly and completely in combination with the specific embodiments of the present specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present specification, not all the embodiments. Based on the embodiments in the present specification, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the present application.

[0055] At present, there are many existing object detection methods, such as gravity sensing method, ultrasonic wave detection method, target detection algorithm, etc. For the detection of foreground objects, deep learning algorithm, optical flow method, background difference, inter-frame difference, Gaussian mixture model, etc. are usually used to realize it. However, the existing object detection methods have defects, for example, the real-time performance of the optical flow method is poor, and it is easily affected by environmental changes such as light and shadow, and the detection effect of the Gaussian mixture model on static or slowly moving objects is poor.

[0056] In order to solve these problems, in one or more embodiments of the present specification, a method of object detection applied to the field of object detection, especially the field of obstacle detection of unmanned aerial vehicle landing platform is provided.

[0057] Among them, the field of obstacle detection of unmanned aerial vehicle landing platform is different from the traditional field of object detection. Different unmanned aerial vehicle landing platforms are located in different positions and have great differences in environmental background. Therefore, an object detection method with strong adaptability is needed. In addition, most unmanned aerial vehicle landing platforms are located outdoors and are easily affected by environmental disturbances such as light and shadow. Therefore, an object detection method with strong robustness is needed.

[0058] The technical solutions provided by the embodiments of the present specification will be described in detail below with reference to the drawings.

[0059] Figure 1 The flowchart of the method for obstacle detection in the present specification specifically includes the following steps:

[0060] S100: Obtain the image of the current frame and determine the gradient histogram of the image.

[0061] Since the method for obstacle detection provided in the present specification is applied to the unmanned aerial vehicle landing platform, it can be executed by the unmanned aerial vehicle landing platform. Of course, the present method can also be executed by a server, which is specifically a separate device or a distributed server system composed of multiple devices. The present specification does not make any limitation and can be set as needed.

[0062] Specifically, first, the unmanned aerial vehicle landing platform can obtain the image of the current frame, which is the image of the unmanned aerial vehicle landing platform collected at the current time according to the preset frame rate. And according to the preset pixel parameter, the image is divided into several regions with the same pixel size. The preset pixel parameter can be set as needed. If the preset pixel parameter is relatively large, it may lead to a decrease in the accuracy of the obstacle detection result. If the preset pixel parameter is relatively small, it may lead to an increase in the calculation cost. The size of the specific preset pixel parameter can be set according to the size of the image size, or it can be set as needed, and the present specification does not make any limitation.

[0063] Secondly, in order to determine the gradient histogram (Histogram of Oriented Gradient, HOG) of the image, i.e. the HOG feature map, the direction gradient histogram extraction can be performed on the image. According to each region in the image, for each region, the horizontal direction filter and the vertical direction filter are used to calculate the gradient amplitude of each pixel in the horizontal direction in the region and the gradient amplitude of each pixel in the vertical direction in the region, and then the gradient amplitude of each pixel in the region and the gradient direction of each pixel in the region are determined. The horizontal direction filter and the vertical direction filter used can be set as needed. For example, the Sobel filter is used for calculation. The specific filter used for calculation can be set as needed, and the present specification does not limit it.

[0064] Thirdly, according to the preset gradient directions, the gradient amplitude of each pixel in each gradient direction is determined according to the gradient amplitude of each pixel in the region and the gradient direction of each pixel in the region. And for each gradient direction, the gradient amplitude of each pixel in the gradient direction is accumulated according to the gradient amplitude of each pixel in the gradient direction in the region, and the gradient histogram component of the gradient direction in the region is determined.

[0065] Finally, the gradient histogram components of each gradient direction of each region determined are taken as the gradient histogram of the image, and it can be seen that the gradient histogram of the image is composed of the gradient histogram components of each gradient direction of each region. And when the parameters of the Gaussian mixture model are adjusted using the gradient histogram of the image, the gradient histogram components of each gradient direction of each region are respectively used to adjust the Gaussian mixture model corresponding to each gradient direction.

[0066] S102: input the gradient histogram into the Gaussian mixture model, and determine the obstacle detection result of the image output by the Gaussian mixture model.

[0067] In one or more embodiments of the present specification, after the establishment of the gradient histogram of the image is completed, for each region in the image, the obstacle prediction result corresponding to each gradient direction in the region is determined according to the gradient histogram component of each gradient direction in the region and each Gaussian mixture model corresponding to each gradient direction, and the obstacle prediction result of the region is determined. And then the obstacle detection result of the image is determined according to the obstacle prediction result of each region of the image.

[0068] Specifically, first, a gradient histogram of each region of the image is obtained, and for each region, gradient histogram components of each gradient direction in the region are determined. The gradient histogram components of each gradient direction in the region are respectively input into each Gaussian mixture model corresponding to each gradient direction to determine an obstacle prediction result of each gradient direction of an output of each Gaussian mixture model corresponding to each gradient direction. Each Gaussian mixture model is stored and is trained according to gradient histogram components of each gradient direction of a historical frame.

[0069] Second, according to the obstacle prediction results of each gradient direction in the region, the number of obstacle prediction results of each gradient direction in the obstacle prediction results of each gradient direction is determined. According to the number and a preset number threshold, it is judged whether the number is not less than the preset number threshold. If yes, it is determined that the obstacle prediction result of the region is that there is an obstacle. If no, it is determined that the obstacle prediction result of the region is that there is no obstacle.

[0070] The above process of determining the obstacle prediction result of the region can be expressed by a formula as follows:

[0071]

[0072] Wherein, P is the obstacle prediction result of the region, P=0 indicates that the obstacle prediction result of the region is that there is no obstacle, P=1 indicates that the obstacle prediction result of the region is that there is an obstacle, p i represents the prediction result of the i-th gradient direction in the region, represents the number of gradient directions in which the prediction result is that there is an obstacle in the prediction results of each gradient direction in the region, and th represents a preset number threshold. Specifically, according to the prediction results of each gradient direction in the region, the number of gradient directions in which the prediction result is that there is an obstacle in the prediction results of each gradient direction in the region is determined. If the number is less than the preset number threshold, it is determined that the obstacle prediction result of the region is that there is no obstacle. If the number is not less than the preset number threshold, it is determined that the obstacle prediction result of the region is that there is an obstacle. The obstacle prediction result of the region is the foreground target detection result of the region.

[0073] Then, according to the obstacle prediction results of each region in the image, a region in which the obstacle prediction result is that there is an obstacle is determined. A connected domain formed by each region in which the obstacle prediction result is that there is an obstacle is determined, and an area of the connected domain is determined. According to the area of the connected domain and a preset obstacle threshold, it is judged whether the area of the connected domain is not less than the obstacle threshold. If yes, it is determined that the obstacle detection result of the image is that there is an obstacle. If no, it is determined that the obstacle detection result of the image is that there is no obstacle.

[0074] S104: adjusting parameters of the Gaussian mixture model according to the gradient histogram when the obstacle detection result meets a preset condition, wherein the condition is that the detection result indicates that the image does not have an obstacle.

[0075] In one or more embodiments of the present specification, after the gradient histogram of the image is determined, the UAV landing platform can adjust the parameters of the Gaussian mixture model according to the gradient histogram of the image to weaken the influence of environmental background changes on the obstacle detection result of each image, thereby improving the accuracy of the Gaussian mixture model in detecting whether an image has an obstacle.

[0076] However, since there may be an obstacle on the UAV landing platform when the image is captured, the image contains an obstacle belonging to the foreground, and if the gradient histogram corresponding to the image containing the obstacle is used to adjust the parameters of each Gaussian mixture model, the model parameters will be inaccurate. That is, the characteristics of the obstacle belonging to the foreground may be learned and used as the characteristics of the background, resulting in errors in subsequent obstacle detection. That is, the image containing the obstacle is a negative sample for each Gaussian mixture model. However, each Gaussian mixture model provided in the present specification is used to identify obstacles in an image and can dynamically learn background changes, and the negative sample can only cause the adjustment of the parameters of each Gaussian mixture model to be incorrect.

[0077] Therefore, in order to avoid adjusting the parameters of the Gaussian mixture model using the gradient histogram corresponding to the image containing the obstacle, it is determined in advance whether the obstacle detection result of the image is that there is no obstacle, and when the obstacle detection result of the image is that there is no obstacle, the gradient histogram corresponding to the image is used to adjust the parameters of the Gaussian mixture model.

[0078] Specifically, according to the obstacle detection result of the image, it is determined whether the obstacle detection result of the image meets a preset condition, and if so, the gradient histogram components of each gradient direction in each region of the image are determined according to the gradient histogram of the image. And for each gradient direction, the parameters of the Gaussian mixture model corresponding to the gradient direction are adjusted according to the gradient histogram components of the gradient direction. In order to detect obstacles in the subsequently acquired images according to the adjusted Gaussian mixture model. If not, the parameters of the Gaussian mixture model are not adjusted.

[0079] The condition is that the obstacle detection result of the image indicates that the image does not have an obstacle.

[0080] Based on Figure 1The method for object detection shown in the application comprises the following steps: acquiring an image of a current frame by a UAV landing platform, determining a gradient histogram of the image, inputting the gradient histogram of the image into a Gaussian mixture model, determining an obstacle detection result output by the Gaussian mixture model, and determining whether the obstacle detection result meets a preset condition according to the obstacle detection result, and adjusting parameters of the Gaussian mixture model using the gradient histogram of the image when the obstacle detection result meets the condition.

[0081] As can be seen from the above method, the gradient histogram of the image is creatively input into the Gaussian mixture model, thereby reducing the influence of light and shadow on the obstacle detection result. After the obstacle detection result of the image is determined, it is determined whether the parameters of the Gaussian mixture model are updated by judging whether the image contains obstacles, thereby realizing selective updating of the Gaussian mixture model and improving the accuracy of the Gaussian mixture model in detecting obstacles in the image.

[0082] In addition, in one or more embodiments of the present specification, in step S100, in order to more accurately determine the information of the obstacles in the image and reduce the influence of the contrast of the image on the accuracy of the obstacle detection method provided by the present specification, the image can be preprocessed.

[0083] Specifically, first, an image of a current frame is acquired, and the image is preprocessed. The specific manner of preprocessing can be set as required.

[0084] For example, the image is subjected to histogram equalization processing. Specifically, the image is converted into a gray image, and for each pixel point of the image, the gray level of the pixel point is determined. Then, according to the gray levels of the pixel points, each gray level is normalized to determine the probability of each gray level in the histogram distribution, and then the cumulative value of the probabilities of the gray levels in the histogram distribution is determined. Then, the gray levels are converted according to a preset conversion relationship to determine the equalized gray levels of the pixel points. Finally, a mapping relationship between the gray levels of the original image and the equalized gray levels is determined according to a preset mapping relationship, and an image subjected to histogram equalization processing is determined according to the mapping relationship between the gray levels of the original image and the equalized gray levels.

[0085] Alternatively, the image is subjected to filtering processing using a Gaussian function. Specifically, an image of a current frame is acquired, the image is input into a preset first Gaussian function to obtain a first filtering result, and the image is input into a preset second Gaussian function to obtain a second filtering result. A Gaussian difference filtering result is determined according to the difference between the first filtering result and the second filtering result. The Gaussian difference filtering result is the image subjected to filtering processing.

[0086] The process of determining the Gaussian difference filtering result can be expressed by a formula as follows:

[0087]

[0088] wherein, is a Gaussian difference filtering result, I(x, y) is a current frame image, (x, y) is a pixel point in the current frame image, σ1 is a preset parameter of a first Gaussian function, σ2 is a preset parameter of a second Gaussian function, G(I(x, y), σ1) is a first filtering result of each pixel point obtained by inputting each pixel point of the current frame image into the first Gaussian function with σ1 as the preset parameter. Similarly, G(I(x, y), σ2) is a second filtering result of each pixel point obtained by inputting each pixel point of the current frame image into the second Gaussian function with σ2 as the preset parameter. The first filtering result and the second filtering result are subtracted to determine the Gaussian difference filtering result of the image. In this way, the Gaussian difference filtering processing of the image can be realized.

[0089] Of course, the image can also be preprocessed by gamma correction or other methods. The specific methods can be set according to needs, and the present specification does not limit the methods.

[0090] In addition, in one or more embodiments of the present specification, the UAV take-off and landing platform does not work all the time. That is, when the UAV take-off and landing platform detects the image collected in the UAV take-off and landing process, the environment background around the UAV take-off and landing platform may have changed greatly when the next image needs to be detected. The Gaussian mixture model trained based on the last collected data may not be used.

[0091] For example, the Gaussian mixture model is trained according to the collected image at 3 pm, and the collected image is detected for obstacles at 3 pm. At the current time, 9 pm, the image needs to be collected again, and the collected image needs to be detected for obstacles. Since the background of the image collected this time is greatly different from the background of the image collected last time, the Gaussian mixture model trained based on the image collected last time is not suitable for detecting obstacles in the image collected this time.

[0092] Therefore, each time the UAV take-off and landing platform starts to work, the Gaussian mixture model needs to be reconstructed according to the first frame of image, and the Gaussian mixture model needs to be adjusted through the subsequent frames of image.

[0093] Specifically, it is determined whether the image is the first frame of image. If yes, the Gaussian mixture model is established and stored for each gradient direction according to the gradient histogram components of each region and each gradient direction in the image.

[0094] And, since there is no obstacle on the default unmanned aerial vehicle landing platform at the time of collecting the first frame image. Therefore, using the gradient histogram components of each region and each gradient direction corresponding to the first frame image, a Gaussian mixture model is established, which can realize the learning of the background of the image and will not learn the features of the obstacles, so as to facilitate the obstacle detection of the subsequently collected images.

[0095] In addition, in one or more embodiments of the present specification, in order to more accurately determine the obstacle detection result, the Gaussian mixture model can be established or updated in time according to the HOG feature map of each region corresponding to the image, so as to detect the obstacles in the image according to the latest Gaussian mixture model.

[0096] Specifically, first, according to the image of the previous frame of the current frame, the HOG feature map of each region corresponding to the image is determined respectively, and the HOG feature map of each region corresponding to the image is taken as the training data, wherein the HOG feature map of each region is a feature map representing the gradient histogram of each gradient direction of the region.

[0097] Secondly, for each preset gradient direction, the Gaussian mixture model of the gradient direction is learned according to the training data and the gradient histogram of the gradient direction.

[0098] In addition, in one or more embodiments of the present specification, in order to realize more accurate obstacle detection, a multi-scale fusion method can be used to improve the accuracy of obstacle detection.

[0099] Specifically, first, according to the preset plurality of pixel parameters, the image can be divided into a plurality of regions with the same pixel size according to each pixel parameter. And for the division result of the image according to each pixel parameter, the method provided in step S100 is used to establish the gradient histogram of each region, i.e. the HOG feature map, for each region.

[0100] Secondly, according to each HOG feature map determined according to each pixel parameter, the pixel scale of each HOG feature map is determined. And for each HOG feature map, the HOG feature maps are fused in order from low to high according to the pixel scale, wherein the process of fusing each HOG feature map can be realized by adding weighted values. That is, according to the preset weight, each HOG feature map is multiplied by the corresponding weight as the weight of each HOG feature map, and each weight is added to determine the HOG feature map after multi-scale feature fusion.

[0101] In addition, in one or more embodiments of the present specification, in order to improve the accuracy of the obstacle detection method provided in the present specification for detecting static or slow-moving obstacles, the Gaussian mixture model can be adaptively updated.

[0102] Specifically, first, an image of a current frame is acquired, and whether the frame number of the current frame is less than a preset frame number threshold is determined according to the frame number of the current frame and the preset frame number threshold. If the frame number is less than the preset frame number threshold, HOG feature maps of each region corresponding to the image are determined according to the image of the current frame, and parameters of a Gaussian mixture model corresponding to each gradient direction are adjusted according to gradient histogram components in each region in the gradient direction.

[0103] In addition, in one or more embodiments of the present specification, in order to improve the accuracy of the obstacle detection method provided by the present specification for detecting static or slowly moving obstacles, the Gaussian mixture model can be adaptively updated.

[0104] Specifically, if the frame number of the image is not less than the preset frame number threshold, obstacle detection results of a fourth number of historical frames before the current frame are acquired respectively, and a fifth number is determined as the number of frames in which the obstacle detection result is an existing obstacle from the current frame and the fourth number of historical frames before the current frame. Then, whether the fifth number is greater than a preset sixth number is determined. If yes, the update of the Gaussian mixture model is not performed. If no, HOG feature maps of each region corresponding to the image are determined according to the image of the current frame, and parameters of a Gaussian mixture model corresponding to each preset gradient direction are adjusted according to gradient histogram components in each region in the gradient direction.

[0105] For example, the fourth number is 9, the total number of the current frame and the fourth number of frames before the current frame is 10, and the preset sixth number is 7. Then, in the 10 images, the number of obstacle detection results in which the obstacle exists is 8, that is, the fifth number is 8. Therefore, since the fifth number 8 is greater than the sixth number 7, the parameters of the Gaussian mixture model are not adjusted.

[0106] In addition, in one or more embodiments of the present specification, before step S104, in order to avoid the influence of noise and holes in the image on the result of obstacle detection, the image can be processed after the prediction result of the obstacle in each region is determined.

[0107] Specifically, first, the image in which the prediction result of the obstacle in each region is completed is acquired, and the image is subjected to median filtering processing to reduce the influence of noise in the image on the result of obstacle detection.

[0108] Secondly, the image subjected to the median filtering processing is acquired, and the image is subjected to a morphological closing operation to reduce the influence of holes in the image on the result of obstacle detection.

[0109] Of course, the image can also be processed in other ways, and the specific way can be set according to actual needs, and the description is not limited.

[0110] In addition, in one or more embodiments of the present specification, in order to avoid false alarms caused by noise prediction results of some frames, before determining the result of obstacle detection of the current frame, the prediction results of the foreground objects of the current frame and the previous several frames can be smoothed to determine the final output result of obstacle detection of the current frame.

[0111] Specifically, first, the obstacle detection results of the first number of historical frames before the current frame are obtained, and then the number of frames with obstacle detection results of existing obstacles is determined from the current frame and the first number of historical frames before the current frame as a second number.

[0112] Secondly, it is judged whether the second number is greater than a preset third number, if yes, the obstacle detection result of the current frame is updated to exist obstacles, if not, the obstacle detection result of the current frame is updated to non-existence obstacles.

[0113] For example, the first number is 9, the total number of the current frame and the first number of frames before the current frame is 10, and the preset third number is 7. If the number of frames with obstacle detection results of existing obstacles is 8 in 10 frames of images, i.e. the second number is 8. Therefore, the obstacle detection result of the current frame is updated to exist obstacles because the second number 8 is greater than the third number 7.

[0114] It should be noted that the obstacle detection result before the current frame is updated is the original result. The obstacle detection result after the current frame is updated is the adjusted result. When calculating the second number corresponding to any frame of image, the original result of each frame of image is used for calculation, which is irrelevant to the adjusted result of each frame of image.

[0115] For example, the obstacle detection result of the 6th frame is existing obstacles, i.e. the original result of the 6th frame is existing obstacles. The updated output result is non-existing obstacles, i.e. the adjusted result of the 6th frame is non-existing obstacles. Therefore, when calculating the second number corresponding to the 7th frame, the original result is used for calculation, i.e. the obstacle detection result of the 6th frame is existing obstacles.

[0116] In addition, the first number and the fourth number mentioned in one or more embodiments of the present specification can be the same or different, and the specific values of the first number and the fourth number can be set according to actual needs, and the description is not limited. The third number and the sixth number mentioned in one or more embodiments of the present specification can be the same or different, and the specific values of the third number and the sixth number can be set according to actual needs, and the description is not limited.

[0117] In one or more embodiments of the present disclosure, when the multiple connected domains are determined in step S102, the obstacle prediction result of the image can be determined in the following manner.

[0118] Specifically, after the obstacle prediction result of each region is determined, if the obstacle prediction result is that the multiple connected domains are formed by the regions in which obstacles exist, for each connected domain, it is determined whether the area of the connected domain is not less than the preset obstacle threshold according to the area of the connected domain and the preset obstacle threshold. If the determination result of at least one connected domain is yes among the multiple connected domains, it is determined that the obstacle detection result of the image is that obstacles exist. If the determination result of the multiple connected domains is no, it is determined that the obstacle detection result of the image is that obstacles do not exist.

[0119] In one or more embodiments of the present disclosure, when the multiple connected domains are determined in step S102, the obstacle prediction result of the image can be determined in the following manner.

[0120] Specifically, after the obstacle prediction result of each region is determined, if the obstacle prediction result is that the multiple connected domains are formed by the regions in which obstacles exist, the area of each connected domain is determined respectively, and the sum of the areas of the multiple connected domains is determined as a synthetic area. It is determined whether the synthetic area is not less than the preset obstacle threshold according to the synthetic area and the preset obstacle threshold. If yes, it is determined that the obstacle detection result of the image is that obstacles exist. If no, it is determined that the obstacle detection result of the image is that obstacles do not exist.

[0121] In one or more embodiments of the present disclosure, in order to avoid large deviation of the gradient histogram components of the same gradient direction in multiple regions, after the gradient histogram components of each gradient direction in any region are determined in step S100, the gradient histogram components of each gradient direction in the region can be normalized.

[0122] Specifically, first, for each region, the gradient amplitudes in each gradient direction in the region are obtained according to the gradient histogram components of each gradient direction in the region, and the sum of the gradient amplitudes in each gradient direction in the region is determined as the gradient total value of the region.

[0123] Secondly, according to the total gradient value of the region and the gradient amplitude in each gradient direction in the region, the proportion of the gradient amplitude in each gradient direction in the region in the total gradient value in the region is determined, and the gradient amplitude in each gradient direction in the region is normalized. Then, according to the normalized gradient amplitude in each gradient direction in the region, the gradient histogram of the region and the gradient histogram components of each gradient direction in the region are determined. The gradient histogram components of each gradient direction in each region are taken as the gradient histogram of the image.

[0124] The present specification also provides a schematic diagram of steps of a method for obstacle detection according to one or more embodiments, as shown in Figure 2

[0125] S200: The unmanned aerial vehicle landing platform determines the opening information.

[0126] In order to avoid the safety impact of obstacles such as birds and fallen leaves on the unmanned aerial vehicle landing on the unmanned aerial vehicle landing platform, the unmanned aerial vehicle landing platform can be provided with a protection device. The protection device is closed when there is no unmanned aerial vehicle landing, so as to prevent the above-mentioned obstacles from falling into the unmanned aerial vehicle landing platform, and is opened when the unmanned aerial vehicle needs to land. Among them, the common protection device includes setting a openable and closable protective cover on the visual guidance beacon, opening when the unmanned aerial vehicle needs to land, or a hatch closing device, opening the hatch when the unmanned aerial vehicle needs to land, so that the unmanned aerial vehicle can successfully land on the unmanned aerial vehicle landing platform, and the unmanned aerial vehicle is pushed to the inside of the unmanned aerial vehicle landing platform through the pushing device provided on the unmanned aerial vehicle landing platform, reducing the influence of external environmental factors on the unmanned aerial vehicle.

[0127] Specifically, when the opening information is detected, the unmanned aerial vehicle landing platform sends an acquisition instruction to the image sensor provided on the unmanned aerial vehicle landing platform, so that the image sensor acquires an image. The opening information can be sent by the unmanned aerial vehicle to the unmanned aerial vehicle landing platform. Alternatively, when the unmanned aerial vehicle landing platform detects the unmanned aerial vehicle that needs to land, the opening information is determined by the unmanned aerial vehicle landing platform. Alternatively, the server planning the flight of the unmanned aerial vehicle determines the opening information and sends it to the unmanned aerial vehicle landing platform.

[0128] Of course, if the unmanned aerial vehicle landing platform does not have a protection device, the unmanned aerial vehicle landing platform can also obtain the opening information sent by the unmanned aerial vehicle that needs to land, so as to determine whether there is an obstacle on the unmanned aerial vehicle landing platform according to the opening information, and notify the unmanned aerial vehicle to stop landing when it is determined that there is an obstacle, or notify the unmanned aerial vehicle to land normally when it is determined that there is no obstacle on the unmanned aerial vehicle landing platform. Alternatively, when the unmanned aerial vehicle that needs to land on the unmanned aerial vehicle landing platform reaches above the unmanned aerial vehicle landing platform, the server planning the flight of the unmanned aerial vehicle sends the opening information to the unmanned aerial vehicle landing platform. Then, the unmanned aerial vehicle landing platform can receive the opening information sent by the server.​

[0129] And the image sensor of the UAV landing platform can also collect images all the time, that is, the UAV landing platform collects images all the time and detects obstacles in the collected images, regardless of whether a signal that the UAV is about to land or take off is acquired.

[0130] S202: Acquire an image of a current frame.

[0131] The image of the current frame is acquired by an image sensor arranged on the UAV landing platform, wherein the image is an image of the UAV landing platform.

[0132] S204: Preprocess the image of the current frame.

[0133] The image is preprocessed by the UAV landing platform, for example, Gaussian filtering processing, gamma correction processing, etc.

[0134] S206: Determine a multi-scale fused gradient histogram according to the preprocessed image.

[0135] According to a plurality of preset pixel parameters, the preprocessed image is divided into a plurality of regions of the same pixel size according to each pixel parameter, respectively. And respectively determine the gradient histogram of the image after being divided according to a plurality of pixel parameters. Then, according to the plurality of pixel parameters, the pixel scales of each gradient histogram are determined. Then, according to the order from low to high of the pixel scales, the gradient histograms are fused, wherein the process of fusing the gradient histograms can adopt the way of adding weights. That is, according to the preset weight, each gradient histogram is multiplied by the corresponding weight as the weight of each gradient histogram, and each weight is added to determine the multi-scale feature fused gradient histogram.

[0136] S208: Determine whether the current frame is the first frame, if the determination result is yes, execute step S210, if the determination result is no, execute step S212.

[0137] S210: Establish a Gaussian mixture model according to the gradient histogram of the image of the current frame.

[0138] Since the UAV landing platform does not detect obstacles in images all the time. Therefore, when the UAV landing platform acquires images each time and detects obstacles in the images, the Gaussian mixture model trained historically has become unusable due to changes in the environment background, so the UAV landing platform needs to rebuild the Gaussian mixture model according to the first frame image obtained each time when it starts to detect obstacles in images, and adjust the Gaussian mixture model through subsequent frame images.

[0139] According to the gradient histogram of the current frame image, a Gaussian mixture model is established.

[0140] S212: foreground object detection.

[0141] When the image of the current frame is not the first frame image, the image of the current frame needs to be detected for obstacles. The image of the current frame is divided into several regions, and the gradient histogram components of each gradient direction in each region are input into the Gaussian mixture model corresponding to each gradient direction to determine the obstacle prediction result of each gradient direction. When the obstacle prediction result of each gradient direction in the region is that the number of existing obstacles is not less than the preset number threshold, it is determined that the region is a foreground region, and when the obstacle prediction result of each gradient direction in the region is that the number of existing obstacles is less than the preset number threshold, it is determined that the region is not a foreground region. The foreground object detection of the current frame image is realized.

[0142] S214: determining whether the frame number of the current frame is less than a preset frame number threshold.

[0143] If the frame number of the current frame is less than the preset frame number threshold, it is determined that there is no obstacle on the UAV take-off and landing platform, and the gradient histogram of the current frame image can be directly used to adjust the parameters of the Gaussian mixture model. Specifically, it is determined whether the frame number of the current frame is less than the preset frame number threshold, and if yes, step S218 is executed, and if no, step S216 is executed.

[0144] S216: determining whether the foreground area of the previous several frames is greater than a preset foreground threshold.

[0145] The sum of the areas of the foreground object detection results in any frame image is the foreground area of the frame image. If the foreground area of the frame image is greater than the preset foreground threshold, it means that there is an obstacle in the frame image. If the foreground object detection results of the previous several frames are all greater than the preset foreground threshold, that is, the previous several frame images all have obstacles, the current frame image is also likely to have obstacles, and the gradient histogram of the current frame image is not used to adjust the parameters of the Gaussian mixture model. Specifically, it is determined whether the foreground area of the previous several frames is greater than the preset foreground threshold, and if yes, step S220 is executed, and if no, step S218 is executed.

[0146] S218: adjusting the parameters of the Gaussian mixture model according to the gradient histogram of the image.

[0147] The parameters of the Gaussian mixture model are adjusted according to the gradient histogram of the image, that is, the gradient histogram components of each gradient direction of each region of the image.

[0148] S220: morphological processing to determine the region with obstacle prediction result.

[0149] In order to avoid the influence of noise and holes in the image on the obstacle detection, the image is morphologically processed. The obstacle prediction result is determined as the region in which the obstacle exists.

[0150] S222: According to the connected domain formed according to the region in which the obstacle prediction result is that the obstacle exists, the obstacle detection result of the image is determined.

[0151] According to the connected domain formed according to the region in which the obstacle prediction result is that the obstacle exists, the area of the connected domain is determined, and it is judged whether the area of the connected domain is not less than a preset obstacle threshold. If yes, it is determined that the obstacle detection result of the current frame image is that the obstacle exists. If no, it is determined that the obstacle detection result of the current frame image is that the obstacle does not exist.

[0152] The above is the method of object detection provided by one or more embodiments of the present specification. Based on the same idea, the present specification also provides a corresponding object detection device, as shown in Figure 3 .

[0153] Figure 3 The present specification provides a device for obstacle detection, and the device includes:

[0154] The acquisition module 300 acquires the image of the current frame and determines the gradient histogram of the image.

[0155] The detection module 302 inputs the gradient histogram into the Gaussian mixture model and determines the obstacle detection result of the image output by the Gaussian mixture model.

[0156] The training module 304 adjusts the parameters of the Gaussian mixture model according to the gradient histogram when the obstacle detection result meets a preset condition, wherein the condition is that the detection result indicates that the image does not have an obstacle.

[0157] Optionally, the acquisition module 300 acquires the image of the current frame, divides the image into a plurality of regions, and determines the gradient histogram of each region. For each region, the gradient histogram component of each gradient direction is determined according to the gradient histogram of the region and the preset gradient direction. The gradient histogram component of each gradient direction in each region is taken as the gradient histogram of the image.

[0158] Optionally, the detection module 302 determines the connected domain according to the region in which the obstacle prediction result is that the obstacle exists in the image, judges whether the area of the connected domain is not less than a preset obstacle threshold, if yes, determines that the obstacle detection result of the image is that the obstacle exists, and if no, determines that the obstacle detection result of the image is that the obstacle does not exist.

[0159] Optionally, the detection module 302 acquires the obstacle detection result of each of the first number of historical frames before the current frame, determines the number of frames in which the obstacle detection result is the existence of an obstacle from the current frame and the first number of historical frames, as a second number, judges whether the second number is greater than a preset third number, if yes, updates the obstacle detection result of the current frame as the existence of an obstacle, and if not, updates the obstacle detection result of the current frame as the non-existence of an obstacle.

[0160] Optionally, the training module 304 acquires the obstacle detection result of each of the fourth number of historical frames before the current frame, determines the number of frames in which the obstacle detection result is the existence of an obstacle from the current frame and the fourth number of historical frames, as a fifth number, judges whether the fifth number is not greater than a preset sixth number, if yes, adjusts the parameters of the Gaussian mixture model according to the gradient histogram, and if not, does not adjust the parameters of the Gaussian mixture model.

[0161] Optionally, the acquisition module 300 inputs the image into a preset first Gaussian function to determine a first filtering result, inputs the image into a preset second Gaussian function to determine a second filtering result, determines a Gaussian difference filtering result of the image according to the difference between the first filtering result and the second filtering result, and determines a gradient histogram of the image according to the Gaussian difference filtering result of the image.

[0162] The specification also provides a computer readable storage medium storing a computer program, which can be used to execute the above Figure 1 The provided obstacle detection method.

[0163] The specification also provides Figure 4 The schematic structural diagram of the unmanned aerial vehicle landing platform is shown. As Figure 4 At the hardware level, the unmanned aerial vehicle landing platform includes a processor, an image sensor, an internal bus, a network interface, a memory, and a non-volatile memory, and of course can also include other hardware required by the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs to implement the above Figure 1 The obstacle detection method. Of course, in addition to the software implementation, the specification does not exclude other implementation manners, such as logic devices or a combination of software and hardware, and so on, that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or a logic device.

[0164] In the 1990s, it was quite obvious to distinguish whether an improvement in a technology was in hardware (e.g., improvement in circuit structures of diodes, transistors, switches, etc.) or in software (improvement in method flow). However, as technology has evolved, many improvements in method flow today can be considered as direct improvements in hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structures by programming the improved method flow into hardware circuits. Therefore, it cannot be said that an improvement in a method flow cannot be implemented by hardware entity modules. For example, a programmable logic device (PLD) (e.g., a field programmable gate array (FPGA)) is an integrated circuit whose logic function is determined by user programming of the device. A digital system is "integrated" on a PLD by the designer programming it, rather than by asking a chip manufacturer to design and fabricate a custom integrated circuit chip. Moreover, instead of manually fabricating integrated circuit chips, this programming is now mostly implemented by "logic compiler" software, which is similar to software compilers used in program development, and the original code to be compiled is written in a specific programming language, which is called a hardware description language (HDL), and there are many such languages, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., and the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should be aware that, as long as the method flow is logically programmed in the above-mentioned hardware description languages and programmed into an integrated circuit, a hardware circuit implementing the logical method flow can be easily obtained.

[0165] The controller can be implemented in any suitable way, for example, the controller can take the form of a microprocessor or processor and a computer readable medium storing computer readable program code, such as software or firmware, executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that, in addition to being implemented in pure computer readable program code, the controller can equally well be implemented to perform the same functions using logic gates, switches, an application specific integrated circuit, a programmable logic controller and an embedded microcontroller, etc. by means of a logical programming of the method steps. The controller can thus be considered as a hardware component, and the means comprised therein for performing the various functions can be considered as structures within the hardware component. Alternatively, the means for performing the various functions can even be considered as both a software module implementing the method and a structure within the hardware component.

[0166] The systems, apparatuses, modules or units illustrated by the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0167] For the sake of description, the above apparatuses are described in various units by functions respectively. Of course, the functions of each unit can be implemented in one or more software and / or hardware in the implementation of the present specification.

[0168] Those skilled in the art will understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.

[0169] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof.

[0170] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof.

[0171] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof. ​ one or more flowcharts and / or blocks in the flowcharts and / or combination thereof.

[0172] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0173] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, non-volatile memory, such as read-only memory (ROM), EPROM, and / or flash memory. The memory is an example of computer-readable media.

[0174] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.

[0175] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover non-exclusive inclusion, such that processes, methods, articles or devices that comprise a list of elements do not only include those elements, but also other elements not explicitly listed or inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.

[0176] Those skilled in the art will appreciate that embodiments of the present specification can be provided as methods, systems or computer program products. Therefore, the present specification can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present specification can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) containing computer-usable program code.

[0177] The present specification can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The present specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including storage devices.

[0178] The various embodiments described in this specification are described using a numbering of embodiments approach: these are each individually integrated contributions pertaining to different aspects of the description. For each embodiment, the description focuses on the differences from the other embodiments. Each embodiment is to be read in isolation, with the understanding that the same or similar features from other embodiments can be combined with the features of the respective embodiment. In particular, the description of the system embodiments is kept relatively short, as the system embodiments are largely analogous to the method embodiments.

[0179] The above description is embodied in the form of only a description of embodiments of the present specification, and is not intended to limit the present specification. Various changes and modifications can be made by those skilled in the art based on the present specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present application.

Claims

1. A method of obstacle detection, characterized in that, The method comprises: obtaining an image of a current frame, determining a gradient histogram of the image; inputting the gradient histogram into a Gaussian mixture model, determining an obstacle detection result of the image output by the Gaussian mixture model; when the obstacle detection result meets a preset condition, adjusting parameters of the Gaussian mixture model according to the gradient histogram, wherein the condition is that the detection result indicates that the image does not contain obstacles; wherein, obtaining an image of a current frame, determining a gradient histogram of the image, specifically comprises: obtaining an image of a current frame, dividing the image into a plurality of regions, and determining the gradient histogram of each region; for each region, determining the gradient histogram component of each gradient direction according to the gradient histogram of the region and the preset gradient direction; the gradient histogram component of each gradient direction in each region is taken as the gradient histogram of the image; wherein, inputting the gradient histogram into a Gaussian mixture model, determining an obstacle detection result of the image output by the Gaussian mixture model, specifically comprises: for each region, inputting the gradient histogram component corresponding to each gradient direction of the region into the Gaussian mixture model corresponding to each gradient direction respectively, and determining the obstacle prediction result corresponding to each gradient direction output by the Gaussian mixture model corresponding to each gradient direction; determining the obstacle prediction result of the region according to the obstacle prediction result corresponding to each gradient direction; determining the obstacle detection result of the image according to the obstacle prediction result of each region.

2. The method of claim 1, wherein, determining the obstacle detection result of the image according to the obstacle prediction result of each region, specifically comprises: determining a connected domain according to the region in the image whose obstacle prediction result is that there is an obstacle; judging whether the area of the connected domain is not less than a preset obstacle threshold; if yes, determining that the obstacle detection result of the image is that there is an obstacle; if no, determining that the obstacle detection result of the image is that there is no obstacle.

3. The method of claim 1, wherein, The method further comprises: obtaining the obstacle detection result of each historical frame before the current frame within a first number; determining the number of frames whose obstacle detection result is that there is an obstacle from the current frame and the first number of historical frames, as a second number; judging whether the second number is greater than a preset third number; if yes, updating the obstacle detection result of the current frame to be that there is an obstacle; if no, updating the obstacle detection result of the current frame to be that there is no obstacle.

4. The method of claim 1, wherein, The method further comprises: obtaining the obstacle detection result of each historical frame before the current frame within a fourth number; determining the number of frames whose obstacle detection result is that there is an obstacle from the current frame and the fourth number of historical frames, as a fifth number; judging whether the fifth number is not greater than a preset sixth number; if yes, adjusting the parameters of the Gaussian mixture model according to the gradient histogram; if no, not adjusting the parameters of the Gaussian mixture model.

5. The method of claim 1, wherein, determining the gradient histogram of the image, specifically comprises: inputting the image into a preset first Gaussian function to determine a first filtering result; inputting the image into a preset second Gaussian function to determine a second filtering result; determining a Gaussian difference filtering result of the image according to a difference between the first filtering result and the second filtering result; determining a gradient histogram of the image according to the Gaussian difference filtering result of the image.

6. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program is executed by the processor to implement the method in any one of claims 1-5.

7. An unmanned aerial vehicle landing platform comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program comprises instructions for: The processor executes the program to implement the method in any one of claims 1-5.

Citation Information

Patent Citations

  • Edge detection method based on gray-scale image of specific class

    CN102521836A

  • Video technology based secure and smart recognition method for railway crossing protection zone

    CN104951775A