Road obstacle detection method, detection device, electronic equipment and storage medium

By using depth information for ground detection and obstacle recognition, the problems of low accuracy and privacy leakage in existing technologies are solved, achieving efficient and accurate obstacle detection in various environments and reducing algorithm requirements and power consumption.

CN116091393BActive Publication Date: 2025-11-04GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211086335.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-06
Publication Date
2025-11-04
Estimated Expiration
2042-09-06

AI Technical Summary

Technical Problem

Existing smartphone-based obstacle detection methods mainly rely on visible light cameras, which have low accuracy, especially in nighttime or low-light conditions, and pose a risk of privacy leaks. They also require high computational power.

Method used

Ground detection is performed using depth information to identify ground regions in depth images and determine the presence of obstacles based on the depth information of the surrounding area. Depth information is acquired using a lidar module or a time-of-flight module, reducing reliance on visible light cameras and improving the accuracy of obstacle recognition and privacy protection.

Benefits of technology

Accurately identify obstacles under various environmental conditions, reduce computational load, lower the algorithm's computational power requirements, protect privacy, and save power consumption of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116091393B_ABST
    Figure CN116091393B_ABST
Patent Text Reader

Abstract

The application discloses a road obstacle detection method, a road obstacle detection device, an electronic device and a storage medium. The road obstacle detection method comprises the following steps: acquiring a depth image of a first scene range, wherein the depth image comprises a plurality of depth information corresponding to a plurality of different positions in the first scene range; performing ground detection based on the plurality of depth information to identify a ground area in the depth image; and judging whether there is an obstacle in a surrounding area of the depth image according to the depth information corresponding to the surrounding area. The road obstacle detection method, the road obstacle detection device, the electronic device and the storage medium can accurately identify and detect obstacles.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of road obstacle detection, and in particular to a road obstacle detection method, a road obstacle detection device, an electronic device, and a storage medium. BACKGROUND

[0002] At present, a road obstacle detection method based on a smart phone mainly relies on a visible light camera of the phone to capture a scene image, and then performs calculation and processing on the scene image to identify the obstacle. This method directly relies on the scene image to identify the obstacle, and belongs to indirect detection of distance, so the accuracy of obstacle identification is not high. SUMMARY

[0003] Embodiments of the present application provide a road obstacle detection method, a road obstacle detection device, an electronic device, and a storage medium.

[0004] The road obstacle detection method applied to the electronic device in the embodiments of the present application comprises:

[0005] obtaining a depth image of a first scene range, wherein the depth image comprises a plurality of depth information corresponding to a plurality of different positions in the first scene range;

[0006] performing ground detection based on the plurality of depth information to identify a ground region in the depth image;

[0007] judging whether an obstacle exists in a surrounding region of the depth image other than the ground region according to depth information corresponding to the surrounding region.

[0008] The road obstacle detection device applied to the electronic device in the embodiments of the present application comprises:

[0009] a first obtaining module configured to obtain a depth image of a first scene range, wherein the depth image comprises a plurality of depth information corresponding to a plurality of different positions in the first scene range;

[0010] a detection module configured to perform ground detection based on the plurality of depth information to identify a ground region in the depth image;

[0011] a first judging module configured to judge whether an obstacle exists in a surrounding region of the depth image other than the ground region according to depth information corresponding to the surrounding region.

[0012] The electronic device in the embodiments of the present application comprises one or more processors and a memory, and the memory stores a computer program. When the computer program is executed by the processor, the road obstacle detection method in the embodiments of the present application is implemented.

[0013] The computer readable storage medium of the embodiments of the present application has a computer program stored thereon, and the program is executed by a processor to implement the road obstacle detection method of the embodiments of the present application.

[0014] The road obstacle detection method, the road obstacle detection device, the electronic equipment and the storage medium of the embodiments of the present application detect the ground based on the depth information to identify the ground area in the depth image, so as to determine whether there is an obstacle according to the depth information corresponding to the surrounding area of the depth image except the ground area, and the identification and detection of the obstacle can be accurately performed.

[0015] Additional aspects and advantages of the present application will be in part apparent and in part pointed out hereinafter. BRIEF DESCRIPTION OF DRAWINGS

[0016] The above and / or additional aspects and advantages of the present application will become apparent and be readily appreciated from the following description, including the drawings, in which:

[0017] Figure 1 is a flowchart of the road obstacle detection method of some embodiments of the present application;

[0018] Figure 2 is a module schematic diagram of the electronic equipment of some embodiments of the present application;

[0019] Figure 3 is a structural schematic diagram of the electronic equipment of some embodiments of the present application;

[0020] Figure 4 is a scene schematic diagram of the road obstacle detection method of some embodiments of the present application;

[0021] Figure 5 is a schematic diagram of the depth image of some embodiments of the present application;

[0022] Figure 6 is a principle schematic diagram of the road obstacle detection method of some embodiments of the present application;

[0023] Figure 7 is a principle schematic diagram of the road obstacle detection method of some embodiments of the present application;

[0024] Figure 8 is a flowchart of the road obstacle detection method of some embodiments of the present application;

[0025] Figure 9 is a flowchart of the road obstacle detection method of some embodiments of the present application;

[0026] Figure 10is a flowchart of a road obstacle detection method according to some embodiments of the present application;

[0027] Figure 11 is a flowchart of a road obstacle detection method according to some embodiments of the present application;

[0028] Figure 12 is a region division diagram of a depth image according to some embodiments of the present application;

[0029] Figure 13 is a region division diagram of a depth image according to some embodiments of the present application;

[0030] Figure 14 is a flowchart of a road obstacle detection method according to some embodiments of the present application;

[0031] Figure 15 is a shooting range diagram of a first scene range and a second scene range according to some embodiments of the present application;

[0032] Figure 16 is a principle diagram of a road obstacle detection method according to some embodiments of the present application;

[0033] Figure 17 is a flowchart of a road obstacle detection method according to some embodiments of the present application;

[0034] Figure 18 is a principle diagram of a road obstacle detection method according to some embodiments of the present application;

[0035] Figure 19 is a scene diagram of a road obstacle detection method according to some embodiments of the present application;

[0036] Figure 20 is a module diagram of a road obstacle detection device according to some embodiments of the present application;

[0037] Figure 21 is a module diagram of a road obstacle detection device according to some embodiments of the present application;

[0038] Figure 22 is a connection state diagram of a computer readable storage medium and a processor according to some embodiments of the present application. DETAILED DESCRIPTION

[0039] Embodiments of the present application are described in detail below with reference to the attached drawings, wherein the same or like reference numerals are used to represent the same or like elements throughout the several views. The embodiments described below are examples of the present application, and are not intended to limit the present application.

