Road detection method and device, electronic equipment and storage medium

CN115375619BActive Publication Date: 2026-10-27ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210781796.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-01
Publication Date
2026-10-27
Estimated Expiration
2042-07-01

AI Technical Summary

Technical Problem

但是在此期间,不仅对设备性能有更多的要求,还需要搜集大量类似的素材,对深度学习网络进行训练,因此提高了检测成本,不利于道路检测方法的推广

Benefits of technology

[0009]上述方案,通过获取以相同拍摄参数对待测路段拍摄到的若干待测图像,并将待测图像中包含待测路段的待测区域,划分为若干网格,并分别检测若干待测图像中各运动对象的目标位置,再基于网格是否覆盖目标位置,为网格赋予不同标记,在此基础上,基于若干网格分别赋予的标记,得到各个道路的第一检测结果;且第一检测结果包括道路在待测区域中的道路区域,及道路的道路类别,一方面由于无需对待测图像进行分割,有助于降低道路检测的成本,另一方面由于在道路检测过程中,通过网格是否覆盖运动对象的目标位置确定网格标记,进而仅通过网格标记即可确定道路检测结果,有助于尽可能地降低道路检测的复杂度,并大大减轻检测设备的计算负荷,进而有利于道路检测方法的大量推广。故此,能够提高道路检测的适用性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115375619B_ABST
    Figure CN115375619B_ABST
Patent Text Reader

Abstract

The application discloses a road detection method and device, an electronic device and a storage medium, wherein the road detection method comprises the following steps: acquiring a plurality of to-be-detected images of a to-be-detected section shot by the same shooting parameter, the to-be-detected section comprising a plurality of roads, dividing a to-be-detected area comprising the to-be-detected section in the to-be-detected images into a plurality of grids, respectively detecting target positions of a plurality of moving objects in the to-be-detected images, and giving different marks to the grids based on whether the grids cover the target positions; and obtaining a first detection result of each road based on the marks given to the plurality of grids, wherein the first detection result comprises a road area of the road in the to-be-detected area and a road category of the road. The above scheme can improve the applicability of road detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a road detection method and apparatus, electronic device and storage medium. Background Technology

[0002] With the rapid development of modern infrastructure, China has constructed a large number of highways, urban expressways, viaducts, tunnels, and cross-sea bridges, creating a huge demand for traffic management and road maintenance. Road inspection is particularly important in this process.

[0003] Currently, road detection typically utilizes deep learning networks to segment images and then detect various road types. However, this process not only places higher demands on equipment performance but also requires collecting a large amount of similar data to train the deep learning network, thus increasing detection costs and hindering the widespread adoption of road detection methods. Therefore, improving the applicability of road detection has become an urgent problem to be solved. Summary of the Invention

[0004] The main technical problem addressed by this application is to provide a road detection method, apparatus, electronic device, and storage medium that can improve the applicability of road detection.

[0005] To address the aforementioned technical problems, the first aspect of this application provides a road detection method, comprising: acquiring several images of a road segment to be tested captured with the same shooting parameters, wherein the road segment to be tested contains several roads; dividing the area to be tested containing the road segment to be tested in the images into several grids; detecting the target position of each moving object in the images; assigning different labels to the grids based on whether the grids cover the target positions; and obtaining a first detection result for each road based on the labels assigned to the grids; wherein the first detection result includes the road area of ​​the road in the area to be tested and the road category of the road.

[0006] To address the aforementioned technical problems, a second aspect of this application provides a road detection device, comprising an acquisition module, a detection module, a marking module, and a determination module. The acquisition module acquires several images of a road segment to be tested, captured with the same shooting parameters, and the road segment to be tested contains several roads. The detection module divides the area to be tested containing the road segment into several grids within the images to be tested, and detects the target position of each moving object in the images to be tested. The marking module assigns different marks to the grids based on whether the grids cover the target positions. The determination module obtains a first detection result for each road based on the marks assigned to the grids. The first detection result includes the road area within the area to be tested and the road category of the road.

