Lane line determination method and device and storage medium
By comparing the positional information of the current image with that of the base database image during traffic detection and updating the lane lines, the problem of decreased detection accuracy caused by changes in the pose of the image acquisition device is solved, and stable traffic detection is achieved in frequently changing scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-03-31
AI Technical Summary
In existing traffic detection solutions, changes in the pose of image acquisition equipment can lead to a decrease in lane line detection accuracy or even failure, affecting the normal operation of the detection system.
By performing target detection on the current image, the location information of the current object is obtained and compared with the reference location information in the base image to determine the deviation information. The current lane line is then updated using historical lane lines.
Even with changes in the pose of the image acquisition device, lane lines can be accurately and quickly determined, ensuring the accuracy of traffic detection.
Smart Images

Figure CN121767950A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of target detection technology, and in particular to a lane line determination method, device, and storage medium. Background Technology
[0002] With the rapid development and widespread application of artificial intelligence in the field of computer vision, more and more visual intelligence solutions are being introduced into traffic management scenarios.
[0003] For example, traffic detection and vehicle detection are frequently involved in highway scenarios. Current traffic detection solutions mainly rely on drivers' proactive reporting, manual inspection of traffic video images, and the deployment of visual detection algorithms for intelligent detection. In comparison, traffic detection methods using visual detection algorithms have advantages such as high recognition efficiency and timely response, making them a more ideal solution at present.
[0004] Visual inspection methods often use lane lines to map a road scene, allowing for individual lane detection or simultaneous detection of multiple lanes. However, if the pose of the image acquisition device changes, the pre-defined lane lines may become unsuitable for the new pose, leading to a significant drop in algorithm detection accuracy or even system failure, severely impacting the normal operation of the detection system. Summary of the Invention
[0005] This application provides at least one method, apparatus, device, and computer-readable storage medium for determining lane lines.
[0006] A first aspect of this application provides a lane line determination method, comprising: performing target detection processing on an acquired current image to obtain a current object in the current image and the current position information of the current object in the current image; obtaining reference position information of the current object in a base image, wherein the acquisition time of the base image is earlier than the acquisition time of the current image; determining deviation information between the current image and the base image based on the current position information and the reference position information; and determining the current lane line in the current image based on the deviation information and historical lane lines in the base image.
[0007] In one embodiment, obtaining the reference position information of the current object in the base image includes: finding a reference object that matches the current object among each base object in the base image; and determining the historical position information of the reference object in the base image as the reference position information of the current object.
[0008] In one embodiment, before obtaining the reference position information of the current object in the base image, the method further includes: performing target detection processing on the acquired historical image to obtain a target detection result, wherein the acquisition time of the historical image is earlier than the acquisition time of the current image; in response to the target detection result indicating that there is a fixed object in the historical image, determining the historical image as the base image, and determining the fixed object in the historical image as the base object.
[0009] In one embodiment, after finding a reference object matching the current object in each base image of the base image, the method further includes: acquiring other images acquired under other acquisition directions and performing target detection processing to obtain other objects in the other images, wherein the other acquisition directions are different from the current acquisition direction of the current image; acquiring base images corresponding to the other acquisition directions; searching whether there is a reference object matching the other object in the base images corresponding to the other acquisition directions; and updating the base images in response to the absence of a reference object matching the other object in each base image.
[0010] In one embodiment, after responding to the absence of a reference object matching the current object in each base database object, the method further includes: acquiring other images with different acquisition directions from the current image and performing target detection processing to obtain other objects in the other images; searching for reference objects matching the other objects in each base database object; and updating the base database images in response to the absence of a reference object matching the other objects in each base database object.
[0011] In one embodiment, determining the deviation information between the current image and the base image based on the current location information and the reference location information includes: obtaining the current coordinates in the current location information and the reference coordinates in the reference location information; and determining the deviation information based on the coordinate difference between the current coordinates and the reference coordinates.
[0012] In one embodiment, after determining the deviation information between the current image and the base image based on the current location information and the reference location information, the method further includes: comparing the deviation information with a preset deviation threshold to obtain a comparison result; in response to the comparison result indicating that the deviation information is greater than the preset deviation threshold, determining the current lane line in the current image based on the deviation information and historical lane lines in the base image.
[0013] In one embodiment, determining the current lane line in the current image based on the deviation information and historical lane lines in the baseline image includes: acquiring historical feature points in the historical lane lines; updating the coordinate information of the historical feature points based on the deviation information to obtain the current feature points; and determining the current lane line based on the current feature points.
[0014] A second aspect of this application provides a lane line determination device, comprising: a detection module for performing target detection processing on an acquired current image to obtain a current object in the current image and the current position information of the current object in the current image; a reference acquisition module for acquiring reference position information of the current object in a base image, wherein the acquisition time of the base image is earlier than the acquisition time of the current image; a deviation determination module for determining deviation information between the current image and the base image based on the current position information and the reference position information; and a lane line determination module for determining the current lane line in the current image based on the deviation information and historical lane lines in the base image.
[0015] A third aspect of this application provides an electronic device, including a memory and a processor, wherein the processor is configured to execute program instructions stored in the memory to implement the lane line determination method described above.
[0016] The fourth aspect of this application provides a computer-readable storage medium having program instructions stored thereon, which, when executed by a processor, implement the lane line determination method described above.
[0017] The above scheme performs target detection processing on the acquired current image to obtain the current object and its current position information within the current image. Then, it obtains the reference position information of the current object in a database image. Since the database image was acquired earlier than the current image, it contains pre-recorded reference position information of the current object over historical periods for comparison. Based on the current position information and the reference position information, the deviation information between the current image and the database image is determined. The database image includes pre-drawn historical lane lines; based on the deviation information and the historical lane lines in the database image, the current lane line in the current image can be determined, thereby achieving accurate and rapid lane line information determination.
[0018] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.
[0020] Figure 1 This is a flowchart illustrating an exemplary embodiment of the lane line determination method of this application; Figure 2 This is a block diagram illustrating a lane line determination device in an exemplary embodiment of this application; Figure 3 This is a schematic diagram of the structure of an embodiment of the electronic device of this application; Figure 4 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0021] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0022] 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.
[0023] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this document means two or more. Moreover, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of objects. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0024] To facilitate understanding, one of the applicable scenarios of this application will be illustrated by example.
[0025] With the rapid development and widespread application of artificial intelligence in the field of computer vision, more and more visual intelligence solutions are being introduced into traffic management scenarios.
[0026] For example, traffic detection and vehicle detection are frequently involved in highway scenarios. Current traffic detection solutions mainly rely on drivers' proactive reporting, manual inspection of traffic video images, and the deployment of visual detection algorithms for intelligent detection. In comparison, traffic detection methods using visual detection algorithms have advantages such as high recognition efficiency and timely response, making them a more ideal solution at present.
[0027] Visual inspection methods often use lane lines to map traffic scenes, allowing for individual lane detection or simultaneous detection of multiple lanes. However, the hardware performance of front-end cameras is limited, typically supporting only one or two detection algorithms, resulting in insufficient ability to identify various anomalies. Especially when the pose of the image acquisition device changes (for example, in traffic inspection scenarios where PTZ cameras are widely used and frequently rotate to adjust their viewing angle), if the pre-defined lane lines cannot be dynamically updated with the changing viewpoint, they may become unsuitable for the new pose. This can lead to a significant drop in algorithm detection accuracy, or even failure, severely impacting the normal operation of the inspection system.
[0028] Therefore, in traffic detection scenarios, ensuring the stability and accuracy of visual intelligent detection algorithms under conditions of frequent changes in camera images is a research direction that urgently needs to be addressed and is of great significance.
[0029] Please see Figure 1 , Figure 1 This is a flowchart illustrating an exemplary embodiment of the lane line determination method of this application. Specifically, it may include the following steps: Step S110: Perform target detection processing on the acquired current image to obtain the current object in the current image and the current position information of the current object in the current image.
[0030] Here, "current image" refers to the image captured in the detection scene during the current time period. Specifically, it can be obtained through image acquisition or extracted from a video stream through video acquisition; this is not limited here. "Current object" refers to a fixed object (or stationary object) detected in the current image. There can be one or more current objects, or a combination of different types; this is not limited here.
[0031] For example, object detection methods may include, but are not limited to, detecting whether a fixed object category exists in the current image (e.g., stationary objects fixed on the road such as streetlights, gantries, and traffic lights; the fixed object category can be preset and is not limited here); and / or determining stationary objects by combining the current image and historical images. The historical images were acquired earlier than the current image, and the current and historical images can be stored sequentially as an image sequence, which is not limited here. For example, based on the motion state (or trajectory) of objects in multiple historical images, stationary objects in multiple historical images can be determined, and then objects identical to the stationary objects can be detected in the current image, which are then identified as the current object in the current image.
[0032] Therefore, after obtaining the current object in the current image, we can further determine the position information of the current object in the current image (i.e., the current position information).
[0033] Step S120: Obtain the reference position information of the current object in the base image. The base image was obtained earlier than the current image.
[0034] The base image refers to the images that are pre-stored in the image base. The image base can be located in the storage medium of the image acquisition device or in the storage medium of other devices that have a communication connection with the image acquisition device. The type of storage medium can include non-volatile storage media (such as hard disks, flash memory, etc.) or volatile storage media (such as memory, etc.), which is not limited here.
[0035] The acquisition time (sampling time) of the base image is earlier than the acquisition time (sampling time) of the current image. It is used to provide reference position information to determine whether the image acquisition device has changed its pose when acquiring the current image. The base image can be determined from historical images, and there can be one or more base images; details are omitted here. For example, if the image acquisition device changes its pose when acquiring the current image compared to when acquiring the base image, then the reference position information of the same object (e.g., the current object) in the base image will be different from its current position information in the current image (or there will be a significant difference; very small positional deviations can be considered normal deviations in detection accuracy).
[0036] It should also be noted that the current object may or may not appear in the base image; this is not a limitation. For example, if the image acquisition device undergoes a very large pose change or the detection scene is altered, the current object may not appear in the base image.
[0037] For example, the method for obtaining the reference position information of the current object in the database image may include, but is not limited to, finding a database object in the database image that matches the current object, and determining the position information of the database object in the database image as the reference position information of the current object in the database image. The position information of the database object in the database image may be predetermined and stored, or it may be obtained by performing object detection on the database object in the database image when the reference position information is needed; this is not limited here.
[0038] Step S130: Determine the deviation information between the current image and the base image based on the current position information and the reference position information.
[0039] The deviation information refers to coordinate deviation information, which may include horizontal coordinate deviation and / or vertical coordinate deviation. The current position information and reference position information can be expressed in coordinate form; therefore, the deviation information between the current image and the base image can be determined based on the difference between the current position information and the reference position information.
[0040] Step S140: Determine the current lane line in the current image based on the deviation information and the historical lane lines in the base image.
[0041] Based on the preceding steps, lane line information (historical lane lines) can be pre-drawn in the base image. The process of drawing lane lines can be automatically generated by software algorithms, and / or generated corresponding to drawing instructions issued by the user; this is not limited here. Lane lines can be represented in various ways (e.g., solid lines, dashed lines, etc.), which will not be elaborated upon here. Therefore, if the image acquisition device undergoes a pose change when acquiring the current image compared to when acquiring the base image, after determining the deviation information between the current image and the base image, the position information of the historical lane lines in the base image can be updated based on the deviation information, thereby obtaining the lane line information in the current image (current lane lines).
[0042] Furthermore, the current lane lines can be configured and redeployed to the currently deployed visual intelligent detection algorithm for traffic detection. Thus, by detecting the positional deviation between the current image and the database image, the lane line information in the database image can be updated, and the updated lane line information is redeployed to the currently deployed visual intelligent detection algorithm for application, ensuring the accuracy of traffic detection.
[0043] As can be seen, this application performs target detection processing on the acquired current image to obtain the current object in the current image and the current position information of the current object in the current image. Then, it obtains the reference position information of the current object in the base image. The base image was acquired earlier than the current image, so the reference position information of the current object in the historical time period is pre-recorded in the base image for comparison. The deviation information between the current image and the base image is determined based on the current position information and the reference position information. The base image includes pre-drawn historical lane lines. Based on the deviation information and the historical lane lines in the base image, the current lane line in the current image can be determined, thereby achieving accurate and rapid determination of lane line information. Even in scenarios where the front-end camera is in a frequently changing scene, the accuracy of traffic detection can still be stably guaranteed.
[0044] Based on the above embodiments, this application embodiment describes the steps for obtaining the reference position information of the current object in the base image. Specifically, the method of this embodiment includes the following steps: Find the reference object that matches the current object in each base image; determine the historical position information of the reference object in the base image as the reference position information of the current object.
[0045] Referring to the foregoing embodiments, the process of obtaining the reference position information of the current object in the base image in this application may include, but is not limited to, matching each base object in the base image with the current object to find a reference object that matches the current object in each base object. Therefore, the historical position information of the reference object in the base image can be determined as the reference position information of the current object.
[0046] There may be one or more methods for matching each base object in the base image with the current object. For example, it may include, but is not limited to, matching based on category information and / or matching based on image features (such as appearance features). No limitation is made here.
[0047] Based on the above embodiments, this application embodiment describes the steps prior to obtaining the reference position information of the current object in the base image. Specifically, the method of this embodiment includes the following steps: The acquired historical images are processed for target detection to obtain target detection results. The acquisition time of the historical images is earlier than that of the current images. In response to the target detection results indicating the presence of fixed objects in the historical images, the historical images are identified as base images, and the fixed objects in the historical images are identified as base objects.
[0048] As described in conjunction with the foregoing embodiments, before obtaining the reference position information of the current object in the base image, it is necessary to first determine the base image and the base objects in the base image.
[0049] For example, after acquiring historical images, a database of images can be filtered from them. These database images must contain stationary objects. Therefore, object detection processing can be performed on the acquired historical images to obtain object detection results. These results can indicate whether stationary objects exist in the historical images. If the object detection result of a historical image indicates the presence of a stationary object, then that historical image can be identified as a database image, and the stationary objects within it can be identified as database objects.
[0050] Specifically, traffic detection scenarios typically involve detecting oncoming vehicles and / or outgoing vehicles on the road. Oncoming refers to the direction a vehicle travels from a distance toward the image acquisition device, while outgoing refers to the direction a vehicle travels from the image acquisition device away from the distance. Taking oncoming vehicle detection as an example, the image acquisition device adjusts to the oncoming direction view to acquire images, obtaining historical images. Pre-trained object detection models can be used to perform object detection processing on these historical images to identify fixed objects within them. Historical images containing these objects are then designated as the oncoming base image pic1. Specifically, 3-5 fixed objects can be identified in the historical images, and the object information (such as location information, category information, etc.) of each fixed object in its historical image can be recorded, resulting in a base object set, such as: O1 = {obj1, obj2, ..., objk} Where O1 represents the set of fixed objects identified in the baseline image (which can be all or some of the fixed objects in the baseline image, without limitation here). For example, the fixed objects in the baseline image can be filtered to obtain the baseline objects. The filtered baseline objects need to be distributed as evenly as possible in the baseline image. For example, the baseline image can be divided into regions according to preset region division requirements to obtain multiple sub-regions of the baseline image, and the fixed objects in the sub-regions are identified as baseline objects. For example, the sub-regions can include, but are not limited to, the upper left, lower left, upper right, and lower right image regions of the baseline image. The size of the sub-regions can be flexibly set as needed, without limitation here. In the baseline object set, objk represents the information of the k-th baseline object after filtering, and its position information can be recorded as follows: objk={{xLeft,yUp},{xRight,yDown}} In this embodiment, the base objects detected by the visual algorithm are usually represented in the form of visual detection boxes. Therefore, the position information of the base objects can be represented by the vertex coordinate information of the visual detection boxes (such as the midpoint of the bottom line, the geometric center point, etc. of the visual detection boxes, which are not limited here). In this embodiment, {xLeft, yUp}, {xRight, yDown} are the upper left and lower right coordinates of the visual detection box corresponding to the base object, that is, xLeft corresponds to the x-coordinate of the upper left corner of the detection box, yUp corresponds to the y-coordinate of the upper left corner of the detection box, xRight corresponds to the x-coordinate of the lower right corner of the detection box, and yDown corresponds to the y-coordinate of the lower right corner of the detection box.
[0051] Based on the above embodiments, this application embodiment describes the steps of finding a reference object that matches the current object among each base image in the base image database. Specifically, the method of this embodiment includes the following steps: If a reference object matching the current object exists in each base database object, the historical position information of the reference object in the base database image is determined as the reference position information of the current object; if no reference object matching the current object exists in each base database object, the base database image is updated.
[0052] Referring to the foregoing embodiments, when searching for a reference object that matches the current object among the base objects in the base image database, if the pose of the image acquisition device does not change significantly or the detection scene remains unchanged, a reference object matching the current object can usually be found. However, if the pose of the image acquisition device changes significantly or the detection scene changes, it becomes difficult to find a reference object matching the current object.
[0053] Therefore, depending on whether a reference object matching the current object is found in each base object of the base image, different subsequent processing measures are required.
[0054] For example, if there is a reference object matching the current object in each of the base database objects, the historical position information of the reference object in the base database image can be determined as the reference position information of the current object, referring to the method of the aforementioned embodiments. If there is no reference object matching the current object in each of the base database objects, the previously determined base database image is difficult to apply to the current detection scenario, so the base database image needs to be updated.
[0055] Based on the above embodiments, this application embodiment describes the steps following the condition that no reference object matching the current object exists in each base library object. Specifically, the method of this embodiment includes the following steps: The system acquires other images acquired from other acquisition directions and performs target detection processing to obtain other objects in these other images. These other acquisition directions are different from the current acquisition direction of the current image. The system then acquires the base image corresponding to the other acquisition directions. It searches the base image corresponding to the other acquisition directions to see if there is a reference object matching the other object. In response to the absence of a reference object matching the other object in each base image, the system updates the base image.
[0056] As illustrated in the foregoing embodiments, if there is no reference object matching the current object in each base database object, the previously determined base database images are difficult to apply to the current detection scenario.
[0057] Based on this, if the current image acquisition device is a PTZ camera or similar device, it can be controlled to change its image acquisition pose to obtain other images with different acquisition directions than the current image, and target detection processing (detecting fixed objects in other images) can be performed on these other images to obtain other objects (other fixed objects) in the other images. The method for changing the image acquisition pose can be flexibly set as needed (e.g., left-right rotation and / or up-down rotation by preset angles, etc.), and is not limited here.
[0058] This requires prior knowledge of corresponding database images in other acquisition directions to match objects in other images with database objects in the corresponding directions. In other words, this application allows control of the image acquisition device to acquire images in one or more directions during implementation, and to determine one or more database image sets based on historical images acquired in different directions. One acquisition direction can generate one database image set. Therefore, even after rotating the image acquisition device to other poses, database images in the corresponding acquisition direction can still be acquired. Furthermore, the image acquisition device can be controlled to acquire images at different times in each acquisition direction, thus obtaining images with different environmental information, such as day and night, sunny days, foggy days, and rainy days, to adapt to the impact of environmental information changes on detection accuracy (solving problems such as some database objects being unclear and difficult to detect during the day; some database objects being unclear and difficult to detect at night; and some database objects being unclear and difficult to detect in foggy weather).
[0059] For example, the foregoing embodiments use a vehicle traveling in the direction of travel as an example. This embodiment uses a vehicle traveling out of travel as an example (equivalent to the image acquisition device rotating 180 degrees to acquire an image of the outgoing scene, i.e., obtaining other images from other acquisition directions (going directions)). When deploying the base image set for the outgoing scene, the image acquisition device can be adjusted to the outgoing scene, and similarly referring to the method of deploying the base image set for the incoming scene in the foregoing embodiments, the base image acquired by the outgoing scene is recorded as the outgoing base image pic2, and 3-5 fixed objects detected in the outgoing base image are recorded to obtain the corresponding fixed object set O2: O2 = {obj1,obj2,...,objk} Then, referring to the matching method of the aforementioned embodiments, a reference object matching other objects can be found in each base database object of the base database image corresponding to other directions. If a reference object is found, the deviation information between the current image and the base database image can still be determined based on the current position information and the reference position information according to the method of the aforementioned embodiments. Then, combined with the historical lane lines in the base database image, the current lane line in the current image can be determined. The specific details are not elaborated here.
[0060] If it is still impossible to find a matching reference object among the base objects in the base images corresponding to other directions, it indicates that the detection scenario of the characterization image acquisition device has changed significantly, making it difficult to use the previously stored base images, and the base images need to be updated.
[0061] The update process may include, but is not limited to, the method for determining the base image as described in the foregoing embodiments, re-acquiring images (which may be re-acquiring images from one or more directions) to redetermine the base image and delete the previous base image. This will not be elaborated here.
[0062] Based on the above embodiments, this application embodiment describes the steps for determining the deviation information between the current image and the base image based on the current location information and the reference location information. Specifically, the method of this embodiment includes the following steps: Obtain the current coordinates from the current location information and the reference coordinates from the reference location information; determine the deviation information based on the coordinate difference between the current coordinates and the reference coordinates.
[0063] Referring to the foregoing embodiments, the current position information can be determined based on the coordinates of the detection box of the current object, and the reference position information can be determined based on the detection box of the underlying object corresponding to the current object.
[0064] For example, the coordinates of the detection box for the current object 'a' detected in the current image are: aObj={{axLeft,ayUp},{axRight,ayDown}} Therefore, the position information of the current object can be represented as: aObjCenter={axLeft+axRight / 2,ayDown+ayUp / 2} Similarly, the location information (i.e., reference location information) of the current object in the base image can be obtained: aObj0={{axLeft0,ayUp0},{axRight0,ayDown0}} aObj0Center={axLeft0+axRight0 / 2,ayUp0+ayDown0 / 2} Therefore, by comparing the differences in the horizontal and / or vertical coordinates between aObjCenter and aObj0Center, we can obtain information about their deviation.
[0065] Based on the above embodiments, this application embodiment describes the steps after determining the deviation information between the current image and the base image according to the current location information and the reference location information. Specifically, the method of this embodiment includes the following steps: The deviation information is compared with a preset deviation threshold to obtain a comparison result. In response to the comparison result indicating that the deviation information is greater than the preset deviation threshold, the current lane line in the current image is determined based on the deviation information and the historical lane lines in the base image.
[0066] The preset deviation threshold is used to characterize whether the current pose change of the image acquisition device is too large. If the deviation information is greater than the preset deviation threshold, the current lane line in the current image needs to be determined based on the deviation information and the historical lane lines in the base image, and the lane line needs to be updated. If the deviation information is less than or equal to the preset deviation threshold, the lane line does not need to be re-determined.
[0067] Referring to the foregoing embodiments, the deviation information can be the difference between the horizontal coordinates (horizontal coordinate difference), the difference between the vertical coordinates (vertical coordinate difference), or the sum of the horizontal and vertical coordinate differences (horizontal and vertical coordinate difference), without limitation here. Therefore, there can be one or more preset deviation thresholds, such as a first deviation threshold corresponding to the horizontal coordinate difference, a second deviation threshold corresponding to the vertical coordinate difference, and a third deviation threshold corresponding to the horizontal and vertical coordinate differences. The first, second, and third deviation thresholds can be the same or different, without limitation here.
[0068] For example, if no matching base object is found in the O1 set corresponding to the current acquisition direction, the image acquisition device can be adjusted to the reverse view (other directions) for image acquisition and target detection processing to obtain other objects (other fixed objects) b in other images, whose position information can be: bObj={{bxLeft,byUp},{bxRight,byDown}} bObjCenter={bxLeft+bxRight / 2,byDown+byUp / 2} Similarly, by searching for matching base image objects in the corresponding base image set pic2 or directly in O2, the location information of the matching base image objects can be obtained as follows: bObj0={{bxLeft0,byUp0},{bxRight0,byDown0}} bObj0Center={bxLeft0+bxRight0 / 2,byUp0+byDown0 / 2} Similarly, by comparing the differences in the horizontal and / or vertical coordinates between bObjCenter and bObj0Center, the deviation information can be obtained.
[0069] Based on the above embodiments, this application embodiment describes the steps of determining the current lane line in the current image based on deviation information and historical lane lines in the baseline image. Specifically, the method of this embodiment includes the following steps: Obtain historical feature points from historical lane lines; update the coordinate information of historical feature points based on deviation information to obtain the current feature point; determine the current lane line based on the current feature point.
[0070] Referring to the foregoing embodiments, lane line information is pre-drawn in the base image and the position information of each lane line is recorded, such as: F1 = {f1, f2, ..., fn} Here, F1 represents the set of lane lines drawn on the screen, fn represents the nth lane line, and the specific parameters of each lane line can be: f1=|{x1,y1},{x2,y2},...,{xm,ym}| Here, f1 is the first lane line in F1, which can be evenly divided into m points (feature points). {x1,y1} represents the coordinates of the first feature point in the base image, and {xm,ym} represents the coordinates of the mth regular point in the base image.
[0071] Similarly, based on other directions, the image acquisition device can be adjusted to acquire images in other directions and draw lane lines in other images. For example, the lane lines in other images can be obtained as follows: F2 = {b1, b2, ..., bn} Here, F2 can be a set of lane lines drawn based on the opposite view of F1, and bn represents the nth lane line. The specific parameters are as follows: b1=|{x1,y1},{x2,y2},...,{xm,ym}| Similarly, feature points can be obtained by dividing each lane line. For example, if b1 is the first lane line in F2, the lane line can be evenly divided into m points. {x1,y1} represents the coordinates of the first feature point in other images, and {xm,ym} represents the coordinates of the mth feature point in other images.
[0072] Continuing with the foregoing embodiments, the difference in horizontal coordinates δx and the difference in vertical coordinates δy can be calculated separately. In a detection scenario along the pic1 direction, the coordinates of each lane line after equalization in F1 are updated by superimposing δx on the horizontal coordinates and δy on the vertical coordinates, as follows: F1 = {f1, f2, ..., fn} f1=|{x1+δx,y1+δy},{x2+δx,y2+δy},...,{xm+δx,ym+δy}| After the update process, the updated F1 lane lines (current lane lines) are obtained, and the lane line configuration is redeployed to the currently deployed visual intelligence algorithm solution.
[0073] Furthermore, in the detection scenario of the pic2 direction, the coordinates of each lane line after the lane lines in F2 are evenly divided are updated by superimposing the horizontal coordinate δx and the vertical coordinate δy, as follows: F2 = {f1, f2, ..., fn} f1=|{x1-δx,y1-δy},{x2-δx,y2-δy},...,{xm-δx,ym-δy}| After the update process, the updated F2 lane line (current lane line) is obtained, and the lane line configuration is redeployed to the currently deployed visual intelligence algorithm solution.
[0074] It should be further noted that the execution entity of the lane line determination method can be a lane line determination device. For example, the lane line determination method can be executed by a terminal device, a server, or other processing devices. The terminal device can be a user equipment (UE), computer, mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, etc. In some possible implementations, the lane line determination method can be implemented by a processor calling computer-readable instructions stored in memory.
[0075] Figure 2 This is a block diagram illustrating a lane line determination device according to an exemplary embodiment of this application. Figure 2 As shown, the exemplary lane line determination device 200 includes: a detection module 210, a reference acquisition module 220, a deviation determination module 230, and a lane line determination module 240. Specifically: The detection module 210 is used to perform target detection processing on the acquired current image to obtain the current object in the current image and the current position information of the current object in the current image.
[0076] The reference acquisition module 220 is used to acquire the reference position information of the current object in the base image. The acquisition time of the base image is earlier than the acquisition time of the current image.
[0077] The deviation determination module 230 is used to determine the deviation information between the current image and the base image based on the current position information and the reference position information.
[0078] The lane line determination module 240 determines the current lane line in the current image based on the deviation information and the historical lane lines in the base image.
[0079] In this exemplary lane determination device, target detection processing is performed on the acquired current image to obtain the current object in the current image and its current position information. Then, reference position information of the current object in a database image is obtained. Since the database image was acquired earlier than the current image, it contains pre-recorded reference position information of the current object over historical periods for comparison. The deviation information between the current image and the database image is determined based on the current position information and the reference position information. The database image includes pre-drawn historical lane lines; based on the deviation information and the historical lane lines in the database image, the current lane line in the current image can be determined, thereby achieving accurate and rapid lane line determination. Even in scenarios where the front-end camera is in a frequently changing environment, the accuracy of traffic detection can be stably guaranteed.
[0080] It should be noted that the apparatus and method provided in the above embodiments belong to the same concept, and the specific ways in which each module and unit performs operations have been described in detail in the method embodiments, and will not be repeated here. In practical applications, the apparatus provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the apparatus can be divided into different functional modules to complete all or part of the functions described above, and this is not a limitation.
[0081] The functions of each module can be found in the lane line determination method implementation example, and will not be repeated here.
[0082] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of an embodiment of the electronic device of this application. The electronic device 100 includes a memory 101 and a processor 102. The processor 102 is used to execute program instructions stored in the memory 101 to implement the steps in any of the above-described lane line determination method embodiments. In a specific implementation scenario, the electronic device 100 may include, but is not limited to, a microcomputer or a server. In addition, the electronic device 100 may also include mobile devices such as laptops and tablets, which are not limited here.
[0083] Specifically, processor 102 controls itself and memory 101 to implement the steps in any of the lane line determination method embodiments described above. Processor 102 can also be referred to as a CPU (Central Processing Unit). Processor 102 may be an integrated circuit chip with signal processing capabilities. Processor 102 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 102 can be implemented using integrated circuit chips.
[0084] In this exemplary electronic device, target detection processing is performed on the acquired current image to obtain the current object in the current image and its current position information within the current image. Then, reference position information of the current object in a database image is obtained. Since the database image was acquired earlier than the current image, it contains pre-recorded reference position information of the current object over historical periods for comparison. The deviation information between the current image and the database image is determined based on the current position information and the reference position information. The database image includes pre-drawn historical lane lines; based on the deviation information and the historical lane lines in the database image, the current lane line in the current image can be determined, thereby achieving accurate and rapid lane line information determination. Even in scenarios where the front-end camera is in a frequently changing environment, the accuracy of traffic detection can be stably guaranteed.
[0085] Please see Figure 4 , Figure 4 This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present application. The computer-readable storage medium 110 stores program instructions 111 that can be executed by a processor. The program instructions 111 are used to implement the steps in any of the above-described lane line determination method embodiments.
[0086] In this exemplary storage medium, by running the program instructions within the storage medium, target detection processing is performed on the acquired current image to obtain the current object in the current image and the current position information of the current object in the current image. Then, the reference position information of the current object in the base image is obtained. The base image was acquired earlier than the current image, therefore the base image pre-records the reference position information of the current object in historical time periods for comparison. The deviation information between the current image and the base image is determined based on the current position information and the reference position information. The base image includes pre-drawn historical lane lines. Based on the deviation information and the historical lane lines in the base image, the current lane line in the current image can be determined, thereby achieving accurate and rapid determination of lane line information. Even in scenarios where the front-end camera is in a frequently changing scene, the accuracy of traffic detection can still be stably guaranteed.
[0087] 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.
[0088] 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.
[0089] 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, units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0090] 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. 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 in the 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.
Claims
1. A lane line determination method characterized by, The method comprises: performing target detection processing on the obtained current image to obtain a current object in the current image and current position information of the current object in the current image; obtaining reference position information of the current object in a base image, the acquisition time of the base image being earlier than the acquisition time of the current image; determining deviation information between the current image and the base image according to the current position information and the reference position information; determining a current lane line in the current image according to the deviation information and a historical lane line in the base image.
2. The method of claim 1, wherein, The method further comprises: finding a reference object matching the current object among base objects in the base image; determining historical position information of the reference object in the base image as reference position information of the current object.
3. The method of claim 2, wherein, Before the step of obtaining the reference position information of the current object in the base image, the method further comprises: performing target detection processing on a historical image to obtain a target detection result, the acquisition time of the historical image being earlier than the acquisition time of the current image; in response to the target detection result representing that there is a fixed object in the historical image, determining the historical image as the base image and determining the fixed object in the historical image as the base object.
4. The method of claim 2, wherein, After the step of finding the reference object matching the current object among the base objects in the base image, the method further comprises: in response to there being a reference object matching the current object in each base object, determining historical position information of the reference object in the base image as reference position information of the current object; in response to there being no reference object matching the current object in each base object, performing update processing on the base image.
5. The method of claim 4, wherein, After the step of responding to there being no reference object matching the current object in each base object, the method further comprises: performing target detection processing on other images collected in other collection directions to obtain other objects in the other images, the other collection directions being different from a current collection direction of the current image; obtaining base images corresponding to the other collection directions; finding whether there is a reference object matching the other objects in the base images corresponding to the other collection directions; in response to there being no reference object matching the other objects in each base object, performing update processing on the base image.
6. The method of claim 1, wherein, The method further comprises: obtaining a current coordinate in the current position information and a reference coordinate in the reference position information; determining the deviation information according to a coordinate difference between the current coordinate and the reference coordinate.
7. The method of claim 1, wherein, After the step of determining the deviation information between the current image and the base image according to the current position information and the reference position information, the method further comprises: comparing the deviation information with a preset deviation threshold to obtain a comparison result; In response to the comparison result representing that the deviation information is greater than the preset deviation threshold, a current lane line in the current image is determined according to the deviation information and a historical lane line in the base library image.
8. The method of claim 1, wherein, The determining of the current lane line in the current image according to the deviation information and the historical lane line in the base library image comprises: acquiring a historical feature point in the historical lane line; updating coordinate information of the historical feature point according to the deviation information to obtain a current feature point; determining the current lane line according to the current feature point.
9. An electronic device, comprising: A computer readable storage medium storing program instructions, which when executed by a processor, implement the method of any one of claims 1 to 8.
10. A computer-readable storage medium having stored thereon program instructions, wherein, The program instructions, when executed by the processor, implement the method of any one of claims 1 to 8.