[0040] In the description of the embodiments of the present application, the terms "first", "second" are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined as "first", "second" can explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise explicitly specified.

[0041] At present, the road obstacle detection method based on a smart phone mainly relies on the visible light camera of the phone to shoot a scene image, and then performs calculation and processing on the scene image to identify the obstacle. This way simply relies on the scene image to identify the obstacle, which belongs to indirect detection of distance, and the accuracy of obstacle identification is not high. In addition, under night or dark light conditions, the quality of the scene image is reduced, which may affect the identification and judgment of the algorithm on the obstacle, and the obstacle identification relies on the scene image, which may have privacy leakage risk in some sensitive scenes, and the imaging of the visible light camera requires high algorithm power.

[0042] Referring to Figure 1 and Figure 2 , the present application provides a road obstacle detection method applied to an electronic device 100. The road obstacle detection method comprises:

[0043] 01: obtaining a depth image of a first scene range, wherein the depth image comprises a plurality of depth information corresponding to a plurality of different positions in the first scene range;

[0044] 02: performing ground detection based on the plurality of depth information to identify a ground area in the depth image;

[0045] 03: determining whether there is an obstacle in the surrounding area according to the depth information corresponding to the surrounding area other than the ground area in the depth image.

[0046] Referring to Figure 2 , the present application also provides an electronic device 100. The electronic device 100 comprises one or more processors 10 and a memory 20. The memory 20 stores a computer program, and when the computer program is executed by the processor 10, the road obstacle detection method of the present application is realized. For example, the processor 10 can be used to realize the methods in 01, 02 and 03. That is to say, the processor 10 can be used to: obtain a depth image of a first scene range, wherein the depth image comprises a plurality of depth information corresponding to a plurality of different positions in the first scene range; perform ground detection based on the plurality of depth information to identify a ground area in the depth image; and determine whether there is an obstacle in the surrounding area according to the depth information corresponding to the surrounding area other than the ground area in the depth image.

[0047] The pavement obstacle detection method and the electronic device 100 in the embodiments of the present application perform ground detection based on depth information to identify the ground area in the depth image, so as to determine whether there is an obstacle according to the depth information corresponding to the surrounding area other than the ground area in the depth image, and the identification and detection of the obstacle can be accurately performed.

[0048] Specifically, the electronic device 100 can be a mobile phone, a tablet computer, a personal digital assistant, a wearable device, a smart robot, etc., wherein the wearable device includes a smart bracelet, a smart watch, smart glasses, etc.

[0049] Referring to Figure 3 , the electronic device 100 can include a depth ranging module 111. The depth ranging module 111 is configured to output a depth image of a first scene range. After the depth ranging module 111 outputs the depth image, the depth image is sent to the processor 10, i.e., the processor 10 acquires the depth image of the first scene range. In an embodiment, the depth ranging module 111 can be a depth camera, such as a structured light module, a laser radar module, or a time-of-flight module, etc. In the embodiments of the present application, the depth ranging module 111 can be a laser radar (LiDAR) module or a time-of-flight (ToF) module. Compared with the structured light module, the laser radar module and the time-of-flight module are less affected by the environment and have good anti-interference performance, and can more accurately acquire depth information.

[0050] Referring to Figure 4 and Figure 5 , the depth image includes a plurality of depth information corresponding to a plurality of different positions in the first scene range. Specifically, the first scene range is a certain scene range in front of the depth ranging module 111 that needs to be photographed. Corresponding to the plurality of different positions in the first scene range, the depth image also has a plurality of depth information. Each position can correspond to one depth information, and the specific values of the depth information corresponding to different positions can be the same or different.

[0051] Referring to Figure 6 and Figure 7 , after acquiring the depth image of the first scene range, the processor 10 further performs ground detection based on the plurality of depth information to identify the ground area in the depth image. It should be pointed out that the "ground" in the embodiments of the present application should be understood in a broad sense, and all surfaces available for travel can be referred to as ground, such as but not limited to road surface, bridge surface, gravel surface, lawn surface, etc. Since the depth information corresponding to the ground area is usually the same, gradually changes in a certain trend, or repeatedly changes according to a certain rule, the ground area in the depth image can be identified by ground detection based on the plurality of depth information corresponding to the plurality of different positions, and the remaining area is regarded as the surrounding area.

[0052] In one example, the processor 10 can use a random sample consensus (RANSAC) algorithm to perform ground detection according to the plurality of depth information. The specific process is as follows: a set of depth point cloud data (i.e., a set of depth information) is randomly selected from the plurality of depth information. Taking three as an example, they are represented by X w , Y w , and Z w , which can be written as:

[0053] AX w +BY w +CZ w =D

[0054] A threshold T is set. When the randomly selected set of depth point cloud data meets the following relationship, it is considered to be a fitting inlier:

[0055]

[0056] In this way, the plurality of depth point cloud data (i.e., the plurality of depth information) can be divided into inliers (data meeting the fitting condition) and outliers (data not meeting the fitting condition), so that the ground depth point cloud data meeting the condition and less than the threshold T is obtained. The area formed by all the ground depth point cloud data is the ground area. The parameters A, B, C, and D and the threshold T can be determined by a predetermined rule or an empirical value. Of course, in other examples, the processor 10 can also use other algorithms to perform ground detection according to the plurality of depth information, which is not limited herein.

[0057] After identifying the ground area in the depth image, the depth information corresponding to the surrounding area other than the ground area can be obtained, so as to determine whether there is an obstacle in the surrounding area. The surrounding area and the ground area do not overlap each other, and the two are in a complementary relationship in the depth image. The ground area can also be a continuous area or a plurality of mutually spaced areas. Similarly, the surrounding area can be a continuous area or a plurality of mutually spaced areas. In the embodiments of the present application, since the depth information of the ground area is excluded from the surrounding area, on the one hand, the interference of the ground area on the obstacle identification and determination can be excluded, and the ground area can be avoided from being identified and determined as an obstacle, so as to improve the accuracy of obstacle detection. On the other hand, only the depth information of the surrounding area is detected to determine whether there is an obstacle, without detecting the depth information of the entire depth image to determine whether there is an obstacle, so as to simplify the calculation amount of obstacle detection and determination. It should be pointed out that the "obstacle" in the embodiments of the present application should be understood in a broad sense. All objects in front of the user that can hinder the user's progress can be called obstacles, such as stones, walls, tables, vases, pets, and the like.