[0007] To address the aforementioned technical problems, a third aspect of this application provides an electronic device including a memory and a processor coupled to each other. The memory stores program instructions, and the processor executes the program instructions to implement the road detection method described in the first aspect.

[0008] To address the aforementioned technical problems, a fourth aspect of this application provides a computer-readable storage medium storing program instructions executable by a processor, the program instructions being used to implement the road detection method of the first aspect described above.

[0009] The above scheme acquires several images of the road segment under test using the same shooting parameters. The region containing the road segment is divided into several grids within each image. The target positions of moving objects in each image are detected, and different labels are assigned to the grids based on whether they cover the target positions. Based on these labels, a first detection result for each road is obtained. This first detection result includes the road region within the test area and the road category. On the one hand, eliminating the need for image segmentation helps reduce road detection costs. On the other hand, since grid labels are determined by whether they cover the target positions of moving objects, the road detection result can be determined solely by the grid labels, minimizing the complexity of road detection and significantly reducing the computational load on the detection equipment. This facilitates the widespread adoption of road detection methods. Therefore, it improves the applicability of road detection. Attached Figure Description

[0010] Figure 1 This is a schematic flowchart of an embodiment of the road detection method of this application;

[0011] Figure 2 This is a schematic diagram of the detection process of an embodiment of the road detection method of this application;

[0012] Figure 3 This is a schematic diagram of the framework of an embodiment of the road detection device of this application;

[0013] Figure 4 This is a schematic diagram of the framework of an embodiment of the electronic device of this application;

[0014] Figure 5 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium of this application. Detailed Implementation

[0015] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0016] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.

[0017] In this paper, the terms "system" and "network" are often used interchangeably. The term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this paper means two or more.

[0018] Please see Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the road detection method of this application.

[0019] Specifically, this may include the following steps:

[0020] Step S11: Acquire several images of the road section to be tested taken with the same shooting parameters.

[0021] In this embodiment of the disclosure, the road segment to be tested includes several roads. For example, when the road segment to be tested is a highway, the several roads may include inbound traffic roads, outbound traffic roads, emergency roads, etc.; when the road segment to be tested is an overpass, the several roads may include inbound traffic roads, outbound traffic roads, etc. The road segment to be tested can be determined according to the actual application scenario, and the several roads included in the road segment to be tested can be determined according to the road segment to be tested, without specific limitations here.

[0022] In an implementation scenario, shooting parameters may include magnification, the tilt angle of the shooting device, and the shooting angle. Shooting parameters can be selected according to the actual situation and are not specifically limited here.

[0023] Step S12: Divide the test area containing the test road segment in the test image into several grids, and detect the target position of each moving object in several test images respectively.

[0024] In one implementation scenario, the number of horizontal and vertical pixels in the test area can be obtained separately, and then the test area can be divided into several grids based on a preset number of pixels. Alternatively, a region-based image segmentation method can be used to divide the test area containing the road segment into several grids. Of course, an edge detection-based image segmentation method can also be used. The method of dividing the test area into several grids can be selected according to the actual situation, and no specific limitation is made here. It should be noted that the union of the divided grids is the entire test area, and there is no overlap between the grid regions.

[0025] In an implementation scenario, the moving object can be a pedestrian, a motor vehicle, or a non-motor vehicle. The moving object can be determined based on the actual situation, and no specific limitation is made here.

[0026] In one implementation scenario, the target position of a moving object refers to the target position of any moving object in any image under test. The target position of a moving object can be represented by its center of gravity, or it can be represented by its center. The method of representing the target position of a moving object can be chosen according to the actual situation, and no specific limitation is made here.

[0027] Step S13: Assign different labels to the grid based on whether the grid covers the target location.

