A method, apparatus, device and storage medium for identifying a road barrier
By identifying the positional relationship between lane lines and road guardrails in computer devices, the problem of manpower and material resources being consumed in the regular inspection of road guardrails has been solved, realizing fast and convenient guardrail identification and damage detection, and improving the user experience.
Patent Information
- Application Number
- CN202110046867.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-14
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2041-01-14
AI Technical Summary
In the existing technology, the regular inspection and maintenance of road guardrails is costly in terms of manpower and resources, and there is a lack of efficient identification methods.
By determining the position of lane lines in road image information and identifying the position of road guardrails in the image based on the positional relationship between lane lines and road guardrails, image processing and matching are performed using computer equipment.
It enables rapid and easy identification of road guardrails, reduces computational load, improves user experience, and can detect guardrail damage in a timely manner, supporting automated maintenance.
Smart Images

Figure CN114842431B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, specifically to a method, apparatus, computer equipment, and storage medium for identifying road guardrails. Background Technology
[0002] Road guardrails are barriers that separate motor vehicle lanes from non-motor vehicle lanes and also separate the lanes in the middle of the road for both directions of travel. The benefits of road guardrails are to prevent traffic accidents caused by abnormal driving due to driver error or other reasons, such as vehicles running off the road or crossing the median strip into the opposite lane, and to protect the safety of pedestrians, buildings, drivers and passengers on the roadside. At the same time, they also guide the driver's line of sight, increase the sense of driving safety, and beautify the road environment.
[0003] On highways or regular roads, guardrails may deform or fall off due to accidents, human-caused damage, or natural damage. Road maintenance departments need to regularly inspect and maintain the guardrails, which consumes a lot of manpower and resources. Summary of the Invention
[0004] This application provides a method, apparatus, computer equipment, and storage medium for identifying road guardrails. By determining the first image position of the lane line in the road image information and determining the second image position of the road guardrail in the road image information based on the positional relationship between the lane line and the road guardrail, the method is simple to operate, requires little computation, and is convenient and quick to implement, thus improving the user experience.
[0005] According to one aspect of this application, a method for identifying road guardrails is provided, the method comprising:
[0006] Obtain road image information of the current road, wherein the road image information includes lane lines and road guardrails of the current road;
[0007] The first image position of the lane line in the road image information is determined based on the road image information;
[0008] The second image position of the road guardrail in the road image information is determined based on the first image position in order to identify the road guardrail.
[0009] According to one aspect of this application, a device for identifying road guardrails is provided, the device comprising:
[0010] The acquisition module is used to acquire road image information of the current road, wherein the road image information includes lane lines and road guardrails of the current road;
[0011] The determining module is used to determine the first image position of the lane line in the road image information based on the road image information;
[0012] The identification module is used to determine the second image position of the road guardrail in the road image information based on the first image position of the lane line, so as to identify the road guardrail.
[0013] According to one aspect of this application, a device for identifying road guardrails is also provided, the device comprising:
[0014] One or more processors;
[0015] Memory; and
[0016] One or more applications, wherein the one or more applications are stored in the memory and configured to be operated by the processor using any of the methods described above.
[0017] According to one aspect of this application, a computer-readable storage medium is also provided, on which a computer program is stored, said computer program being loaded by a processor to perform any of the methods described above.
[0018] In this application, the position of the lane line in the first image of the road image information is determined, and the position of the road guardrail in the second image of the road image information is determined based on the positional relationship between the lane line and the road guardrail. The operation is simple, the amount of calculation is small, and the implementation process is convenient and quick, thus improving the user experience. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This illustration shows a scenario for recognizing road guardrails according to an embodiment of this application;
[0021] Figure 2 This illustration shows a flowchart of a method for identifying road guardrails provided in an embodiment of this application;
[0022] Figure 3 This application illustrates the functional modules of a road guardrail recognition device provided in an embodiment of the present application;
[0023] Figure 4 Exemplary systems that can be used to implement the various embodiments described in this application are shown.
[0024] The same or similar reference numerals in the accompanying drawings represent the same or similar parts. Detailed Implementation
[0025] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of the stated features. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0027] In this application, the term "exemplary" is used to mean "serving as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0028] It should be noted that since the method in this application embodiment is executed in a computing device, the processing objects of each computing device exist in the form of data or information, such as time, which is essentially time information. It can be understood that if size, quantity, position, etc. are mentioned in subsequent embodiments, they all refer to the corresponding data so that the electronic device can process them. Specific details will not be elaborated here.
[0029] In a typical configuration of this application, the terminal or trusted party includes one or more processors, such as a Central Processing Unit (CPU), input / output interfaces, network interfaces, and memory. Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory. Memory is an example of computer-readable media.
[0030] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PCM), programmable random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0031] The devices referred to in this application include, but are not limited to, user equipment, network equipment, or devices composed of user equipment and network equipment integrated through a network. The user equipment includes, but is not limited to, any mobile electronic product capable of human-computer interaction (e.g., via a touchpad), such as smartphones and tablets. These mobile electronic products can use any operating system, such as Android or iOS. The network equipment includes an electronic device capable of automatically performing numerical calculations and information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), and embedded devices. The network equipment includes, but is not limited to, computers, network hosts, single network servers, multiple network server clusters, or clouds composed of multiple servers. Here, a cloud consists of a large number of computers or network servers based on cloud computing, where cloud computing is a type of distributed computing, consisting of a virtual supercomputer composed of a group of loosely coupled computer clusters. The network includes, but is not limited to, the Internet, wide area network, metropolitan area network, local area network, VPN network, wireless ad hoc network, etc. Preferably, the device can also be a program running on the user equipment, network device, or a device formed by integrating user equipment and network device, network device, touch terminal, or network device and touch terminal through a network.
[0032] Of course, those skilled in the art should understand that the above-described devices are merely examples, and other existing or future devices that are applicable to this application should also be included within the scope of protection of this application, and are hereby incorporated by reference.
[0033] This application provides a method for identifying road guardrails, primarily applied to computer equipment. The computer equipment includes a corresponding communication device for establishing communication connections with other devices and receiving or sending communication data. For example, it receives road image information of the current road sent by other devices, the road image information being collected by a vehicle-mounted camera. The road image information can be directly sent to the computer equipment by the vehicle-mounted camera, or it can be sent to the computer equipment via vehicle equipment, other user equipment, or other network equipment. In other words, the other equipment includes, but is not limited to, other user equipment, other network equipment, other vehicle equipment, or other vehicle-mounted camera devices. The computer equipment also includes a data processing device for storing and processing the road image information to identify road guardrails. The computer equipment includes, but is not limited to, user equipment, network equipment, and combinations thereof. The user equipment includes, but is not limited to, any mobile electronic product capable of human-computer interaction (e.g., human-computer interaction via a touchpad). The network equipment includes, but is not limited to, computers, network hosts, single network servers, multiple network server sets, or a cloud composed of multiple servers.
[0034] Unrestricted, Figure 1 This application illustrates a scenario for collecting road image information. A vehicle is traveling on the current road at a constant speed. The vehicle is equipped with an onboard camera, such as a vehicle-mounted camera or a vehicle-mounted depth camera. This onboard camera can collect road image information, including lane lines and guardrails, such as the lane lines corresponding to dashed lines in the middle of the road and solid lines on the sides of the road, as well as the guardrails on both sides of the road. The collected road image information can be directly sent to a computer or transmitted via other devices to the computer for tasks such as guardrail recognition.
[0035] Those skilled in the art will understand that Figure 1 The application scenarios shown are merely one application scenario of the present application solution and do not constitute a limitation on the application scenarios of the present application solution. As those skilled in the art will know, with the evolution of road image acquisition scenarios and the emergence of new scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0036] Figure 2This application illustrates a method for identifying road guardrails according to one aspect of the present application, applied to a computer device, specifically including steps S101, S102, and S103. In step S101, the computer device acquires road image information of the current road, wherein the road image information includes lane lines and road guardrails of the current road; in step S102, the computer device determines a first image position of the lane lines in the road image information based on the road image information; in step S103, the computer device determines a second image position of the road guardrails in the road image information based on the first image position information, thereby identifying the road guardrails.
[0037] Specifically, in step S101, the computer device acquires road image information of the current road, wherein the road image information includes lane lines and guardrails of the current road. For example, the road image information is captured by a corresponding camera device. The camera device can acquire road image information about the current road in a fixed camera posture, or it can adjust the camera posture in real time as needed, such as rotating the orientation of the camera device within a certain angle to adjust the corresponding camera posture. The computer device acquires the road image information and identifies the guardrails based on the road image information. The computer device can directly use the road image information for identification, or it can preprocess the road image information, such as smoothing or sharpening the image; furthermore, it can also filter the road image information, such as selecting better images, or targeting road image information for a specific road. The road image information, based on the adjustment of the corresponding camera posture, can capture the lane lines and guardrails of the current road. For example, the lane lines include, but are not limited to, dashed lane lines in the middle of the road and solid lane lines on the sides of the road, and the guardrails include, but are not limited to, one or all of the guardrails on both sides of the road. Accordingly, the road guardrails identified in this application can be one or all of the road guardrails, such as identifying two guardrails sequentially according to the corresponding algorithm. The road image information in this solution can be a single road image, such as identifying road guardrails using only a single road image, reducing the number of images required for road guardrail identification, and consuming less computational resources while achieving high identification efficiency. In other cases, the road image information can also be multiple related road image information, such as obtaining discrete points based on multiple related road image information, and calculating the world coordinates of the road guardrails based on these discrete points, thereby determining the world coordinate system of the road guardrails, improving the accuracy of road guardrail identification in this solution, and facilitating subsequent identification of whether the road guardrails are damaged and the length of the damage.
[0038] In step S102, the computer device determines the first image position of the lane line in the road image information based on the road image information. For example, we can establish a corresponding image coordinate system based on the road image information, such as using the image center or upper left corner of the road image information as the origin of the image coordinate system, using the top edge of the road image information as the horizontal axis, the vertical edge of the road image information as the vertical axis, and using actual distance or pixel distance as a metric to establish the corresponding coordinate system. Here, we use the pixel coordinate system as an example to illustrate the following embodiments. Of course, those skilled in the art should understand that other coordinate systems can also be applied to this application. Of course, those skilled in the art should understand that the above pixel coordinate system is only an example. Other existing or future image coordinate systems that are applicable to this application should also be included within the scope of protection of this application, and are hereby incorporated by reference. Based on the pixel coordinate system of road image information, computer vision algorithms, such as contour recognition, are used to extract the point set corresponding to the lane lines in the road image information. This point set can be directly used as the first image position of the lane line. Of course, we can optimize this point set, such as performing straight line fitting, taking the point set at the center of the lane line (e.g., averaging the point sets of the two side contours), and then performing straight line fitting to extract the centerline coordinates of the lane line. These centerline coordinates are then used as the first image position of the lane line. If there are multiple lane lines in the image, we determine the first image position of each lane line based on its corresponding click. The centerline coordinates of the lane line can be represented by pixel point set coordinates or by a function expression corresponding to the straight line.
[0039] In step S103, the computer device determines the second image position of the road guardrail in the road image information based on the first image position information, thereby identifying the road guardrail. For example, after acquiring the first image position information of the lane lines, the computer device first performs contour recognition on the road guardrails in the road image information to determine the image positions of candidate guardrails. Subsequently, based on the positional association between the lane lines and the road guardrails, it can determine whether the set of points identified by the contour recognition is a road guardrail. If it is a road guardrail, then the set of points is taken as the second image position of the road guardrail in the road image information. The positional association between the lane lines and the road guardrails can be determined based on pixel distance in a pixel coordinate system, or based on the real distance transformed to a real-world coordinate system, etc. The road guardrails can be determined based on a corresponding straight line detection model, such as using multiple sample images containing road guardrails as training samples, marking the positions of the road guardrails in the images in these multiple sample images, and training a corresponding guardrail recognition model based on these multiple sample images. The computer device inputs the road image information into this model to obtain the image positions of the corresponding candidate road guardrails, etc.
[0040] In some implementations, in step S101, the computer device acquires initial road image information of the current road, wherein the initial road image information includes lane lines and road guardrails of the current road; high-speed region detection is performed on the initial road image information to determine whether the current road is a highway; if the current road is determined to be a highway, the initial road image information is determined as road image information; if the current road is not determined to be a highway, the initial road image information of the current road is repeatedly acquired until the high-speed region detection is passed, thereby determining the initial road image information that has passed the high-speed region detection as the road image information. For example, guardrails on ordinary roads are set in various ways, making contour recognition difficult, and some roads do not have guardrails, etc., making guardrail recognition on ordinary roads difficult. We focus our solution on highways, recognizing the guardrails on highways, etc., because the guardrails on highways are relatively uniform, and the field of vision on highways is relatively wide, providing suitable conditions for road image information acquisition, etc. Here, we refer to the unprocessed image information acquired by the computer equipment as the initial road image information. We then perform high-speed area detection on this initial road image information to determine whether the current road is a highway. If it is, the initial road image information is identified as road image information for subsequent road guardrail detection. If not, we skip the road guardrail detection of the initial road image information and repeatedly acquire the initial road image information of the current road until the initial road image information passes the high-speed area detection and is identified as road image information for subsequent road guardrail detection, etc.
[0041] In some implementations, the high-speed area detection of the initial road image information includes, but is not limited to: acquiring the acquisition location information when the initial road image information was acquired, detecting whether the acquisition location information is located within the high-speed area corresponding to the highway; determining the environmental feature points of the initial road image information, and detecting whether the environmental feature points are similar to the model feature points of the high-speed area, etc. For example, the high-speed area detection can be performed using location information or image recognition, etc. For example, when the initial road image information is acquired, the vehicle location information corresponding to the acquisition time is acquired through the positioning device of the vehicle equipment (such as the Global Positioning System or the Beidou System, etc.), and the vehicle location information is used as the acquisition location information of the initial road image information. Based on the acquisition location information, it is determined whether the initial road image information is within the high-speed area corresponding to the highway. For example, the acquisition location information is matched with the high-speed area in the map application to determine whether the acquisition location information is inside the high-speed area or whether the position difference with the high-speed area is less than or equal to the position difference threshold (such as 2 meters, etc.), thereby determining whether the initial road image information passes the high-speed area detection. In some cases, to reduce computation and improve matching efficiency, a certain range (e.g., 10km) of highway areas can be determined based on the collected location information. Only this range of highway areas can be cached, and then the collected location information can be matched with the highway areas within this range for identification. Alternatively, the computer device can store a corresponding highway area recognition model, trained using multiple sample images of the highway area. This model identifies model feature points within the corresponding highway area. The computer device can input the initial road image information into the highway area model, extract environmental feature points from the initial road image information, and match these environmental feature points with the model feature points. If the similarity between the two meets a similarity threshold, the initial road image information is deemed to have passed highway area detection. In some cases, to improve recognition accuracy, we can combine the above two recognition methods for a comprehensive judgment. For example, if the corresponding collected location information is within a highway area, and the similarity between the environmental feature points and the model feature points meets a similarity threshold, the initial road image information is deemed to have passed highway area detection.
[0042] Of course, those skilled in the art should understand that the above-described high-speed area detection is merely an example, and other existing or future high-speed area detection methods that are applicable to this application should also be included within the scope of protection of this application, and are hereby incorporated by reference.
[0043] In some implementations, in step S103, the computer device identifies the third image position of at least one candidate road guardrail in the road image information; selects a candidate road guardrail from the at least one candidate road guardrail, and uses the third image position of the selected candidate road guardrail as the third image position to be matched. If the third image position to be matched meets the matching condition with the first image position, the selected candidate road guardrail is determined to be a road guardrail, and the third image position to be matched is determined as the second image position of the road guardrail in the road image information, so as to identify the road guardrail. For example, the computer device uses contour recognition technology to extract the third image position of at least one candidate road guardrail. The third image position includes the pixel coordinates of the upper and lower edge point sets corresponding to the candidate road guardrail, or the pixel coordinates of the centerline point set calculated based on the upper and lower edge point sets, etc. The computer device performs matching based on the third image position of candidate road guardrails. For example, it selects one candidate road guardrail as the selected candidate road guardrail, and uses the third image position of the selected candidate road guardrail as the third image position to be matched. The third image position to be matched is then matched with the first image position. If the matching condition is met, the selected candidate road guardrail is determined to be a road guardrail, and the third image position to be matched is determined as the second image position of the road guardrail in the road image information, etc. The matching includes, but is not limited to, pixel difference matching and distance difference matching. The matching conditions correspond to: pixel difference less than or equal to a similarity difference threshold, distance difference less than or equal to a distance difference threshold, etc.
[0044] In some implementations, the lane lines include the side lane lines of the current road; wherein, determining the selected candidate road guardrail as a road guardrail if the position of the third image to be matched and the position of the first image satisfy the matching condition includes: determining the selected candidate road guardrail as a road guardrail if the pixel difference between the position of the third image to be matched and the position of the first image of the side lane line is less than or equal to a pixel difference threshold. For example, the lane lines include the side lane lines of the current road, and the determination of the side lane lines can be based on the input information of relevant management personnel (such as selection or retention operations of multiple lane lines); it can also be based on the positional association relationship of the currently identified multiple lane lines, determining the outermost lane line among the multiple lane lines as the side lane line; or it can be based on the association relationship between other vehicles and lane lines on the current road, such as determining the lane lines corresponding to each lane based on the vehicle position information of the vehicle in front, and determining the two outermost lanes based on the lane lines of each lane, thereby determining the corresponding side lane lines. Based on the corresponding side lane lines, the road guardrails corresponding to the side lane lines can be determined. For example, if there are two side lane lines in the road image information, the road guardrails corresponding to each side lane line can be determined, thereby determining the two road guardrails in the road image information. If only one side lane line can be determined in the road image information, then the road guardrails corresponding to that side lane line can be determined based on that one side lane line.
[0045] Because the adjacent lane lines and road guardrails are close together, the corresponding straight lines in the road image information captured by the camera are nearly parallel. After the computer determines the adjacent lane lines, it calculates the pixel difference between the third image position of the selected candidate road guardrail and the first image position of the adjacent lane lines. This pixel difference includes the average pixel distance difference between the edge or center line of the candidate road guardrail and the center line of the adjacent lane lines. For example, multiple points on the edge or center line of the corresponding road guardrail are taken at certain pixel intervals to form multiple perpendicular lines to the center line of the adjacent lane lines, and the average pixel length of these perpendicular lines is calculated. This average pixel length is used as the pixel difference. If the pixel difference is less than or equal to a pixel difference threshold (e.g., 200 pixels or 300 pixels), the selected candidate road guardrail is determined to be a road guardrail. If there are two adjacent lane lines, the selected candidate road guardrail only needs to meet the matching conditions of one of the adjacent lane lines to be determined as a road guardrail.
[0046] In some implementations, the lane line is the side lane line of the current road; wherein, if the third image information to be matched and the position of the first image satisfy the matching condition, determining the selected candidate road guardrail as a road guardrail, and determining the third image position to be matched as the second image position of the road guardrail in the road image information to identify the road guardrail, includes: determining the third world coordinate information to be matched of the selected candidate road guardrail based on the third image position; determining the first world coordinate information of the side lane line based on the first image position; if the distance difference between the third world coordinate information to be matched and the first world coordinate information is less than or equal to a distance difference threshold, determining the selected candidate guardrail as a road guardrail, and determining the third world coordinate information to be matched as the second world coordinate information of the road guardrail to identify the road guardrail. For example, in addition to identifying the road guardrail in the road image information, the world coordinates of the candidate road guardrail can also be calculated based on the road image information, and then the actual distance can be used to determine whether the candidate road guardrail is a road guardrail, etc. For example, the corresponding camera device includes a depth camera. By linking multiple road image information, the real-world coordinates of candidate road guardrails on the current road can be calculated. These real-world coordinates can be a world coordinate system established with the camera device center as the origin. Similarly, the first world coordinates of the side lane line can be calculated based on its first image position, and the corresponding third world coordinates can be calculated based on its third image position. Since the side lane line and the candidate road guardrail are parallel in the real-world coordinate system, a point can be taken from the centerline of the side lane line or the centerline corresponding to the candidate road guardrail, and a perpendicular line can be drawn to this perpendicular line. The length of this perpendicular line determines the distance difference between the third world coordinate information and the first world coordinate information. If this distance difference is less than or equal to a distance difference threshold (e.g., 1 meter or 1.5 meters), the selected candidate road guardrail is determined to be a road guardrail, and the third world coordinate information is used as the second world coordinate information of the road guardrail to identify it.
[0047] In some embodiments, the road image information includes at least two lane lines of the current road; wherein, in step S102, the computer device uses a line detection algorithm to determine the first image position of the at least two lane lines in the road image information based on the road image information; wherein, if the third image position to be matched satisfies the matching condition with the first image position, the selected candidate road guardrail is determined to be a road guardrail, and the third image position to be matched is determined to be the second image position of the road guardrail in the road image information to identify the road guardrail, including: determining the vanishing point image position of the vanishing point corresponding to the at least two lane lines based on the first image position of the at least two lane lines; if the pixel distance between the third image position to be matched and the vanishing point image position is less than or equal to a pixel distance threshold, the selected candidate road guardrail is determined to be a road guardrail, and the third image position to be matched is determined to be the second image position of the road guardrail in the road image information to identify the road guardrail. For example, in the real world, lane lines are parallel. However, due to camera distortion, lane lines appear farther apart on the side closer to the camera and closer on the side farther away, making them appear as two intersecting straight lines at a distance. By performing line fitting, the pixel coordinates of the centerlines of at least two lane lines are determined. From these centerline pixel coordinates, the pixel coordinates of the intersection point are calculated. This intersection point is the vanishing point of the at least two lane lines, and its pixel coordinates are the vanishing point image position. This vanishing point image position is typically located outside the road image information. To calculate the pixel distance between this vanishing point image position and the position of the third image to be matched, the straight line corresponding to the third image position needs to be extended. Then, a perpendicular line is drawn from the vanishing point to this extended straight line, and the pixel distance of this perpendicular line is calculated. This perpendicular line pixel distance is used as the pixel distance between the third image position to be matched and the vanishing point image position. If the pixel distance is less than or equal to the pixel distance threshold (e.g., 50 pixels), the selected candidate road guardrail is determined to be a road guardrail, and the position of the third image to be matched is determined as the second image position of the road guardrail in the road image information, so as to identify the road guardrail.
[0048] In some embodiments, the method further includes step S104 (not shown), in which the computer device extracts the contour of the road guardrail based on the second image position to determine the guardrail edge; and determines whether the road guardrail is damaged based on the edge point set corresponding to the guardrail edge. The road image information may contain one or two road guardrails. Here, we use one road guardrail as an example to illustrate the following embodiments. We understand that these embodiments are also applicable to scenarios with two road guardrails, and the corresponding implementation methods are the same or similar. For example, the second image position includes multiple pixel coordinates corresponding to the point set of the road guardrail in the road image information. Using contour extraction technology, the edge point set corresponding to the upper and lower edges of the road guardrail is extracted, and the presence of damage to the road guardrail is determined based on the edge point set, such as judging whether the two straight lines corresponding to the edge point sets of the upper and lower edges are parallel or whether there are a certain number of deviation points in the point set.
[0049] In some implementations, determining whether the road guardrail is damaged based on the set of edge points corresponding to the guardrail edge includes: performing a straight line fitting on the set of edge points corresponding to the guardrail edge to determine the edge line, and calculating the pixel distance difference from each pixel in the set of edge points to the edge line; if the pixel distance difference of a predetermined number of adjacent pixels in the set of edge points is greater than or equal to a pixel distance difference threshold, then the road guardrail is determined to be damaged. For example, when this scheme makes a judgment based on the set of edge points, it may only judge the upper edge or the lower edge, or both the upper and lower edges may be judged in this way. If the set of points of a certain edge meets the corresponding condition, then the road guardrail is determined to be damaged, etc. Specifically, we perform a straight line fitting on the set of points of the guardrail edge to determine the corresponding edge line, such as determining the pixel expression of the edge line in the pixel coordinate system, etc., and calculate the pixel distance difference from each pixel in the set of edge points to the pixel expression corresponding to the edge line, such as drawing a perpendicular line from the pixel point to the edge line and taking the degree of the perpendicular as the pixel distance difference, etc. If there is a pixel distance difference greater than or equal to a pixel distance difference threshold (such as 5 pixels), we determine that the road guardrail is damaged, etc. Furthermore, considering the impact of individual noise points on the results, we determine that a section of the road guardrail is deformed or damaged only when at least a predetermined number of adjacent pixels (e.g., at least three or five pixels) have a pixel distance difference greater than or equal to a pixel distance difference threshold. In some cases, the road image information includes the acquisition location information. If damage to the road guardrail is determined, the computer device sends a damage alert to the corresponding management device, prompting the relevant management personnel to maintain the road guardrail. This damage alert includes the corresponding acquisition location information to facilitate the location of the damaged road guardrail.
[0050] In some embodiments, the method further includes step S105 (not shown), in which, if it is determined that the road guardrail is damaged, the damaged length information of the road guardrail is determined based on the adjacent pixels. For example, after determining that the corresponding road guardrail is damaged, we can also determine the corresponding damaged length information based on the damaged point set of the damaged guardrail, which is more conducive to the maintenance and monitoring of the road guardrail. For example, the computer device takes the two pixels whose pixel distance difference is closest to the pixel distance difference threshold among a predetermined number of adjacent pixels as endpoints, takes the adjacent pixels between the endpoints as the corresponding damaged point set, and determines the damaged length information of the damaged guardrail segment based on the damaged point set. For example, based on the correlation between multiple road image information, the corresponding discrete three-dimensional coordinates are determined, and a corresponding world coordinate system is established, so as to calculate the corresponding damaged length information based on the world coordinates of the two endpoints.
[0051] In some situations, when damage to road guardrails is confirmed, computer equipment sends a damage alert to cloud-based devices, such as management equipment or backend servers of enterprises or road management departments. This alert includes information about the location of the damaged guardrail. For example, vehicle location information acquired during the collection of road image data can be used as the location of the damaged guardrail. Furthermore, the timestamp of when the road image data was collected can be sent to the management equipment or backend server to indicate the time the damage was discovered and to report it to the management department, facilitating the department's efficient allocation of personnel for repair work. In other situations, the management equipment or backend server can also obtain damage level information for the road guardrails (e.g., assessing the degree of damage, categorizing it as low, medium, or high damage). This damage level information can be determined by the computer equipment based on the length of the damage and then sent to the management equipment or backend server, or it can be determined by the management equipment or backend server based on the received damage length information. The damage length and damage level information can be determined based on a pre-set damage mapping table. For example, a damage length of 0-1 meter is considered low-level, with minimal deformation and some protective effect; a damage length of 1-3 meters is considered medium-level, with some deformation and less protective effect; and a damage length of over 3 meters involves significant deformation and offers virtually no protective effect. Furthermore, the current vehicle where the computer equipment is located can output driving prompts to the driver. Alternatively, the management device or backend server can send driving prompts to other vehicles passing through the damaged road barrier based on the damage level information. For instance, if the current driving position of another vehicle is determined to be on the current road, and the position difference between that position and the road position information of the damaged road barrier is less than or equal to a road difference threshold (e.g., 500 meters), the management device or backend server can send driving prompts to the corresponding other vehicle's equipment or the communication equipment connected to those other vehicles, indicating that the section of road corresponding to the damaged road barrier is an accident-prone area and requesting reduced speed.
[0052] The foregoing mainly describes various embodiments of a method for identifying road guardrails according to this application. In addition, this application also provides an apparatus capable of implementing the above embodiments. The following section, in conjunction with... Figure 3 Let me introduce it.
[0053] Figure 3This application illustrates an apparatus for identifying road guardrails, also known as a road guardrail identification device, specifically comprising an acquisition module 101, a determination module 102, and an identification module 103. The acquisition module 101 is used to acquire road image information of the current road, wherein the road image information includes lane lines and road guardrails of the current road; the determination module 102 is used to determine a first image position of the lane lines in the road image information based on the road image information; the identification module 103 is used to determine a second image position of the road guardrails in the road image information based on the first image position information, thereby identifying the road guardrails.
[0054] In some embodiments, the acquisition module 101 is used to acquire initial road image information of the current road, wherein the initial road image information includes lane lines and road guardrails of the current road; perform high-speed region detection on the initial road image information to determine whether the current road is a highway; if the current road is determined to be a highway, the initial road image information is determined as road image information; if the current road is not determined to be a highway, the initial road image information of the current road is repeatedly acquired until it passes the high-speed region detection, thereby determining the initial road image information that passes the high-speed region detection as the road image information. In some embodiments, the high-speed region detection of the initial road image information includes, but is not limited to: acquiring the acquisition location information when the initial road image information is acquired, detecting whether the acquisition location information is located within the high-speed region corresponding to the highway; determining the environmental feature points of the initial road image information, and detecting whether the environmental feature points are similar to the model feature points of the high-speed region, etc.
[0055] In some embodiments, the identification module 103 is used to identify the third image position of at least one candidate road guardrail in the road image information; select a candidate road guardrail from the at least one candidate road guardrail, and use the third image position of the selected candidate road guardrail as the third image position to be matched; if the third image position to be matched meets the matching condition with the first image position, determine the selected candidate road guardrail as a road guardrail, and determine the third image position to be matched as the second image position of the road guardrail in the road image information, so as to identify the road guardrail. In some embodiments, the lane lines include the side lane lines of the current road; wherein, determining the selected candidate road guardrail as a road guardrail if the third image position to be matched meets the matching condition with the first image position includes: if the pixel difference between the third image position to be matched and the first image position of the side lane line is less than or equal to a pixel difference threshold, determine the selected candidate road guardrail as a road guardrail. In some implementations, the lane line is the side lane line of the current road; wherein, if the third image information to be matched and the position of the first image satisfy the matching condition, determining the selected candidate road guardrail as a road guardrail, and determining the third image position to be matched as the second image position of the road guardrail in the road image information to identify the road guardrail, includes: determining the third world coordinate information to be matched of the selected candidate road guardrail based on the third image position; determining the first world coordinate information of the side lane line based on the first image position; if the distance difference between the third world coordinate information to be matched and the first world coordinate information is less than or equal to a distance difference threshold, determining the selected candidate guardrail as a road guardrail, and determining the third world coordinate information to be matched as the second world coordinate information of the road guardrail to identify the road guardrail.
[0056] In some embodiments, the road image information includes at least two lane lines of the current road; wherein, the determining module 102 is used to determine the first image position of the at least two lane lines in the road image information based on the road image information using a straight line detection algorithm; wherein, if the third image position to be matched satisfies the matching condition with the first image position, determining the selected candidate road guardrail as a road guardrail and determining the third image position to be matched as the second image position of the road guardrail in the road image information to identify the road guardrail includes: determining the vanishing point image position of the vanishing point corresponding to the at least two lane lines based on the first image position of the at least two lane lines; if the pixel distance between the third image position to be matched and the vanishing point image position is less than or equal to a pixel distance threshold, determining the selected candidate road guardrail as a road guardrail and determining the third image position to be matched as the second image position of the road guardrail in the road image information to identify the road guardrail.
[0057] Here, the Figure 3 The specific implementation methods corresponding to the acquisition module 101, determination module 102, and identification module 103 shown are the same as those described above. Figure 2 The embodiments of steps S101, S102, and S103 shown are the same or similar, and therefore will not be described again, but are incorporated herein by reference. In some embodiments, the device further includes an extraction module (not shown) for extracting the contour of the road guardrail based on the second image position to determine the guardrail edge; and determining whether the road guardrail is damaged based on the edge point set corresponding to the guardrail edge. In some embodiments, determining whether the road guardrail is damaged based on the edge point set corresponding to the guardrail edge includes: performing line fitting on the edge point set corresponding to the guardrail edge to determine the edge line, and calculating the pixel distance difference from each pixel point in the edge point set to the edge line; if the pixel distance difference of a predetermined number of adjacent pixels in the edge point set is greater than or equal to a pixel distance difference threshold, then the road guardrail is determined to be damaged. In some embodiments, the device further includes a length determination module (not shown) for determining the damaged length information of the road guardrail based on the adjacent pixels if the road guardrail is determined to be damaged. Here, the specific implementation of the extraction module and the length determination module is the same as or similar to the embodiments of the aforementioned steps S104 and S105, and therefore will not be repeated here, but is included by reference.
[0058] In addition to the methods and apparatus described in the above embodiments, this application also provides a computer-readable storage medium storing computer code that, when executed, performs the method described in any of the preceding embodiments.
[0059] This application also provides a computer program product that, when executed by a computer device, performs the method described in any of the preceding claims.
[0060] This application also provides a computer device, the computer device comprising:
[0061] One or more processors;
[0062] Memory, used to store one or more computer programs;
[0063] When the one or more computer programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the method as described in any of the preceding methods.
[0064] Figure 4 Exemplary systems that can be used to implement the various embodiments described in this application are shown;
[0065] like Figure 4 As shown in some embodiments, system 400 can be any of the above-described devices in each of the embodiments. In some embodiments, system 400 may include one or more computer-readable media having instructions (e.g., system memory or non-volatile memory NVM / storage device 420) and one or more processors (e.g., one or more processors 405) coupled to the one or more computer-readable media and configured to execute instructions to implement modules to perform the actions described in this application.
[0066] In one embodiment, the system control module 410 may include any suitable interface controller to provide any suitable interface to at least one of the processors 405 and / or any suitable device or component communicating with the system control module 410.
[0067] The system control module 410 may include a memory controller module 430 to provide an interface to the system memory 415. The memory controller module 430 may be a hardware module, a software module, and / or a firmware module.
[0068] System memory 415 may be used, for example, to load and store data and / or instructions for system 400. In one embodiment, system memory 415 may include any suitable volatile memory, such as suitable DRAM. In some embodiments, system memory 415 may include double data rate type quad synchronous dynamic random access memory (DDR4 SDRAM).
[0069] In one embodiment, the system control module 410 may include one or more input / output (I / O) controllers to provide interfaces to the NVM / storage device 420 and (one or more) communication interfaces 425.
[0070] For example, NVM / storage device 420 may be used to store data and / or instructions. NVM / storage device 420 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable (one or more) non-volatile storage devices (e.g., one or more hard disk drives (HDDs), one or more compact disc (CD) drives, and / or one or more digital universal optical disc (DVD) drives).
[0071] NVM / storage device 420 may include storage resources that are physically part of a device on which system 400 is mounted, or that can be accessed by the device without necessarily being part of it. For example, NVM / storage device 420 may be accessed via a network through one or more communication interfaces 425.
[0072] One or more communication interfaces 425 may provide the system 400 with an interface to communicate over one or more networks and / or with any other suitable device. The system 400 may wirelessly communicate with one or more components of a wireless network in accordance with any of one or more wireless network standards and / or protocols.
[0073] In one embodiment, at least one of the processors 405 may be logically packaged with one or more controllers of the system control module 410 (e.g., memory controller module 430). In one embodiment, at least one of the processors 405 may be logically packaged with one or more controllers of the system control module 410 to form a system-in-a-package (SiP). In one embodiment, at least one of the processors 405 may be integrated with the logic of one or more controllers of the system control module 410 on the same die. In one embodiment, at least one of the processors 405 may be integrated with the logic of one or more controllers of the system control module 410 on the same die to form a system-on-a-chip (SoC).
[0074] In various embodiments, system 400 may be, but is not limited to, a server, workstation, desktop computing device, or mobile computing device (e.g., laptop computing device, handheld computing device, tablet computer, netbook, etc.). In various embodiments, system 400 may have more or fewer components and / or different architectures. For example, in some embodiments, system 400 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.
[0075] It should be noted that this application can be implemented in software and / or a combination of software and hardware, for example, using an application-specific integrated circuit (ASIC), a general-purpose computer, or any other similar hardware device. In one embodiment, the software program of this application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of this application (including related data structures) can be stored in a computer-readable recording medium, such as RAM memory, magnetic or optical drives, floppy disks, and similar devices. Furthermore, some steps or functions of this application can be implemented in hardware, for example, as circuitry that cooperates with a processor to perform the various steps or functions.
[0076] Furthermore, a portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0077] Communication media include media through which communication signals containing, for example, computer-readable instructions, data structures, program modules, or other data are transmitted from one system to another. Communication media can include guided transmission media (such as cables and wires (e.g., optical fibers, coaxial cables, etc.)) and wireless (unguided transmission) media capable of propagating energy waves, such as sound, electromagnetic, RF, microwave, and infrared. Computer-readable instructions, data structures, program modules, or other data can be embodied as modulated data signals in, for example, wireless media (such as carrier waves or similar mechanisms embodied as part of spread spectrum technology). The term "modulated data signal" refers to a signal whose one or more characteristics are altered or set in a manner that encodes information in the signal. Modulation can be analog, digital, or a hybrid modulation technique.
[0078] By way of example and not limitation, computer-readable storage media may include volatile and non-volatile, removable and non-removable media implemented by any method or technique for storing information such as computer-readable instructions, data structures, program modules or other data. For example, computer-readable storage media include, but are not limited to, volatile memories such as random access memory (RAM, DRAM, SRAM); and non-volatile memories such as flash memory, various read-only memories (ROM, PROM, EPROM, EEPROM), magnetic and ferroelectric RAM (FeRAM); and magnetic and optical storage devices (hard disks, magnetic tapes, CDs, DVDs); or other media now known or hereafter developed capable of storing computer-readable information / data for use by a computer system.
[0079] Herein, one embodiment of this application includes an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the apparatus is triggered to run a method and / or technical solution based on the foregoing embodiments of this application.
[0080] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within this application. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in the apparatus claims may also be implemented by a single unit or device in software or hardware.
[0081] The foregoing has provided a detailed description of a method, apparatus, computer device, and storage medium for identifying road guardrails according to embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for identifying road guardrails, characterized in that, The method includes: Obtain road image information of the current road, wherein the road image information includes lane lines and road guardrails of the current road; the road image information includes at least two lane lines of the current road; Using a line detection algorithm, the first image position of the at least two lane lines in the road image information is determined based on the road image information; Identify the third image location of at least one candidate road guardrail in the road image information; Select one candidate road guardrail from the at least one candidate road guardrail, and use the third image position of the selected candidate road guardrail as the third image position to be matched; If the position of the third image to be matched meets the matching condition with the position of the first image, the selected candidate road guardrail is determined to be a road guardrail, and the position of the third image to be matched is determined to be the second image position of the road guardrail in the road image information, so as to identify the road guardrail. Wherein, if the position of the third image to be matched meets the matching condition with the position of the first image, the selected candidate road guardrail is determined to be a road guardrail, and the position of the third image to be matched is determined as the second image position of the road guardrail in the road image information, so as to identify the road guardrail, including: The vanishing point image position of the vanishing point corresponding to the at least two lane lines is determined based on the first image position of the at least two lane lines. If the pixel distance between the position of the third image to be matched and the position of the vanishing point image is less than or equal to a pixel distance threshold, the selected candidate road guardrail is determined to be a road guardrail, and the position of the third image to be matched is determined as the second image position of the road guardrail in the road image information, so as to identify the road guardrail.
2. The method according to claim 1, characterized in that, The acquisition of road image information of the current road includes: Acquire initial road image information of the current road, wherein the initial road image information includes lane lines and road guardrails of the current road; High-speed region detection is performed on the initial road image information to determine whether the current road is a highway; If it is determined that the current road is a highway, the initial road graphic information is determined as road image information; If it is not determined that the current road is a highway, the initial road image information of the current road is repeatedly acquired until the highway area is detected, thereby determining the initial road image information that has passed the highway area detection as the road image information.
3. The method according to claim 2, characterized in that, The high-speed region detection of the initial road image information includes at least one of the following: Acquire the acquisition location information when the initial road image information is acquired, and detect whether the acquisition location information is located within the highway area corresponding to the highway. The environmental feature points of the initial road graphic information are determined, and it is detected whether the environmental feature points are similar to the model feature points of the highway area.
4. The method according to claim 1, characterized in that, The lane lines are the side lane lines of the current road; wherein, determining the selected candidate road guardrail as a road guardrail if the position of the third image to be matched and the position of the first image meet the matching conditions includes: If the pixel difference between the position of the third image to be matched and the position of the first image of the adjacent lane line is less than or equal to the pixel difference threshold, the selected candidate road guardrail is determined to be a road guardrail.
5. The method according to claim 1, characterized in that, The lane lines include the side lane lines of the current road; wherein, if the position of the third image to be matched meets the matching condition with the position of the first image, the selected candidate road guardrail is determined to be a road guardrail, and the position of the third image to be matched is determined as the second image position of the road guardrail in the road image information, so as to identify the road guardrail, including: The third-world coordinate information of the selected candidate road guardrail to be matched is determined based on the position of the third image; Determine the first world coordinate information of the side lane line based on the position of the first image; If the distance difference between the third-world coordinate information to be matched and the first-world coordinate information is less than or equal to the distance difference threshold, the selected candidate guardrail is determined to be a road guardrail, and the third-world coordinate information to be matched is determined to be the second-world coordinate information of the road guardrail to identify the road guardrail.
6. The method according to claim 1, characterized in that, The method further includes: The contour of the road guardrail is extracted based on the position of the second image to determine the edge of the road guardrail; The presence or absence of damage to the road guardrail is determined based on the set of edge points corresponding to the guardrail's edge.
7. The method according to claim 6, characterized in that, The step of determining whether the road guardrail is damaged based on the set of edge points corresponding to the guardrail edge includes: The edge line is determined by performing line fitting on the set of edge points corresponding to the edge edge, and the pixel distance difference from each pixel in the set of edge points to the edge line is calculated. If the pixel distance difference between a predetermined number of adjacent pixels in the edge point set is greater than or equal to a pixel distance difference threshold, then the road guardrail is determined to be damaged.
8. The method according to claim 7, characterized in that, The method further includes: If it is determined that the road guardrail is damaged, the length of the damage to the road guardrail is determined based on the adjacent pixels.
9. A device for identifying road guardrails, characterized in that, The device includes: An acquisition module is used to acquire road image information of the current road, wherein the road image information includes lane lines and road guardrails of the current road; the road image information includes at least two lane lines of the current road; a determination module is used to determine the first image position of the at least two lane lines in the road image information based on the road image information using a straight line detection algorithm; The recognition module is used to identify the third image location of at least one candidate road guardrail in the road image information; Select one candidate road guardrail from the at least one candidate road guardrail, and use the third image position of the selected candidate road guardrail as the third image position to be matched; If the position of the third image to be matched meets the matching condition with the position of the first image, the selected candidate road guardrail is determined to be a road guardrail, and the position of the third image to be matched is determined to be the second image position of the road guardrail in the road image information, so as to identify the road guardrail. Wherein, if the position of the third image to be matched meets the matching condition with the position of the first image, the selected candidate road guardrail is determined to be a road guardrail, and the position of the third image to be matched is determined as the second image position of the road guardrail in the road image information, so as to identify the road guardrail, including: The vanishing point image position of the vanishing point corresponding to the at least two lane lines is determined based on the first image position of the at least two lane lines. If the pixel distance between the position of the third image to be matched and the position of the vanishing point image is less than or equal to a pixel distance threshold, the selected candidate road guardrail is determined to be a road guardrail, and the position of the third image to be matched is determined as the second image position of the road guardrail in the road image information, so as to identify the road guardrail.
10. A device for identifying road guardrails, characterized in that, The device includes: One or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and configured to be operated by the processor according to any one of claims 1 to 8.
Citation Information
Patent Citations
A method and device for eliminating false lane lines
CN109271857A
Vehicle running lane positioning method and device as well as terminal
CN110174113A