[0058] Further, the embodiment of the present application determines whether there is an obstacle according to the depth information of the surrounding area, and thus is not dependent on the visible light camera to shoot a scene image, and the recognition and detection accuracy of the obstacle based on the depth information is higher; is not affected by the working of the visible light camera in the night or dark light environment, and thus is applicable to the night, dark light, and the like; is not dependent on the scene image of the visible light camera, and is conducive to protecting privacy; and is not dependent on the imaging of the visible light camera, and the overall requirement for the algorithm power is lower (even if the image sensor with a resolution such as Video Graphics Array (VGA) has a pixel number of 640*480=307200 per frame, and the resolution of the laser radar module in the embodiment of the present application is only 720 points, and the data volume is 1 / 1000 of that of the visible light camera).

[0059] In one embodiment, the road obstacle detection function of the embodiment of the present application can be integrated in the shortcut pull-down menu of the electronic device 100, or a corresponding obstacle detection switch can be provided in the AR navigation application program of the electronic device 100. The road obstacle detection function can be started according to the user setting. That is to say, the depth image of the first scene range is acquired only when the electronic device 100 receives the starting instruction corresponding to the road obstacle detection function input by the user, and the subsequent road obstacle detection process is performed. In this way, the road obstacle detection function does not need to be kept on all the time, which is conducive to saving the power consumption of the electronic device 100.

[0060] Please refer to Figure 8 In some embodiments, the surrounding area corresponds to at least one surrounding depth information. Determining whether the surrounding area has an obstacle according to the depth information of the surrounding area in the depth image (i.e., 03) includes:

[0061] 031: determining whether the at least one surrounding depth information is less than a predetermined distance threshold;

[0062] 032: determining that the surrounding area has an obstacle when there is at least one surrounding depth information less than the predetermined distance threshold in the at least one surrounding depth information.

[0063] Please refer to Figure 2 In some embodiments, the surrounding area corresponds to at least one surrounding depth information. The processor 10 can be used to implement the methods in 031 and 032. That is to say, the processor 10 can be used to: determine whether the at least one surrounding depth information is less than a predetermined distance threshold; and determine that the surrounding area has an obstacle when there is at least one surrounding depth information less than the predetermined distance threshold in the at least one surrounding depth information.

[0064] Specifically, the surrounding depth information is included in the aforementioned depth information. When the surrounding area occupies a small position, it can correspond to only one surrounding depth information; when the surrounding area occupies a large position, it can correspond to multiple surrounding depth information. The embodiments of the present application determine whether the surrounding area has an obstacle according to the relationship between the surrounding depth information and the predetermined distance threshold.

[0065] When the surrounding area corresponds to one surrounding depth information, the processor 10 determines whether the surrounding depth information is less than the predetermined distance threshold, and determines that the surrounding area has an obstacle when the surrounding depth information is less than the predetermined distance threshold. For example, when the surrounding area corresponds to one surrounding depth information d1, the manner of determining whether the surrounding area has an obstacle is as follows: comparing the size between the surrounding depth information d1 and the predetermined distance threshold D, and determining that the surrounding area has an obstacle when d1 < D. Further, the specific position of the obstacle in the surrounding area can also be determined according to the corresponding position of the surrounding depth information less than the predetermined distance threshold in the surrounding area, so as to subsequently remind the user.

[0066] When the surrounding area corresponds to multiple surrounding depth information, the processor 10 determines whether the multiple surrounding depth information are all less than the predetermined distance threshold, and determines that the surrounding area has an obstacle when at least one of the multiple surrounding depth information is less than the predetermined distance threshold. Specifically, the processor 10 can compare the multiple surrounding depth information with the predetermined distance threshold one by one, or sort the multiple surrounding depth information according to the size (from large to small or from small to large), and then compare the minimum value of the multiple surrounding depth information with the predetermined distance threshold. In one example, when the surrounding area corresponds to six surrounding depth information, which are d1, d2, d3, d4, d5, and d6, the manner of determining whether the surrounding area has an obstacle is as follows: comparing the size between the six surrounding depth information d1, d2, d3, d4, d5, and d6 and the predetermined distance threshold D one by one, and determining that the surrounding area has an obstacle when d1 < D, d2 > D, d3 > D, d4 > D, d5 > D, and d6 > D; or determining that the surrounding area has an obstacle when d1 < D, d2 < D, d3 < D, d4 < D, d5 < D, and d6 < D. In another example, when the surrounding area corresponds to six surrounding depth information, which are d1, d2, d3, d4, d5, and d6, the manner of determining whether the surrounding area has an obstacle is as follows: sorting the six surrounding depth information d1, d2, d3, d4, d5, and d6 according to the size, taking the minimum value d3, and comparing d3 with the predetermined distance threshold D, and determining that the surrounding area has an obstacle when d3 < D. Further, the specific position of the obstacle in the surrounding area can also be determined according to the corresponding position of the multiple surrounding depth information less than the predetermined distance threshold in the surrounding area, so as to subsequently remind the user.

[0067] In the above various cases, the surrounding area is determined to have no obstacle only when all the surrounding depth information corresponding to the surrounding area is greater than or equal to the predetermined distance threshold, which is a more stable determination method and is beneficial to ensuring the safety of the front road surface.

[0068] Referring to Figure 9 In some embodiments, the surrounding area corresponds to a plurality of first surrounding depth information. Determining whether the surrounding area has an obstacle according to the depth information of the surrounding area in the depth image except the ground area (i.e. 03) includes:

[0069] 033: dividing the plurality of first surrounding depth information into a plurality of groups, wherein the first surrounding depth information of a predetermined number of adjacent regions in the plurality of first surrounding depth information is taken as a group;

[0070] 034: determining the second surrounding depth information corresponding to each group of first surrounding depth information according to the first surrounding depth information of a predetermined number of adjacent regions in each group of first surrounding depth information;

[0071] 035: judging whether the second surrounding depth information corresponding to each group of first surrounding depth information is less than the predetermined distance threshold for each group of first surrounding depth information;

[0072] 036: determining that the surrounding area has an obstacle when there is at least one group of first surrounding depth information corresponding to the second surrounding depth information less than the predetermined distance threshold.

[0073] Referring to Figure 2 In some embodiments, the surrounding area corresponds to a plurality of first surrounding depth information. The processor 10 can be used to implement the methods in 033, 034, 035, and 036. That is, the processor 10 can be used to: divide the plurality of first surrounding depth information into a plurality of groups, wherein the first surrounding depth information of a predetermined number of adjacent regions in the plurality of first surrounding depth information is taken as a group; determine the second surrounding depth information corresponding to each group of first surrounding depth information according to the first surrounding depth information of a predetermined number of adjacent regions in each group of first surrounding depth information; judge whether the second surrounding depth information corresponding to each group of first surrounding depth information is less than the predetermined distance threshold for each group of first surrounding depth information; and determine that the surrounding area has an obstacle when there is at least one group of first surrounding depth information corresponding to the second surrounding depth information less than the predetermined distance threshold.