[0028] In one implementation scenario, if the moving objects only include motor vehicles, different labels are assigned to the grids based on whether they cover the target location of the moving objects in the test area. First, it can be detected whether each grid covers the target location of any moving object in any test image. If the detection result is yes, the grid is assigned a first label, which can be "1" or "X"; if the detection result is no, the grid is assigned a second label, which can be "0" or "Y". The specific labeling methods for the first and second labels can be selected according to the actual situation and are not specifically limited here. It should be noted that the first label is different from the second label. This method, by labeling whether the grids cover the target area of ​​the moving objects, helps to quickly determine the location information of the moving objects in the test area, thereby improving the efficiency of road detection.

[0029] In one implementation scenario, based on whether several grids in the test area cover the target position of a moving object, different labels are assigned to the grids. First, it can be detected whether each grid covers the target position of any moving object in any test image. If the detection result is yes, the moving object category is further determined. For example, if the moving object is a motor vehicle, the grid is assigned a first label, which can be "1-1"; if the moving object is a pedestrian, the grid is assigned a second label, which can be "1-2"; if the moving object is a non-motorized vehicle, the grid is assigned a third label, which can be "1-3". If the detection result is no, the grid is assigned a fourth label, which can be "0". The specific labeling methods for the first, second, third, and fourth labels can be selected according to the actual situation and are not specifically limited here. It should be noted that the first, second, third, and fourth labels are all different.

[0030] Step S14: Based on the labels assigned to several grids, obtain the first detection results for each road.

[0031] In this embodiment of the disclosure, the first detection result includes the road area within the test area and the road category. It should be noted that the road area within the test area is distinguished based on the road category. For example, a road category of construction road corresponds to the first road area; a road category of emergency road corresponds to the second road area.

[0032] In one implementation scenario, in order to obtain the first detection result of each road, the road category of the road to which the road area belongs can be determined based on the markers assigned to the grid in the road area, and the width of the markers assigned to the grid in the road area can be determined as the width of the road area corresponding to that road category. That is, the road area of ​​each road is directly determined based on the road category to which the road area belongs.

[0033] In one implementation scenario, to further improve the initial detection results for each road, connected component analysis can be performed based on the labels assigned to several grids to obtain the road regions for each road. Furthermore, based on the target positions of moving objects within these road regions in several test images, the movement direction of the moving objects in the road regions can be determined. For example, if the target position of a moving object in a previously captured test image is at position 1, and the target position of the moving object in the current test image is at position 2, the movement direction of the moving object can be determined through the directional relationship between the first and second positions. It should be noted that the test images captured before the current test image can be the previous frame or images several frames apart. The choice of which images to capture can be made based on the actual situation and is not specifically limited here. In addition, construction marker detection can be performed on the road regions within the test areas to obtain a second detection result for the road regions. The second detection result can include no detected construction markers or detected construction markers, and the determination of the second detection result can be based on the actual detection situation and is not specifically limited here. Based on this, the road category of the road region is determined according to the labels assigned to the grids within the road regions. The above method, by marking grids, determines the road area and road category of each road, which reduces the cost of road detection compared with the segmentation method of the image to be tested, and thus improves the applicability of road detection.

[0034] In a specific implementation scenario, in response to the markings assigned to the grids in a road area representing the target location covered by the grids, the road category of the road to which the road area belongs is determined to be a driving road. For example, if the markings assigned to the grids in the road area are "1", or any one of "1-1", "1-2", or "1-3", it indicates that the road category of the road to which the road area belongs is a driving road. Further, the percentage representing the target location covered by the grids can be obtained, i.e., the ratio X between the number of markings representing the target location covered by the grids and the total number of grids. When X is greater than a preset threshold, the road category of the road to which the road area belongs is determined to be a driving road; otherwise, the road category of the road to which the road area belongs is determined to be a non-driving road. For example, the preset threshold is 5%. When X is 10%, the road category of the road to which the road area belongs is a driving road; when X is 4.5%, the road category of the road to which the road area belongs is a non-driving road. The preset threshold can be determined according to actual conditions and is not specifically limited here.

[0035] In another specific implementation scenario, in response to the marker assigned to the grid in the road area indicating that the grid does not cover the target location, the road category of the road to which the road area belongs is determined to be a non-driving road. For example, if the marker assigned to the grid in the road area is "0", it indicates that the road category of the road to which the road area belongs is a non-driving road. This method, which determines the road category of a road by the marker assigned to the road area grid, helps to improve the speed of road detection, thereby improving the applicability of road detection.

[0036] In one implementation scenario, road categories include construction roads, motor vehicle roads, non-motor vehicle roads, and pedestrian roads. To more accurately determine the road category of a road area, the road category can be determined based on the markings assigned to the grids in the road area and the second detection results of the road area. For example, when the markings assigned to the grids are "1-2", the road category of the road area is determined to be a pedestrian road. To further improve the accuracy of road category determination, the number of markings assigned to the grids can be obtained, and the ratio Y between the number of markings assigned to the grids and the number of grids can be obtained. If Y is greater than a preset threshold, the road category of the road area is determined to be a pedestrian road; otherwise, the road area is further judged to determine the road category of the road area.

[0037] In one implementation scenario, road categories include inbound traffic roads, outbound traffic roads, emergency roads, and construction roads. To more accurately determine the road category of a road area, the category can be determined based on the markings assigned to the grid within the road area, the movement direction of moving objects within the road area, and the second detection results of the road area. This method, by combining the markings assigned to the grid within the road area, the movement direction of moving objects within the road area, and the second detection results of the road area, further improves the accuracy of road detection.

[0038] In one implementation scenario, based on whether the markings assigned to the grid in a road area represent the location of the target area covered by the grid, the road to which the road area belongs is first determined to be a driving road or a non-driving road. Then, the road type of the road area is further determined. The above method, which determines whether a road area is a driving road or a non-driving road through grid markings, and then further determines the road area type on this basis, helps to improve the accuracy of road detection, thereby improving road applicability.

[0039] In a specific implementation scenario, in response to the road area being a driving road, the road area is determined to be either an incoming or outgoing driving road based on the movement direction of the moving object within the road area. Specifically, the road area can be determined to be an incoming driving road if the movement direction of the moving object is in the incoming direction; or, it can be determined to be an outgoing driving road if the movement direction of the moving object is outgoing. For example, if the target position of the moving object in a previously captured image is at position 1, and the target position of the moving object in the current image is at position 2, the movement direction of the moving object can be determined by the directional relationship between the first and second positions. If the movement direction from the first position to the second position is in the incoming direction, the road area is determined to be an incoming driving road; if the movement direction from the first position to the second position is outgoing, the road area is determined to be an outgoing driving road. It should be noted that the image captured before the current image can be the previous frame of the current image, or it can be an image several frames apart from the current image. The image captured before the current image can be selected according to the actual situation, and no specific limitation is made here. The above method, after determining that the road type is a driving road, further determines the specific road type within the driving road based on the direction of movement of the moving object. In this process, the road type can be determined without relying on higher-performance equipment, which helps to improve the applicability of road detection.

[0040] In another specific implementation scenario, in response to the road area being a non-driving road, the road area is determined to be either an emergency road or a construction road based on the second detection result of the road area. Specifically, the road area can be determined to be an emergency road if the second detection result includes the absence of a construction sign detection; or, it can be determined to be a construction road if the second detection result includes the detection of a construction sign. Furthermore, since road construction may be completed after a period of time, the complete road detection process can be repeated after a preset time period, which can be set to 1 day, 1 week, etc. The preset time period can be determined according to the application scenario and is not specifically limited here. This method, after determining that the road type is a non-driving road, further determines the specific road type within the non-driving road based on the second detection result of the road area. On the one hand, it can simply and efficiently determine the road type; on the other hand, it can make the road detection method applicable to various scenarios, thereby improving the applicability of road detection.