[0074] Specifically, the first surrounding depth information is included in the aforementioned depth information. Similarly, the embodiments of the present application determine whether the surrounding area has an obstacle according to the relationship between the surrounding depth information and the predetermined distance threshold.

[0075] The difference is that in the embodiments of the present application, the processor 10 first groups the plurality of first surrounding depth information. Among them, the first surrounding depth information adjacent to a predetermined number of regions can be taken as a group. When determining the first surrounding depth information adjacent to the predetermined number of regions, it is to select the first surrounding depth information close to each other in a predetermined number of positions. The processor 10 can determine the second surrounding depth information corresponding to each group according to the first surrounding depth information adjacent to the predetermined number of regions in each group. The specific determination method can be to select the average value of the first surrounding depth information adjacent to the predetermined number of regions in each group as the second surrounding depth information corresponding to the group. Then, the processor 10 respectively compares the second surrounding depth information corresponding to each group with the predetermined distance threshold value, and if there is one or more groups of second surrounding depth information less than the predetermined distance threshold value, it is determined that there is an obstacle in the surrounding area. Further, the specific position of the obstacle in the surrounding area can also be determined according to the corresponding position of the one or more groups of second surrounding depth information less than the predetermined distance threshold value in the surrounding area, so as to remind the user subsequently.

[0076] Since the processor 10 judges the plurality of first surrounding depth information according to the predetermined number of regions adjacent to the grouping, the detection efficiency can be improved. In addition, the average value of the first surrounding depth information adjacent to the predetermined number of regions in each group is selected as the second surrounding depth information, which can reduce the probability of obstacle misjudgment caused by random jumping of single-point depth information. For example, sometimes the ground detection algorithm may not be perfect and miss some edge points, which may cause misjudgment of obstacles. The above-mentioned average value method can exclude these error disturbances. Of course, in other examples, the processor 10 can also select the minimum value of the first surrounding depth information adjacent to the predetermined number of regions in each group as the second surrounding depth information corresponding to the group. Since the grouping judgment is performed, the detection efficiency can also be improved.

[0077] Taking 20 first surrounding depth information as an example, the processor 10 first divides the 20 first surrounding depth information into groups. Assuming that the predetermined number is 4, the 20 first surrounding depth information can be divided into 5 groups, and each group includes 4 adjacent first surrounding depth information. According to the 4 first surrounding depth information in each group, the second surrounding depth information of the group can be determined. The specific determination method can be to select the average value of the 4 adjacent first surrounding depth information or to select the minimum value of the 4 adjacent first surrounding depth information as the second surrounding depth information. Then, it is judged whether the second surrounding depth information corresponding to the 5 groups is less than the predetermined distance threshold value. When there is one or more groups of second surrounding depth information less than the predetermined distance threshold value, it is determined that there is an obstacle in the surrounding area.

[0078] Please refer to Figure 10In some embodiments, the surrounding region corresponds to a plurality of surrounding depth information. Determining whether the surrounding region has an obstacle based on the depth information corresponding to the surrounding region other than the ground region (i.e., 03) includes:

[0079] 037: determining whether one of the plurality of surrounding depth information is less than a predetermined distance threshold;

[0080] 038: when one of the plurality of surrounding depth information is less than the predetermined distance threshold, determining whether the surrounding depth information adjacent to the region of the one of the plurality of surrounding depth information is less than the predetermined distance threshold;

[0081] 039: when there are at least a predetermined number of the surrounding depth information adjacent to the region is less than the predetermined distance threshold, determining that the surrounding region has an obstacle.

[0082] Referring to Figure 2 In some embodiments, the surrounding region corresponds to a plurality of surrounding depth information. The processor 10 can be configured to implement the methods of 033, 034, 035, and 036. That is, the processor 10 can be configured to: determine whether one of the plurality of surrounding depth information is less than a predetermined distance threshold; when one of the plurality of surrounding depth information is less than the predetermined distance threshold, determine whether the surrounding depth information adjacent to the region of the one of the plurality of surrounding depth information is less than the predetermined distance threshold; and when there are at least a predetermined number of the surrounding depth information adjacent to the region is less than the predetermined distance threshold, determine that the surrounding region has an obstacle.

[0083] Specifically, the surrounding depth information is included in the aforementioned depth information. Similarly, the embodiments of the present application determine whether the surrounding region has an obstacle based on the relationship between the surrounding depth information and the predetermined distance threshold.

[0084] The difference is that in the embodiments of the present application, the processor 10 first determines whether one of the surrounding depth information is less than a predetermined distance threshold. When the surrounding depth information is less than the predetermined distance threshold, it is further determined whether the surrounding depth information adjacent to the region of the surrounding depth information is less than the predetermined distance threshold. If there are at least a predetermined number of the surrounding depth information adjacent to the region is less than the predetermined distance threshold, it is determined that the surrounding region has an obstacle. Further, the specific position of the obstacle in the surrounding region can be determined based on the corresponding positions of the one of the surrounding depth information less than the predetermined distance threshold and the at least predetermined number of the surrounding depth information adjacent to the region thereof in the surrounding region, so as to subsequently remind the user.

[0085] In the selection of one of the surrounding depth information, the processor 10 can take the depth information corresponding to the center position of the surrounding area as the surrounding depth information used for the first comparison with the predetermined distance threshold, or take the depth information corresponding to the edge position closest to the ground area in the surrounding area as the surrounding depth information used for the first comparison with the predetermined distance threshold. In the former way, the selection of the surrounding depth information adjacent to the surrounding depth information region can be gradually spread from the center position to the surrounding. In the latter way, the selection of the surrounding depth information adjacent to the surrounding depth information region can be gradually spread from the edge position to the direction away from the ground area. When comparing the surrounding depth information adjacent to the surrounding depth information region with the predetermined distance threshold, it can be in the form of delimiting the region (for example, delimiting an outer region adjacent to the surrounding depth information region, and then comparing all the surrounding depth information in the outer region with the predetermined distance threshold to see if there are predetermined surrounding depth information less than the predetermined distance threshold), or in the form of setting the number of surrounding depth information adjacent to the region (for example, selecting a specified number of region-adjacent surrounding depth information from the surrounding depth information adjacent to the surrounding depth information region, and seeing if there are predetermined surrounding depth information less than the predetermined distance threshold).