[0041] In one implementation scenario, after determining the road region and road category within the test area, in response to a detected change in the shooting parameters, the steps of acquiring several test images of the road segment under test with the same shooting parameters, and subsequently detecting the road region and road category of the test area containing the test segment in the test images, can be repeated based on the new shooting parameters. This method, by detecting shooting parameters, allows for re-detection of the road category when shooting parameters change, thereby improving the accuracy of road detection.

[0042] Please see Figure 2 , Figure 2 This is a schematic diagram of the detection process of an embodiment of the road detection method of this application, as shown below. Figure 2 As shown, several test images are first acquired, and these test images are images of the road segment to be tested taken at different times with the same shooting parameters. Then, the test area containing the road segment to be tested in the test images is divided into several grids, and the target position of each moving object in the test images is detected respectively. It should be noted that the target position is used to characterize the position information of the moving object in the current test image. Based on this, the grid is marked according to whether the grid covers the target position. For example, the grid covering the target position can be marked with a first marking method, which can be "1". The grid not covering the target position can be marked with a second marking method, which can be "0". The first marking method and the second marking method are different. In this process, the marking method can be determined according to the actual situation, and no specific limitation is made here. In addition, it is further determined whether the grid mark is the first marking. If the determination result is yes, it is then determined whether the movement mode of the moving object is in the direction of arrival. The specific determination method can refer to the determination method of movement direction in the aforementioned disclosed embodiment, which will not be repeated here. If the movement direction of the moving object is in the direction of arrival, the road to which the road area belongs is determined to be the inbound travel road; otherwise, the road to which the road area belongs is determined to be the outbound travel road. If the grid marker is not the first marker, construction sign detection is further performed on the road area in the test area to obtain a second detection result. Based on the fact that the grid marker is not the first marker, the road category is determined in combination with the second detection result. Specifically, it is determined whether a construction sign is detected in the road area. If the determination result is yes, the road area is determined to be a construction road; otherwise, the road area is determined to be an emergency road.

[0043] The above scheme acquires several images of the road segment under test using the same shooting parameters. The region containing the road segment is divided into several grids within each image. The target position of each moving object in each image is detected, and different labels are assigned to the grids based on whether they cover the target position. Based on these labels, a first detection result for each road is obtained. This first detection result includes the road region within the test area and the road category. On the one hand, eliminating the need for image segmentation helps reduce road detection costs. On the other hand, since grid labels are determined by whether they cover the target position of moving objects, the road detection result can be determined solely by the grid labels, minimizing the complexity of road detection and facilitating its widespread adoption. Therefore, it improves the applicability of road detection.

[0044] Please see Figure 3 , Figure 3 This is a schematic diagram of the framework of an embodiment of the road detection device of this application. The road detection device 30 includes an acquisition module 31, a detection module 32, a marking module 33, and a determination module 34. The acquisition module 31 is used to acquire several images of a road segment to be tested, taken with the same shooting parameters, and the road segment to be tested contains several roads. The detection module 32 is used to divide the area to be tested containing the road segment into several grids in the images to be tested, and to detect the target position of each moving object in the images to be tested. The marking module 33 is used to assign different marks to the grids based on whether the grids cover the target position. The determination module 34 is used to obtain a first detection result for each road based on the marks assigned to the grids, and the first detection result includes the road area of ​​the road in the area to be tested and the road category of the road.

[0045] The above scheme, on the one hand, helps reduce the cost of road detection by eliminating the need for image segmentation; on the other hand, during the road detection process, grid markers are determined by whether the grid covers the target position of the moving object, and the road detection result can be determined solely by the grid markers, which helps to minimize the complexity of road detection and thus facilitates the widespread adoption of the road detection method. Therefore, it improves the applicability of road detection.

[0046] In some disclosed embodiments, the determining module 34 includes an analysis submodule, which is used to perform connected component analysis based on the labels assigned to several grids to obtain the road regions of each road; the determining module 34 also includes a labeling submodule, which is used to determine the road category of the road to which the road region belongs based on the labels assigned to the grids in the road region.

[0047] Therefore, by marking the grid, the road area and road category of each road are determined separately. Compared with the segmentation method of the image to be tested, the cost of road detection is reduced, thereby improving the applicability of road detection.

[0048] In some disclosed embodiments, the road category includes driving roads and non-driving roads, and the marking submodule includes at least one of a first determining unit and a second determining unit. The first determining unit is used to determine the road category of the road to which the road area belongs as a driving road in response to the marking assigned to the grid in the road area representing the grid covering the target location. The second determining unit is used to determine the road category of the road to which the road area belongs as a non-driving road in response to the marking assigned to the grid in the road area representing the grid not covering the target location.

[0049] Therefore, determining the road category of a road by assigning a marker to the road area grid helps improve the speed of road detection, thereby improving the applicability of road detection.

[0050] In some disclosed embodiments, road categories include inbound traffic roads, outbound traffic roads, emergency roads, and construction roads; the determination module 34 includes a detection submodule, which is used to determine the movement direction of the moving object in the road area based on the target position of the moving object in the road area in several images to be tested, and to perform construction mark detection on the road area in the area to be tested to obtain a second detection result of the road area; the marking submodule also includes a third determination unit, which is used to determine the road category of the road area based on the markings assigned to the grid in the road area, the movement direction of the moving object in the road area, and the second detection result of the road area.

[0051] Therefore, by combining the markings assigned to the grid in the road area, the direction of movement of moving objects in the road area, and the second detection result of the road area, the road category is determined, further improving the accuracy of road detection.

[0052] In some disclosed embodiments, the third determining unit includes a first determining subunit, which is used to determine whether the road in the road area is a driving road or a non-driving road based on whether the markings assigned to the grid in the road area represent the location of the grid-covered target; the third determining unit includes a second determining subunit, which is used to determine whether the road in the road area is a driving road or a traveling road based on the direction of movement of the moving object in the road area in response to the road area being a driving road; the third determining unit further includes a third determining subunit, which is used to determine whether the road in the road area is an emergency road or a construction road based on a second detection result of the road area in response to the road area being a non-driving road.

[0053] Therefore, identifying whether a road area is a driving road or a non-driving road through grid marking, and then further determining the road area type based on this, helps improve the accuracy of road detection and thus improve road applicability.

[0054] In some disclosed embodiments, the second determining subunit includes at least one of the following: determining the road to which the road area belongs as an incoming travel road in response to the movement direction of the moving object in the road area being an incoming direction; and determining the road to which the road area belongs as an outgoing travel road in response to the movement direction of the moving object in the road area being an outgoing direction.

[0055] Therefore, after determining that the road type is a driving road, the specific road type within the driving road is determined based on the direction of movement of the moving object. In this process, the road type can be determined without relying on higher-performance equipment, which helps to improve the applicability of road detection.

[0056] In some disclosed embodiments, the third determining subunit may determine that the road to which the road area belongs is an emergency road in response to the second detection result of the road area including the absence of a construction sign detection in the road area; the third determining subunit may also determine that the road to which the road area belongs is a construction road in response to the second detection result of the road area including the presence of a construction sign detection in the road area.

[0057] Therefore, based on the determination that the road type is a non-driving road, the specific road type in the non-driving road can be determined based on the second detection result of the road area. On the one hand, the road type can be determined simply and efficiently, and on the other hand, the road detection method can be applied to a variety of scenarios, thereby improving the applicability of road detection.

[0058] In some disclosed embodiments, the marking module 33 includes a detection submodule, which is used to detect whether the grid covers the target position of any moving object in any image to be tested; the marking module 33 also includes a determination submodule, which is used to determine the detection result of the detection submodule. If yes, the grid is assigned a first mark; if no, the grid is assigned a second mark; wherein the first mark is different from the second mark.