[0086] It can be understood that when one of the surrounding depth information and at least predetermined number of surrounding depth information adjacent to the region thereof are less than the predetermined distance threshold, the surrounding area has a high possibility of having an obstacle. The identification and judgment of the obstacle in the embodiments of the present application are more accurate, and can also reduce the probability of obstacle misjudgment caused by random jumping of single-point depth information. In addition, the embodiments of the present application can also determine whether the surrounding area has an obstacle in combination with the grouping method described above, and the process is as follows: the plurality of first surrounding depth information is divided into a plurality of groups, wherein the first surrounding depth information adjacent to a predetermined region in the plurality of first surrounding depth information is a group; for each group of first surrounding depth information, it is determined whether one of the surrounding depth information is less than the predetermined distance threshold; for each group of first surrounding depth information, when one of the surrounding depth information is less than the predetermined distance threshold, it is determined whether the surrounding depth information adjacent to the region of the one surrounding depth information is less than the predetermined distance threshold; for each group of first surrounding depth information, when there are at least predetermined number of surrounding depth information adjacent to the region thereof less than the predetermined distance threshold, it is determined that the surrounding area where the group of first surrounding depth information is located has an obstacle.

[0087] Please refer to Figure 11 In some embodiments, the road obstacle detection method further comprises:

[0088] 04: When the surrounding area has an obstacle, the first sub-region corresponding to the obstacle in the surrounding area is identified as a warning area, and the second sub-region in the surrounding area except the first sub-region is identified as a safe area.

[0089] Referring to Figure 2 In some embodiments, the processor 10 can be configured to implement the method in 04. That is, the processor 10 can be configured to: identify a first sub-region corresponding to the obstacle in the surrounding region as a warning region, and identify a second sub-region in the surrounding region except the first sub-region as a safe region, when the obstacle exists in the surrounding region.

[0090] Specifically, as shown in Figure 12 , the depth image can be divided into a ground region and a surrounding region. When the obstacle exists in the surrounding region, the surrounding region is further divided into a first sub-region corresponding to the obstacle and a second sub-region except the first sub-region according to the position of the obstacle. The first sub-region can be identified as a warning region, and the second sub-region can be identified as a safe region, so as to remind the user of the obstacle. It can be understood that, as shown in Figure 13 , when the obstacle does not exist in the surrounding region, the entire surrounding region is identified as a safe region. The region identification of the depth image in the embodiments of the present application can be selectively presented to the user as needed, which is not limited herein.

[0091] In the embodiments of the present application, the manner of determining the first sub-region corresponding to the obstacle can be according to the depth information corresponding to the surrounding region, for example, can be according to the position of one or more surrounding depth information less than the predetermined distance threshold in the surrounding region; or according to the position of one or more groups of second surrounding depth information less than the predetermined distance threshold in the surrounding region; or according to the position of one of the surrounding depth information less than the predetermined distance threshold and at least a predetermined number of surrounding depth information adjacent to the region in the surrounding region.

[0092] Referring to Figure 14 In some embodiments, the road obstacle detection method further comprises:

[0093] 05: acquiring a scene image of a second scene range, wherein the second scene range at least partially overlaps with the shooting range of the first scene range;

[0094] 06: displaying the scene image and identifying the position information and / or distance information corresponding to the obstacle in the scene image when the obstacle exists in the surrounding region.

[0095] Referring to Figure 2 In some embodiments, the processor 10 can be configured to implement the method in 05 and 06. That is, the processor 10 can be configured to: acquire a scene image of a second scene range, wherein the second scene range at least partially overlaps with the shooting range of the first scene range; and display the scene image and identify the position information and / or distance information corresponding to the obstacle in the scene image when the obstacle exists in the surrounding region.

[0096] Referring to Figure 3 , the electronic device 100 further comprises a planar imaging module 112. The planar imaging module 112 is configured to capture a scene image of a second scene range. After the planar imaging module 112 outputs the scene image, the scene image is sent to the processor 10, i.e., the processor 10 acquires the scene image of the second scene range. In an embodiment, the planar imaging module 112 can be a planar camera, such as a visible light module, an infrared light module, or a black-and-white camera module, etc. In the present embodiment, the planar imaging module 112 can be a visible light module (i.e., an RGB camera). Compared with the infrared light module and the black-and-white camera module, the image captured by the visible light module is a color image, which can be better presented to the user, and the image is more vivid, which is convenient for the user to understand the surrounding environment. The planar imaging module 112 and the aforementioned depth ranging module 111 can be arranged horizontally or vertically on the electronic device 100, which is not limited herein.

[0097] Referring to Figure 15 , the second scene range at least partially overlaps with the first scene range. Specifically, the second scene range can at least partially overlap with the first scene range (as shown in Figure 15 (a)), or the second scene range can completely overlap with the first scene range (as shown in Figure 15 (b), (c), and (d)). When the second scene range completely overlaps with the first scene range, the second scene range can be completely consistent with the first scene range (as shown in Figure 15 (b)), or the first scene range can cover and exceed the second scene range (as shown in Figure 15 (c)), or the second scene range can cover and exceed the first scene range (as shown in Figure 15 (d)). In an embodiment, the overlap rate of the second scene range and the first scene range is greater than 50%, so that the position of the obstacle can be basically displayed in the scene image. In the present embodiment, the second scene range is completely consistent with the first scene range, so as to ensure that the position of the obstacle can be displayed in the scene image, and the imaging range of the depth ranging module 111 and the planar imaging module 112 is fully utilized, i.e., the hardware performance of the depth ranging module 111 and the planar imaging module 112 is fully utilized.