[0059] Therefore, marking whether the grid covers the target area of ​​the moving object helps to quickly determine the location information of the moving object in the area to be tested, thereby improving the efficiency of road detection.

[0060] In some disclosed embodiments, the road detection device 30 further includes a monitoring module, which is used to, in response to detecting a change in the shooting parameters, re-execute the steps of acquiring several images of the road segment to be tested taken with the same shooting parameters, as well as subsequent steps, based on the new shooting parameters.

[0061] Therefore, by detecting the shooting parameters, the road category can be re-detected when the shooting parameters change, thereby improving the accuracy of road detection.

[0062] Please see Figure 4 , Figure 4 This is a schematic diagram of a framework of an embodiment of the electronic device of this application. The electronic device 40 includes a memory 41 and a processor 42 coupled to each other. The memory 41 stores program instructions, and the processor 42 is used to execute the program instructions to implement the steps in any of the road detection method embodiments described above. Specifically, the electronic device 40 may include, but is not limited to, a camera, a server, a mobile phone, a tablet computer, etc., and is not limited thereto.

[0063] Specifically, processor 42 controls itself and memory 41 to implement the steps in any of the road detection method embodiments described above. Processor 42 can also be referred to as a CPU (Central Processing Unit). Processor 42 may be an integrated circuit chip with signal processing capabilities. Processor 42 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, processor 42 can be implemented using integrated circuit chips.

[0064] The above scheme, on the one hand, helps reduce the cost of road detection by eliminating the need for image segmentation; on the other hand, during the road detection process, grid markers are determined by whether the grid covers the target position of the moving object, and the road detection result can be determined solely by the grid markers, which helps to minimize the complexity of road detection and thus facilitates the widespread adoption of the road detection method. Therefore, it improves the applicability of road detection.

[0065] Please see Figure 5 , Figure 5 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium of this application. The computer-readable storage medium 50 stores program instructions 51 that can be executed by a processor. The program instructions 51 are used to implement the steps in any of the road detection method embodiments described above.

[0066] The above scheme, on the one hand, helps reduce the cost of road detection by eliminating the need for image segmentation; on the other hand, during the road detection process, grid markers are determined by whether the grid covers the target position of the moving object, and the road detection result can be determined solely by the grid markers, which helps to minimize the complexity of road detection and thus facilitates the widespread adoption of the road detection method. Therefore, it improves the applicability of road detection.

[0067] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0068] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0069] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0070] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0071] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0072] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0073] If the technical solution of this application involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, with clear signs / information informing users of the personal information processing rules, authorization is obtained from the individual through pop-up information or by asking the individual to upload their personal information; wherein, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.

Claims

1. A road detection method, characterized in that, include: Acquire several images of the road segment to be tested taken with the same shooting parameters; wherein, the road segment to be tested includes several roads, and the shooting parameters include shooting magnification, pitch angle of the shooting device, and shooting angle; The test area containing the test road segment in the test image is divided into several grids, and the target position of each moving object in the several test images is detected respectively. Based on whether the grid covers the target location, assign different labels to the grid; Based on the labels assigned to the grids, a connected component analysis is performed to obtain the road regions of each road. Based on the target positions of the moving objects in the road area in the several images to be tested, the movement direction of the moving objects in the road area is determined, and construction markings are detected in the road area in the test area to obtain a second detection result of the road area; Based on the markings assigned to the grid in the road area, the movement direction of the moving object in the road area, and the second detection result of the road area, the road category of the road to which the road area belongs is determined to obtain the first detection result of each road; wherein, the first detection result includes the road area of ​​the road in the area to be tested, and the road category of the road, the road category including inbound traffic road, outbound traffic road, emergency road, and construction road.