[0098] Please refer to Figure 16Since the relative positions of the depth ranging module 111 and the planar imaging module 112 are determined when the electronic device 100 is manufactured, the output images of the two are aligned and calibrated, and thus the pixel position corresponding to the obstacle in the scene image can be accurately found according to the region position corresponding to the obstacle in the depth image, so that the pixel position and / or distance information of the obstacle in the scene image can be accurately identified. It can be understood that, in the embodiments of the present application, the position information of the obstacle in the scene image is not determined by identifying the obstacle in the scene image, but the position of the obstacle in the depth image is determined according to the depth information, and the corresponding position in the scene image is matched and aligned as the position of the obstacle in the scene image, and the distance information of the obstacle (which can be obtained according to the depth information of the obstacle) is identified (as shown in Figure 7 Thus, the position of the obstacle in the scene image is more accurate, and the distance information is also more accurate.

[0099] In one embodiment, when there are multiple obstacles in the surrounding area, the position information and / or distance information of the closest obstacle can be identified in the scene image; or the position information and / or distance information of the closest predetermined number of obstacles can be identified in the scene image; or the position information and / or distance information of the obstacle closest to the center of the image can be identified in the scene image. These obstacles are most likely to affect the user and are more in need of the user's attention, so it is more necessary to identify them.

[0100] In one embodiment, when the ground is detected based on the depth information to identify the ground region, the scene image in the embodiments of the present application can also be combined, which is especially suitable for some special ground scenes, such as blind paths. Specifically, the ground can be detected based on the depth information to preliminarily identify the ground region, and then the ground region preliminarily identified is combined with the scene image to accurately determine whether the region is a ground region. Of course, the way of identifying the ground region in combination with the scene image is not limited to this.

[0101] Please refer to Figure 6 and Figure 7 In some embodiments, the scene image of the second scene range is acquired at the same time as the depth image of the first scene range. In this way, the scene image is acquired at the same time as the depth image, which is beneficial to save the time of identifying the obstacle in the scene image in the subsequent process, and the user can be reminded more quickly.

[0102] In some embodiments, the scene image of the second scene range is acquired when it is detected that there is an obstacle in the surrounding area. In this way, when there is no obstacle in the surrounding area, there is no need to acquire the scene image, which is beneficial to save the power consumption of the electronic device 100.

[0103] Referring to Figure 17 In some embodiments, the road obstacle detection method further comprises:

[0104] 07: determining whether a predetermined application of the electronic device 100 is opened when the surrounding area has an obstacle;

[0105] 08: reminding the user of the obstacle in a first manner when the predetermined application is not opened;

[0106] 09: reminding the user of the obstacle in a second manner which is at least partially different from the first manner when the predetermined application is opened.

[0107] Referring to Figure 2 In some embodiments, the processor 10 can be configured to implement the methods in 07, 08 and 09. That is, the processor 10 can be configured to: determine whether a predetermined application of the electronic device 100 is opened when the surrounding area has an obstacle; remind the user of the obstacle in a first manner when the predetermined application is not opened; and remind the user of the obstacle in a second manner which is at least partially different from the first manner when the predetermined application is opened.

[0108] Specifically, the predetermined application can be a game application, a reading application, a video application, etc. The predetermined application is irrelevant to a navigation application. When the predetermined application is not opened, the user can be reminded of the obstacle in the first manner. The first manner can include, for example: the display screen of the electronic device 100 displays a scene image, and the position information and / or distance information corresponding to the obstacle in the scene image are marked (as shown in Figure 7 ), the microphone of the electronic device 100 voice broadcasts a reminder, and / or the vibration module of the electronic device 100 vibrates to remind, and / or the flash of the electronic device 100 is turned on to remind, and / or the earphone connected to the electronic device 100 voice broadcasts a reminder, and / or the wearable device (such as a smart watch) wirelessly communicating with the electronic device 100 vibrates to remind, etc. Figure 7 When the predetermined application is opened, the user can be reminded of the obstacle in the second manner. The second manner is at least partially different from the first manner. Specifically, the second manner can be partially different from the first manner, or can be completely different from the first manner. The second manner can include, for example: the microphone of the electronic device 100 voice broadcasts a reminder, and / or the vibration module of the electronic device 100 vibrates to remind, and / or the flash of the electronic device 100 is turned on to remind, and / or the earphone connected to the electronic device 100 voice broadcasts a reminder, and / or the wearable device (such as a smart watch) wirelessly communicating with the electronic device 100 vibrates to remind, etc.

[0109]

[0110] The embodiment of the present application reminds the user of the obstacle in a proper way according to the opening of the predetermined application of the electronic device 100, for example, when the predetermined application is not opened (at this time, the navigation application can be opened), the scene image is displayed in the user interface, and the position information and / or distance information corresponding to the obstacle in the scene image are identified; when the predetermined application is opened, the user is reminded of the obstacle in a way without page switching, which can avoid picture switching of the electronic device 100 and affect the user's use of the current application.

[0111] The feasibility of the road surface obstacle detection method of the embodiment of the present application is described below taking the case that the user walks at a normal walking speed as an example.

[0112] In one example, when the user uses the electronic device 100 for AR navigation, the user generally holds the electronic device 100 as vertically as possible to the ground to make the depth ranging module 111 try to shoot the depth image in front of the road. Taking the field of view FoV of the laser radar module as 45°×60° as an example, the obstacle within a range of 5m can be effectively detected.

[0113] Please refer to Figure 18 In another example, when the user uses the electronic device 100 to play a game or read an e-book, the user generally holds the electronic device 100 to make the electronic device 100 keep a certain angle with the ground. Here, taking the included angle as 45° and the field of view FoV of the laser radar module in the vertical direction as 60° as an example, the farthest distance X that can be measured is X = 1 / tan15° = 3.73m, which meets the basic requirement of providing early warning for the obstacle at a distance of 2m. Figure 18

[0114] From the above examples, it can be seen that the road surface obstacle detection method of the embodiment of the present application is not only suitable for AR navigation of the electronic device 100, but also suitable for the scene that the user walks and uses the electronic device 100.

[0115] In some embodiments, the frame rate of the depth image output by the depth ranging module 111 is greater than or equal to a predetermined frame rate, and the predetermined frame rate is 10-60fps.

[0116] Taking the predetermined frame rate as 10fps as an example, the frame rate of the depth image output by the depth ranging module 111 is greater than or equal to 10fps; taking the predetermined frame rate as 60fps as an example, the frame rate of the depth image output by the depth ranging module 111 is greater than or equal to 60fps. Satisfying the above condition, the depth ranging module 111 outputs the depth image more smoothly and can meet the computing power requirement of the electronic device 100, which can ensure timely and smooth user experience.

[0117] ​In addition, the resolution of the depth ranging module 111 can be selected to be greater than or equal to 8*8, so as to ensure that each frame of depth image can output sufficient depth data, thereby performing accurate ground detection and obstacle identification. In an example, when the depth ranging module 111 adopts a laser radar module, the resolution of the laser radar module is 720 points, that is, the laser radar module outputs 720 points of depth information per frame. The field of view (FoV) of the laser radar module is 45°*60°.

[0118] The following describes the road obstacle detection method of the electronic device 100 in the embodiments of the present application in combination with several specific application scenarios.

[0119] Application scenario one:

[0120] When the user uses the electronic device 100 for AR navigation, the electronic device 100 acquires a depth image and a scene image within a certain scene range in front of the user, performs ground detection based on the depth information to identify a ground region in the depth image, and determines whether the surrounding region other than the ground region in the depth image has an obstacle based on the corresponding depth information of the surrounding region. When the surrounding region has no obstacle, the AR navigation continues, no interaction with the user is required, or only the scene image is displayed, but no obstacle reminder is performed. When the surrounding region has an obstacle, the scene image is displayed, and the position information and distance information corresponding to the obstacle in the scene image are identified, so as to perform an obstacle reminder.

[0121] Application scenario two:

[0122] Please refer to Figure 18 When the user uses the electronic device 100 to play a game, read an e-book, or watch a video, the electronic device 100 acquires a depth image and a scene image within a certain scene range in front of the user, performs ground detection based on the depth information to identify a ground region in the depth image, and determines whether the surrounding region other than the ground region in the depth image has an obstacle based on the corresponding depth information of the surrounding region. When the surrounding region has no obstacle, the interface for playing the game, reading the e-book, or watching the video continues to be displayed, no interaction with the user is required, and no obstacle reminder is performed. When the surrounding region has an obstacle, the interface for playing the game, reading the e-book, or watching the video continues to be displayed, but the user is reminded to pay attention to the obstacle information through voice broadcast, vibration, or a flash.

[0123] Application scenario three:

[0124] Please refer to Figure 19, the user will carry the electronic device 100 on the wheelchair device at a certain angle. The electronic device 100 acquires a depth image and a scene image in a certain scene range in front of the user, performs ground detection based on the depth information to identify a ground area in the depth image, and determines whether the surrounding area exists an obstacle according to the depth information corresponding to the surrounding area in the depth image. When the surrounding area exists an obstacle, the wheelchair is assisted to avoid the obstacle through the obstacle information.

[0125] Please refer to Figure 20 The embodiment of the application further provides a road obstacle detection device 120 applied to the electronic device 100. The road obstacle detection device 120 comprises a first acquisition module 121, a detection module 122 and a first judgment module 123. The first acquisition module 121 is configured to acquire a depth image of a first scene range, wherein the depth image comprises a plurality of depth information corresponding to a plurality of different positions in the first scene range. The detection module 122 is configured to perform ground detection based on the plurality of depth information to identify a ground area in the depth image. The first judgment module 123 is configured to determine whether the surrounding area exists an obstacle according to the depth information corresponding to the surrounding area in the depth image.

[0126] In some embodiments, the surrounding area corresponds to at least one surrounding depth information. The first judgment module 123 is specifically configured to: determine whether the at least one surrounding depth information is less than a predetermined distance threshold; and determine that the surrounding area exists an obstacle when there is at least one surrounding depth information less than the predetermined distance threshold in the at least one surrounding depth information.

[0127] In some embodiments, the surrounding area corresponds to a plurality of first surrounding depth information. The first judgment module 123 is specifically configured to: divide the plurality of first surrounding depth information into a plurality of groups, wherein the first surrounding depth information adjacent to a predetermined number of regions in the plurality of first surrounding depth information is taken as a group; determine a second surrounding depth information corresponding to each group of first surrounding depth information according to the first surrounding depth information adjacent to the predetermined number of regions in each group of first surrounding depth information; determine whether the second surrounding depth information corresponding to each group of first surrounding depth information is less than a predetermined distance threshold for the plurality of groups of first surrounding depth information; and determine that the surrounding area exists an obstacle when there is at least one group of first surrounding depth information corresponding to the second surrounding depth information less than the predetermined distance threshold.

[0128] In some embodiments, the surrounding region corresponds to a plurality of surrounding depth information. The first determining module 123 is specifically configured to: determine whether one of the plurality of surrounding depth information is less than a predetermined distance threshold; when one of the plurality of surrounding depth information is less than the predetermined distance threshold, determine whether the surrounding depth information adjacent to the region corresponding to the one of the plurality of surrounding depth information is less than the predetermined distance threshold; and when there are at least a predetermined number of regions adjacent to the surrounding depth information less than the predetermined distance threshold, determine that the surrounding region has an obstacle.

[0129] Referring to Figure 21 In some embodiments, the road obstacle detection apparatus 120 further comprises an identification module 124. The identification module 124 is configured to, when the surrounding region has an obstacle, identify a first sub-region in the surrounding region corresponding to the obstacle as a warning region, and identify a second sub-region in the surrounding region other than the first sub-region as a safe region.

[0130] In some embodiments, the road obstacle detection apparatus 120 further comprises a second acquisition module 125. The second acquisition module 125 is configured to acquire a scene image of a second scene range, wherein the second scene range at least partially overlaps the shooting range of the first scene range. The display module is configured to, when the surrounding region has an obstacle, display the scene image and identify the position information and / or distance information corresponding to the obstacle in the scene image.

[0131] In some embodiments, the second acquisition module 125 acquires the scene image of the second scene range simultaneously with the first acquisition module 121 acquiring the depth image of the first scene range; or the second acquisition module 125 acquires the scene image of the second scene range when the first determining module 123 detects that the surrounding region has an obstacle.

[0132] In some embodiments, the road obstacle detection apparatus 120 further comprises a second determining module 126, a first reminding module 127 and a second reminding module 128. The second determining module 126 is configured to, when the surrounding region has an obstacle, determine whether a predetermined application program of the electronic device 100 is opened. The first reminding module 127 is configured to, when the predetermined application program is not opened, remind the user of the obstacle in a first manner. The second reminding module 128 is configured to, when the predetermined application program is opened, remind the user of the obstacle in a second manner different at least in part from the first manner.

[0133] Referring to Figure 3 In some embodiments, the electronic device 100 comprises a depth ranging module 111, and the depth ranging module 111 is configured to output a depth image.

[0134] In some embodiments, the depth ranging module 111 is a laser radar module or a time-of-flight module.

[0135] In some embodiments, the depth ranging module 111 outputs the frame rate of the depth image greater than or equal to a predetermined frame rate, and the predetermined frame rate is 10-60 fps.

[0136] It should be noted that the above-mentioned embodiments of the road obstacle detection method and the electronic device 100 are also applicable to the road obstacle detection apparatus 120 of the embodiments of the present application, and will not be repeated here.

[0137] Referring to Figure 22 The embodiments of the present application also provide a computer readable storage medium 200, which stores a computer program 210. When the program 210 is executed by the processor 10, the road obstacle detection method of any of the above-mentioned embodiments is implemented.

[0138] For example, when the program 210 is executed by the processor 10, the following road obstacle detection method is implemented:

[0139] 01: Obtain a depth image of a first scene range, wherein the depth image includes a plurality of depth information corresponding to a plurality of different positions in the first scene range;

[0140] 02: Perform ground detection based on the plurality of depth information to identify a ground area in the depth image;

[0141] 03: Determine whether the surrounding area has an obstacle according to the depth information corresponding to the surrounding area in the depth image except the ground area.

[0142] For another example, when the program 210 is executed by the processor 10, the following road obstacle detection method is implemented:

[0143] 031: Determine whether at least one surrounding depth information is less than a predetermined distance threshold;

[0144] 032: When at least one surrounding depth information is less than the predetermined distance threshold, determine that the surrounding area has an obstacle.

[0145] It should be noted that the above-mentioned embodiments of the road obstacle detection method and the electronic device 100 are also applicable to the computer readable storage medium 200 of the embodiments of the present application, and will not be repeated here.

[0146] It can be understood that the computer program includes computer program code. The computer program code can be in the form of source code, object code, executable files, or some intermediate forms. The computer readable storage medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), and software distribution medium, etc. The processor can be a central processing unit, and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.

[0147] In the description of the present specification, the description referring to the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any suitable manner in any one or more embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the present specification and the features of the different embodiments or examples without contradiction.

[0148] Any process or method descriptions or descriptions of the flow diagrams in the present specification can be understood as representing code modules, segments, or portions of code which include one or more executable instructions for performing specific logic functions or steps in the process, and the preferred embodiments of the present application include additional implementations in which the order of steps can be changed, including use of concurrent or substantially simultaneous steps, and other implementations can be conceived and carried out by one skilled in the art without departing from the scope of the present application.

[0149] Although the embodiments of the present application have been shown and described above, it can be understood that the above-described embodiments are exemplary and should not be construed as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above-described embodiments within the scope of the present application.

Claims

1. A method for detecting road obstacles applied to electronic devices, characterized in that, include: Acquire a depth image of a first scene range, wherein the depth image includes multiple depth information corresponding to multiple different locations within the first scene range; Ground detection is performed based on the multiple depth information to identify ground regions in the depth image; Based on the depth information of the surrounding area other than the ground area in the depth image, determine whether there are obstacles in the surrounding area; The surrounding area corresponds to multiple surrounding depth information. Determining whether there are obstacles in the surrounding area based on the depth information corresponding to the surrounding area (excluding the ground area) in the depth image includes: Determine whether one of the surrounding depth information from the plurality of surrounding depth information is less than a predetermined distance threshold; When one of the surrounding depth information is less than the predetermined distance threshold, it is determined whether the surrounding depth information adjacent to the area of ​​one of the surrounding depth information is less than the predetermined distance threshold. When there are at least a predetermined number of adjacent areas whose surrounding depth information is less than the predetermined distance threshold, it is determined that there is an obstacle in the surrounding area.