2. The method according to claim 1, characterized in that, The road categories include driving roads and non-driving roads. The method of determining the road category of a road area based on the markings assigned to the grid within the road area includes at least one of the following: In response to the markings assigned to the grid in the road area indicating that the grid covers the target location, the road category of the road to which the road area belongs is determined as the driving road; In response to the marker assigned to the grid in the road area indicating that the grid does not cover the target location, the road category of the road to which the road area belongs is determined to be the non-driving road.

3. The method according to claim 1, characterized in that, The process of determining the road category of the road region based on the markers assigned to the grid in the road region, the movement direction of the moving object in the road region, and the second detection result of the road region includes: Based on whether the markings assigned to the grid in the road area indicate that the grid covers the target location, it is determined whether the road to which the road area belongs is a driving road or a non-driving road; In response to the fact that the road to which the road area belongs is the driving road, based on the movement direction of the moving object in the road area, the road to which the road area belongs is determined to be the inbound driving road or the outbound driving road; In response to the fact that the road to which the road area belongs is the non-driving road, based on the second detection result of the road area, it is determined that the road to which the road area belongs is the emergency road or the construction road.

4. The method according to claim 3, characterized in that, The step of determining whether a road in a road region is a road for incoming travel or a road for outgoing travel based on the direction of movement of the moving object in the road region includes at least one of the following: In response to the fact that the direction of motion of the moving object in the road area is the incoming direction, the road to which the road area belongs is determined to be the incoming travel road; In response to the moving direction of the moving object in the road area being the destination, the road to which the road area belongs is determined as the destination driving road.

5. The method according to claim 3, characterized in that, The determination of whether a road in the road area belongs to the emergency road or the construction road based on the second detection result of the road area includes: In response to a second detection result for the road area, including the absence of the construction sign detection in the road area, the road to which the road area belongs is determined to be the emergency road; In response to a second detection result of the road area, including the detection of the construction sign in the road area, the road to which the road area belongs is determined to be the construction road.

6. The method according to claim 1, characterized in that, Assigning different labels to the grid based on whether the grid covers the target location includes: Detect whether the grid covers the target position of any moving object in any of the images under test; If so, then assign a first label to the grid; If not, a second label is assigned to the grid; wherein the first label is different from the second label.

7. The method according to claim 1, characterized in that, After obtaining the first detection result for each of the roads based on the labels assigned to the plurality of grids, the method further includes: In response to the detection of a change in the shooting parameters, the steps of acquiring several images of the road segment under test taken with the same shooting parameters and subsequent steps are re-executed based on the new shooting parameters.

8. A road detection device, characterized in that, include: The acquisition module is used to acquire several images of the road segment to be tested taken with the same shooting parameters; wherein, the road segment to be tested includes several roads; the shooting parameters include shooting magnification, pitch angle of the shooting device, and shooting angle; The detection module is used to divide the test area containing the test road segment in the test image into several grids, and detect the target position of each moving object in the several test images respectively. A marking module is used to assign different marks to the grid based on whether the grid covers the target location; The analysis submodule is used to perform connected component analysis based on the labels assigned to the several grids respectively, to obtain the road regions of each of the roads; The detection submodule is used to determine the movement direction of the moving object in the road area based on the target position of the moving object in the road area in the plurality of images to be tested, and to perform construction mark detection on the road area in the image to be tested to obtain a second detection result of the road area; The third determining unit is used to determine the road category of the road to which the road area belongs based on the markings assigned to the grid in the road area, the movement direction of the moving object in the road area, and the second detection result of the road area, so as to obtain the first detection result of each road; wherein, the first detection result includes the road area of ​​the road in the area to be tested, and the road category of the road, the road category including inbound traffic road, outbound traffic road, emergency road and construction road.

9. An electronic device, characterized in that, The method includes a memory and a processor coupled to each other, the memory storing program instructions, and the processor executing the program instructions to implement the road detection method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The system stores program instructions that can be executed by a processor, the program instructions being used to implement the road detection method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Real-time road navigation method and system

    CN104121915A

  • Method for producing nationwide road digital images by using ultra-large scale GPS data

    CN110019574A