2. The road obstacle detection method according to claim 1, characterized in that, The surrounding area corresponds to at least one surrounding depth information, and determining whether there is an obstacle in the surrounding area based on the depth information corresponding to the surrounding area other than the ground area in the depth image includes: Determine whether the at least one surrounding depth information is less than a predetermined distance threshold; If at least one of the surrounding depth information is less than the predetermined distance threshold, it is determined that there is an obstacle in the surrounding area.

3. The road obstacle detection method according to claim 1, characterized in that, The surrounding area corresponds to multiple first surrounding depth information. Determining whether there are obstacles in the surrounding area based on the depth information corresponding to the surrounding area (excluding the ground area) in the depth image includes: The plurality of first surrounding depth information is divided into multiple groups, wherein the first surrounding depth information of a predetermined region is considered as a group; The second surrounding depth information corresponding to each group of first surrounding depth information is determined based on the first surrounding depth information of a predetermined region adjacent to each group of first surrounding depth information. For multiple sets of first surrounding depth information, determine whether the second surrounding depth information corresponding to each set of first surrounding depth information is less than a predetermined distance threshold. When there is at least one set of second surrounding depth information corresponding to a first surrounding depth information that is less than a predetermined distance threshold, it is determined that there is an obstacle in the surrounding area.

4. The road obstacle detection method according to any one of claims 1-3, characterized in that, The road obstacle detection method also includes: When there are obstacles in the surrounding area, the first sub-area corresponding to the obstacle in the surrounding area is marked as a warning area, and the second sub-area in the surrounding area other than the first sub-area is marked as a safe area.

5. The road obstacle detection method according to any one of claims 1-3, characterized in that, The road obstacle detection method also includes: Acquire a scene image of a second scene range, wherein the second scene range at least partially overlaps with the shooting range of the first scene range; When obstacles exist in the surrounding area, the scene image is displayed, and the location information and / or distance information of the obstacles are identified in the scene image.

6. The road obstacle detection method according to claim 5, characterized in that, The acquisition of the scene image of the second scene range and the acquisition of the depth image of the first scene range are performed simultaneously; or The acquisition of the scene image of the second scene range is performed when obstacles are detected in the surrounding area.

7. The road obstacle detection method according to any one of claims 1-3, characterized in that, The road obstacle detection method also includes: When there are obstacles in the surrounding area, determine whether a predetermined application of the electronic device is enabled; When the predetermined application is not open, the user is alerted to the obstacle in a first manner; When the predetermined application is open, the user is alerted to obstacles in a second manner that is at least partially different from the first manner.

8. The road obstacle detection method according to claim 1, characterized in that, The electronic device includes a depth ranging module, which is used to output the depth image.

9. The road obstacle detection method according to claim 8, characterized in that, The depth ranging module is either a lidar module or a time-of-flight module.

10. The road obstacle detection method according to claim 8, characterized in that, The depth ranging module outputs a depth image at a frame rate greater than or equal to a predetermined frame rate, wherein the predetermined frame rate is 10 to 60 fps.

11. A road obstacle detection device for use in electronic devices, characterized in that, The road obstacle detection device includes: The first acquisition module is used to acquire a depth image of a first scene range, wherein the depth image includes multiple depth information corresponding to multiple different locations within the first scene range; The detection module is used to perform ground detection based on the multiple depth information to identify ground regions in the depth image; A first determination module is used to determine whether there is an obstacle in the surrounding area based on the depth information corresponding to the surrounding area other than the ground area in the depth image; the surrounding area corresponds to multiple surrounding depth information, and the first determination module is specifically used to: determine whether one of the surrounding depth information is less than a predetermined distance threshold; when one of the surrounding depth information is less than the predetermined distance threshold, determine whether the surrounding depth information adjacent to the area of ​​one of the surrounding depth information is less than the predetermined distance threshold; when there are at least a predetermined number of areas adjacent to the surrounding depth information that are less than the predetermined distance threshold, determine that there is an obstacle in the surrounding area.

12. An electronic device, characterized in that, The electronic device includes one or more processors and a memory, the memory storing a computer program that, when executed by the processor, implements the road obstacle detection method according to any one of claims 1-10.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the road obstacle detection method according to any one of claims 1-10.

Citation Information

Patent Citations

  • Obstacle detection method, device, equipment and storage medium

    CN109214348A

  • Dust detection method, distance detection device and electronic equipment

    CN112415532A