Vehicle line pressing detection method and device, electronic equipment and storage medium
By extracting the vehicle profile and lane line position, combining the distance and distribution characteristics of the wheels and lane line, we can determine whether the vehicle is pressing the line, and solve the problem of vehicle crimping detection accuracy under the influence of noise in the prior art, achieving higher detection accuracy and anti-noise interference capability.
Patent Information
- Application Number
- CN202311303552.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-09
- Publication Date
- 2025-04-11
AI Technical Summary
The existing vehicle line capping detection methods are easily affected by the surrounding environment, resulting in more noise in the segmentation results, which reduces the accuracy of vehicle profile information, and thus affects the accuracy of line capping detection.
By extracting the vehicle profile of the target vehicle in the image to be detected, determining the wheel position based on the vehicle profile, obtaining the lane line position, and combining the distance information and distribution characteristics between the wheel and the lane line, it is determined whether the vehicle is pressing the line.
Effectively reduce noise interference, improve positioning accuracy, improve the accuracy of line cap detection, and filter false alarms and missed reports.
Smart Images

Figure CN119810760A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to a vehicle crossing detection method, device, electronic device and storage medium. Background Art
[0002] With the progress of urbanization and the increase in the number of cars, problems such as urban traffic congestion and traffic accidents are becoming increasingly prominent, and vehicle crossing detection is becoming increasingly important.
[0003] Most of the current vehicle crossing line detection methods use traditional morphological filtering or semantic segmentation methods based on deep learning to extract the vehicle's outer contour. However, these two methods are easily affected by the surrounding environment, resulting in a large number of noise points in the segmentation results, making it difficult to obtain accurate vehicle contour information, resulting in an inability to accurately determine whether the vehicle has crossed the line during the vehicle crossing line detection process, reducing the accuracy of vehicle crossing line detection. Summary of the invention
[0004] According to a first aspect of the present disclosure, a vehicle line crossing detection method is provided, comprising:
[0005] Extracting a vehicle profile of a target vehicle in the image to be detected, and determining a wheel position of the target vehicle based on the vehicle profile;
[0006] Obtaining the lane line position in the image to be detected;
[0007] Determine whether the target vehicle crosses the lane based on the wheel position and the lane line position.
[0008] According to a second aspect of the present disclosure, a vehicle wire crossing detection device is provided, comprising:
[0009] A data acquisition module, used to extract the vehicle contour of the target vehicle in the image to be detected, and determine the wheel position of the target vehicle based on the vehicle contour;
[0010] The data acquisition module is further used to acquire the lane line position in the image to be detected;
[0011] A data processing module is used to determine whether the target vehicle crosses the lane based on the wheel position and the lane line position.
[0012] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0013] processor; and,
[0014] A memory for storing programs;
[0015] The program includes instructions, which, when executed by the processor, cause the processor to perform the method according to the exemplary embodiment of the present disclosure.
[0016] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions are used to cause the computer to execute the method according to the exemplary embodiments of the present disclosure.
[0017] One or more technical solutions provided in the embodiments of the present disclosure first locate the vehicle outline of the target vehicle, and then determine the wheel position based on the vehicle outline. This coarse-to-fine positioning method can effectively reduce noise interference and improve positioning accuracy. Subsequently, the lane line in the image to be detected is extracted and the position information of the lane line is determined, and by analyzing the distance information between the wheel and the lane line, as well as the distribution of the wheels on both sides of the lane line, it is determined whether the target vehicle crosses the line. This cross-line detection method can effectively filter out false alarms and missed alarms caused by noise interference, greatly improving the accuracy of cross-line detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Further details, features and advantages of the present disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0019] Figure 1 A flow chart of a vehicle line crossing detection method according to an exemplary embodiment of the present disclosure is shown;
[0020] Figure 2 A schematic diagram of vehicle outer contour extraction based on a semantic segmentation graph is shown;
[0021] Figure 3 A schematic diagram of lane fitting results is shown;
[0022] Figure 4 A schematic diagram of the vehicle crossing line detection and reminder function is shown;
[0023] Figure 5 A flow chart showing a vehicle line crossing detection method according to an exemplary embodiment of the present disclosure is shown;
[0024] Figure 6 A schematic block diagram of functional modules of a vehicle wire crossing detection device according to an exemplary embodiment of the present disclosure is shown;
[0025] Figure 7 A schematic block diagram of a chip according to an exemplary embodiment of the present disclosure is shown;
[0026] Figure 8 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0027] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0028] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0029] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc. mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0030] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0031] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0032] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0033] As an optional but non-limiting implementation, in response to receiving an active request from the user, the method of sending a prompt message to the user may be, for example, a pop-up window, in which the prompt message may be presented in text. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device. It is understandable that the above notification and the process of obtaining user authorization are only illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0034] Before introducing the embodiments of the present disclosure, the following definitions are given for the relevant terms involved in the embodiments of the present disclosure:
[0035] Vehicle-road cooperative system: Intelligent transportation vehicle-road cooperative system is an intelligent transportation system based on multiple components such as vehicle-mounted terminals, roadside equipment and traffic management center. It can realize information sharing and interaction between vehicles, and improve road safety performance and traffic efficiency.
[0036] Bezier curve (hereinafter referred to as "Bezier curve"): Bezier curve is a mathematical curve used to represent smooth curves. It was originally used for curve design in the automotive industry, and later widely used in computer graphics, font design, animation production and many other fields.
[0037] YOLO (You Only Look Once) is a popular computer vision algorithm for real-time object detection and object recognition. The main feature of YOLO is its ability to detect multiple objects in an image simultaneously in a single forward propagation without having to run the image recognition model multiple times. This makes YOLO very suitable for real-time applications such as real-time video surveillance, self-driving cars, drone visual navigation, etc.
[0038] With the progress of urbanization and the increase in the number of cars, urban traffic congestion and traffic accidents have become increasingly prominent, and vehicle lane crossing detection has become increasingly important. Current vehicle lane crossing detection methods include traditional morphological filtering and semantic segmentation based on deep learning, but both are easily affected by the surrounding environment, resulting in more noise points in the segmentation results, thereby reducing accuracy. In addition, the conventional lane line fitting method ignores the road curve, so the error is large in practical applications, reducing the detection accuracy. In addition, the intersection judgment of the vehicle and the lane line also lacks an accurate and efficient calculation method, which further reduces the detection efficiency and accuracy.
[0039] To solve the above problems, this paper proposes a method for detecting vehicle crossing lanes. By fitting the lane lines based on the Bezier curve model and designing a contour extraction method based on the circular distribution statistics of the neighborhood pixels of the vehicle semantic segmentation, noise interference is greatly reduced. Finally, by integrating the closest distance between the vehicle and the lane line in the pixel domain and the distribution characteristics of the front and rear wheels of the vehicle on both sides of the lane line, a comprehensive judgment is made on whether the vehicle crosses the lane, which greatly improves the accuracy of vehicle crossing lane detection.
[0040] For example, Figure 1 A flow chart of a vehicle line crossing detection method according to an exemplary embodiment of the present disclosure is shown. Figure 1 As shown, the vehicle crossing line detection method of the exemplary embodiment of the present disclosure may include the following steps:
[0041] Step S110: Obtain a semantic segmentation map of the target vehicle.
[0042] Exemplarily, the process of obtaining a semantic segmentation map can be implemented by the following steps:
[0043] First, the RGB raw image of the target vehicle in the road scene is captured by the roadside AI camera. The roadside AI camera is usually installed on traffic lights, light poles or roadside camera devices to capture the traffic conditions on the road in real time.
[0044] Then, the original image can be transmitted to the computer vision system, and the original image can be segmented in real time using deep learning technology. Through image segmentation, each pixel in the original image is assigned a preset semantic information value to distinguish different objects and areas, such as roads, vehicles, pedestrians, traffic signs, etc.
[0045] For example, the YOLO (You Only Look Once) deep network can be used to perform real-time image segmentation on the original image. Among them, YOLO has the following characteristics and corresponding beneficial effects:
[0046] Real-time: Since YOLO is a real-time target detection algorithm that can quickly process images at a high frame rate, it can detect vehicles crossing the line in a timely manner when the vehicle is moving at a high speed.
[0047] Multi-object detection: YOLO can detect multiple objects at the same time, which means it can identify all possible vehicles crossing the line in a single image without multiple processing.
[0048] Multi-category detection: YOLO can detect not only vehicles, but also other categories of targets, such as pedestrians, traffic signs, etc. This helps to assign a preset semantic information value to each pixel in the RGB image to distinguish different objects and areas, such as roads, vehicles, pedestrians, traffic signs, etc.
[0049] Bounding Box Regression: YOLO can generate bounding boxes to accurately locate the position of the vehicle and determine if and where the vehicle crosses the line.
[0050] In summary, using YOLO to segment the original image can detect multiple targets at the same time at a high frame rate. It can not only accurately locate the position and outer contour of the vehicle, but also identify the line violations between different vehicles, reduce false positives and false negatives, and improve the accuracy of image segmentation. In addition, YOLO's multi-category detection and multi-scale detection functions enable it to adapt to different scenes and vehicle sizes, further improving the applicability of image segmentation.
[0051] Step S120: extracting the outer contour of the vehicle and the wheel contact point based on the semantic segmentation map.
[0052] For example, before extracting the vehicle contour information, the semantic segmentation map may be preprocessed, which may include image scaling, denoising, and image enhancement, so as to ensure the image quality and processability of the semantic segmentation map.
[0053] After preprocessing the semantic segmentation map, the outer contour of the vehicle can be extracted by traversing each pixel point in the semantic segmentation map.
[0054] For example, Figure 2 Figure 2 shows a schematic diagram of vehicle contour extraction based on semantic segmentation graph. Figure 2 As shown, an arc detection frame with a radius of R can be constructed with the currently traversed pixel point as the center of the circle, and the distribution of different semantic pixel points on the arc of the arc detection frame can be counted. If there are N0 consecutive pixel points semantically defined as vehicles on the arc segment, and there are N1 consecutive pixel points semantically positioned as non-vehicles on another arc segment, the current pixel point is determined as the contour point of the vehicle. According to the above method, each pixel point in the semantic segmentation map is traversed, all vehicle contour points are found and the corresponding pixel coordinates are recorded. Finally, the outer contour of the vehicle is extracted based on the pixel coordinates of all vehicle contour points.
[0055] When the camera detects vehicle crossing the line within a fixed viewing range, the pixel size of the vehicle will change with the viewing range of the camera. Therefore, in order to obtain reliable results, the values of N0 and N1 should be adjusted according to the actual monitoring range of the camera.
[0056] For example, according to the previous experimental results, N0 can be set to 12 pixels and N1 can be set to 18 pixels to ensure that the outer contour of the vehicle is accurately captured and effective line-crossing detection is achieved.
[0057] Since noise points usually exist in the form of single points or discrete distribution, the pixels around the noise points often cannot meet the continuous statistical characteristics mentioned above. Therefore, the above method effectively suppresses noise interference while extracting the outer contour of the vehicle, solving the problem of many noise points commonly faced by current semantic segmentation technology. At the same time, the above method can more accurately extract the outer contour of the vehicle by considering the continuity of pixel points and the discreteness of background noise points, thereby improving the quality and accuracy of the semantic segmentation results.
[0058] Furthermore, the acquired outer contour of the vehicle may be processed to obtain the wheel contact point.
[0059] Since the previously used arc detection frame traversal method cannot distinguish between the wheel and the bottom area between the two wheels, in order to distinguish these two areas and then determine the wheel contact point, a square detection frame can be used to traverse the outer contour of the vehicle.
[0060] Specifically, the pixel points on the outer contour of the vehicle can be traversed, and a square detection frame with a side length of N2 can be constructed with the current pixel point as the center, and the distribution of different semantic pixel points on the side length of the square detection frame can be counted. If there are continuous but no more than N2 pixel points semantically defined as vehicles above the pixel point, and there are continuous but no more than N2 pixel points semantically defined as road surfaces below, then the pixel point is confirmed to be the wheel contact point. According to the above method, traverse each pixel point in the outer contour of the vehicle, find the wheel contact points corresponding to the four wheels, and record the corresponding pixel coordinates.
[0061] For example, based on the previous experimental results, N2 can be set to 40 pixels to ensure accurate capture of the wheel contact point and achieve effective line pressure detection.
[0062] Based on this, not only can the wheel and the area under the vehicle between the two wheels be effectively distinguished, the wheel contact point is further determined, but the interference of noise points is also successfully removed, thereby improving the accuracy of identifying the wheel contact point.
[0063] Step S130: performing lane fitting according to the original image.
[0064] For example, based on the original image, the lane line can be fitted using a piecewise cubic Bezier curve, so as to accurately capture the shape change of the lane line through the smoothness of the curve. Using the road surface image taken by the roadside camera as prior information helps to more accurately adjust the control points of the Bezier curve to adapt to the actual road conditions.
[0065] Specifically, a preset control point sequence can be used. To construct a Bezier curve, k represents the sequence number of the segmented Bezier curve, i represents the sequence number of the control point in each segmented Bezier curve, i = 0, ... 3. The kth segment Bezier curve can be constructed by the following formula (1):
[0066]
[0067] in, are the four control points of the Bezier curve, and t is the curve parameter.
[0068] Figure 3 A schematic diagram of lane fitting results is shown, Figure 3 As shown in Figure 1, four Bezier curves are used to fit lane lines, each of which has four control points. The first and last control points of each Bezier curve overlap with the first and last control points of the adjacent Bezier curve, which makes the Bezier curve have good smoothness, which means that the transition between curve segments is smooth without sharp bends or discontinuities. This helps to simulate the curvature of the lane line more naturally and improves the accuracy of the fitting. Secondly, the Bezier curve is convex, that is, the curve is always located between its control points. This allows it to fit the original lane line closely without excessive bending, thereby reducing the fitting error. Finally, the Bezier curve passes through the first and last control points, which means that the starting and ending points of the curve are determined in advance, which ensures that the curve is always aligned with the real endpoints of the lane line without deviation. Therefore, the segmented cubic Bezier curve becomes an ideal lane line fitting method, which can effectively approximate the shape of the original lane line and improve the accuracy of lane line detection and tracking.
[0069] Step S140: Calculate the shortest distance between the front wheel of the vehicle and the lane curve.
[0070] For example, the shortest distance between the front wheel of the vehicle and the lane curve can be calculated based on the wheel contact point obtained in step S120 and the lane fitting result obtained in step S130. Based on the above formula (1), a binary search algorithm is used to calculate the shortest distance between a point and a curve. Assume that the front wheel contact point is P w , the specific calculation process may include the following steps:
[0071] Find the nearest curve segment: First, traverse the front wheel contact point P w The distance from the control points of all segmented curves, find the minimum distance d min The corresponding piecewise curve L M (M is d min The corresponding curve number).
[0072] Get LM Control point: Find the nearest curve segment L M After that, you can get L M Control Points and in is the starting point of the curve, and the corresponding pixel coordinates are is the first control point, and the corresponding pixel coordinates are is the second control point, and the corresponding pixel coordinates are is the end point of the curve, and the corresponding pixel coordinates are
[0073] Calculate the shortest distance: Calculate the front wheel contact point P respectively w The closest distance D to the above four control points min , and determine the corresponding control points.
[0074] Binary search: Based on the above calculation, use binary search to find the front wheel contact point P w With the current curve L M The closest distance.
[0075] Through the above method, the shortest distance between the front wheel of the vehicle and the lane curve can be efficiently calculated, providing data support for subsequent lane crossing detection. In addition, the binary search algorithm can reduce the calculation complexity and improve the calculation efficiency while ensuring accuracy.
[0076] Step S150: judging the vehicle's crossing curve situation according to the relative distribution of the vehicle's front wheels on the corresponding segmented curve.
[0077] For example, the relative distribution of the front wheels of the vehicle on the corresponding segmented curve can be calculated based on the position information of the wheel contact point obtained in step S120 and the lane fitting result obtained in step S130. The specific calculation process may include the following steps:
[0078] First, obtain the position information of the front wheels of the vehicle. The position information of the front wheels can be expressed as w (u w ,v w )express.
[0079] Furthermore, it is necessary to And by solving the corresponding cubic equation, we can get the corresponding curve parameter t m .
[0080] Then, by comparing The sign characteristic of the vehicle is used to obtain the relative distribution of the vehicle's front wheels on the corresponding segmented curve. If the sign characteristic result is a positive number, it means that the front wheel is located on the side above the convex hull of the curve. If the sign characteristic result is a negative number, it means that the front wheel is on the other side of the curve. By comprehensively analyzing the judgment results of the two front wheels, it can be determined whether the vehicle crosses the lane. If the two front wheels are located on both sides of the lane curve (i.e., the sign characteristic result of one front wheel is a positive value and the sign characteristic result of the other front wheel is a negative value), it can be confirmed that the corresponding vehicle crosses the lane.
[0081] In the above manner, the relative position of the front wheels on the lane curve can be accurately calculated, and whether the vehicle crosses the line can be effectively determined.
[0082] Considering that the crossing of a line by a vehicle during driving is a continuous process, the present disclosure also proposes a vehicle crossing of a line reminder function, which may specifically include the following steps:
[0083] First, the distribution of the front and rear wheels of the vehicle on the lane curve is calculated. Then, the distance between the wheels and the lane curve is calculated and compared with the preset threshold δ.
[0084] If the front and rear wheels are on the same side of the lane curve and the distance between the wheels and the curve is less than a threshold value δ, this means that the vehicle may be about to cross the lane, and a lane crossing warning may be issued.
[0085] If the front and rear wheels are located on both sides of the lane curve, and the distance between any one of the wheels and the lane curve is less than a threshold value δ, it can be determined that the vehicle has crossed the lane, and a lane crossing warning can be issued.
[0086] For example, the specific value of the threshold δ can be adjusted according to different application scenarios and the actual situation of the vehicle, and can also depend on the determination accuracy required for the line pressing detection. In practical applications, the value of δ can be set to 5-8 pixels from the distance curve.
[0087] Figure 4 The figure shows the schematic diagram of vehicle crossing line detection and reminder function. Figure 4 As shown, during normal driving of the vehicle (i.e., the front and rear wheels of the vehicle are on the same side of the lane curve, and the distance between the wheels and the curve is greater than the threshold δ), no crossing line warning or crossing line warning is issued. When the front and rear wheels of the vehicle are on the same side of the lane curve, but the distance between any one of the wheels and the curve is less than the threshold δ, it is judged that the vehicle may be about to cross the lane, and a crossing line warning can be issued. When the front and rear wheels of the vehicle are respectively on both sides of the lane curve, and the distance between any one of the wheels and the curve is less than the threshold δ, it is judged that the vehicle has crossed the lane, and a crossing line warning can be issued.
[0088] In summary, the judgment process of the vehicle crossing line reminder function can not only provide more real-time crossing line status monitoring, but also flexibly adjust the threshold according to actual conditions to ensure the safe driving and lane keeping of the vehicle.
[0089] One or more technical solutions provided in the exemplary embodiments of the present disclosure provide a method for detecting vehicle crossing the line. First, by constructing arc and square detection frames and counting the number information of different semantic pixels in the side length, the outer contour of the vehicle and the wheel contact point can be accurately extracted. This extraction method based on the distribution characteristics of semantic pixels has higher accuracy and exhibits strong anti-interference ability to environmental noise in the image. This method regards all backgrounds in the image except the vehicle as potential interference noise, and by comparing the statistical distribution characteristics of the semantic pixels around the current pixel with the distribution characteristics of the neighborhood pixels of the corresponding contour point, it can accurately estimate whether the current pixel belongs to the outer contour point of the vehicle and the wheel contact point.
[0090] Furthermore, a piecewise cubic Bezier curve is used to fit the lane line, so that the fitted curve has excellent approximation characteristics. The lane line information in the original road image is used as prior information to accurately control the segmentation of the spline curve to obtain an accurate approximation of the original lane line shape.
[0091] Finally, the shortest distance between the wheel contact point and the fitted lane line is estimated by analytical method, and the relative position relationship between the wheel and the lane line is determined by calculating the sign characteristics of the difference between the wheel contact point and the lane curve. By analyzing the relative position relationship between different wheels and lane lines, it is possible to determine whether the vehicle crosses the lane. This method can not only realize vehicle cross-lane warning, but also improve the accuracy of cross-lane detection. Since the curve parameters of the Bezier curve are based on the solution of the cubic equation, it has a highly accurate analytical solution form, thereby obtaining more accurate cross-lane detection results and higher cross-lane judgment accuracy. In addition, since the distance information between the wheel and the lane line and the distribution characteristics of the wheels on both sides of the lane line are integrated, false alarms and missed reports caused by noise interference can be effectively filtered out.
[0092] Therefore, the vehicle lane crossing detection method provided in the exemplary embodiment of the present disclosure can show strong anti-interference ability to noise points in the image, and can accurately fit lane lines with different curvatures, thereby improving the accuracy and precision of the lane crossing detection results.
[0093] Based on the above embodiments, the present disclosure also provides a vehicle line crossing detection method, Figure 5 The schematic diagram of the vehicle line crossing detection method according to the exemplary embodiment of the present disclosure is shown as follows: Figure 5 As shown, the method may include the following steps:
[0094] Step S510: extracting the vehicle contour of the target vehicle in the image to be detected, and determining the wheel position of the target vehicle based on the vehicle contour.
[0095] Exemplarily, extracting the vehicle profile of the target vehicle from the image to be detected and determining the wheel position may include the following steps:
[0096] First, the image to be detected can be preprocessed, including image denoising, image resizing, brightness and contrast enhancement, etc., to improve the accuracy of subsequent vehicle contour detection.
[0097] Then, an object detection algorithm, such as YOLO, can be used to identify the target vehicle in the image to be detected and generate a bounding box or bounding box to locate the approximate position of the target vehicle.
[0098] In order to extract the vehicle contour more accurately, a semantic segmentation or instance segmentation model can be used for image segmentation to generate a semantic segmentation image with a binary mask, in which the pixel value of the target vehicle can be set to 1 and the background pixel value can be set to 0, thereby achieving the purpose of separating the target vehicle from the background.
[0099] Furthermore, edge detection or contour extraction operations may be performed on the segmented image to obtain the vehicle contour of the target vehicle.
[0100] Finally, based on the extracted vehicle profile, the geometric features of the vehicle profile, such as the center of mass, the lowest point, or the center position of the wheel, can be calculated, thereby determining the wheel position on the vehicle profile.
[0101] Step S520: Acquire the lane line position in the image to be detected.
[0102] In an embodiment, a deep learning model may be used to perform lane line segmentation, separate the lane line from the image to be detected, and then determine its position in the image to be detected. The deep learning model may include a convolutional neural network (CNN), a semantic segmentation model, an instance segmentation model (YOLO), and an attention mechanism model.
[0103] In an embodiment, lane lines can be extracted based on color and texture features. Since the color of lane lines is fixed to white or yellow and has special texture features, the lane lines in the image to be detected can be extracted based on color and texture features, and then their positions in the image to be detected can be determined.
[0104] Step S530: Determine whether the target vehicle crosses the lane based on the wheel position and the lane line position.
[0105] In an embodiment, the distance between the wheel and the lane line can be measured based on the wheel position and the lane line position, and when the distance is less than a preset threshold, it is determined that the target vehicle crosses the lane. The preset threshold can be determined according to the actual detection accuracy, for example, the preset threshold can be set to 5-8 pixels in length.
[0106] In an embodiment, the relative position relationship between the wheel and the lane line can be analyzed based on the wheel position and the lane line position. When the wheels are located on both sides of the lane line or one wheel is located on the lane line, it is determined that the target vehicle is crossing the lane line.
[0107] One or more technical solutions provided in the embodiments of the present disclosure first locate the vehicle outline of the target vehicle, and then determine the wheel position based on the vehicle outline. This coarse-to-fine positioning method can effectively reduce noise interference and improve positioning accuracy. Subsequently, the lane line in the image to be detected is extracted and the position information of the lane line is determined, and by analyzing the distance information between the wheel and the lane line, as well as the distribution of the wheels on both sides of the lane line, it is determined whether the target vehicle crosses the line. This cross-line detection method can effectively filter out false alarms and missed alarms caused by noise interference, greatly improving the accuracy of cross-line detection.
[0108] Based on the above embodiment, in another embodiment provided by the present disclosure, the above step S510 may include the following steps:
[0109] Step S511: semantically segment the image to be detected to obtain a semantic segmentation map.
[0110] In an embodiment, the image to be detected may be an RGB original image of a target vehicle in a road scene captured by a roadside AI camera. The obtained image to be detected may be transmitted to a computer vision system and semantic segmentation may be performed using deep learning technology. Through semantic segmentation, a preset semantic information value is assigned to each pixel in the image to be detected to distinguish different objects and areas, such as roads, target vehicles, pedestrians, traffic signs, etc.
[0111] Step S512: extracting the vehicle contour of the target vehicle based on the semantic segmentation map.
[0112] In an embodiment, the vehicle contour of the target vehicle may be extracted using the semantic information value corresponding to each pixel point in the semantic segmentation map.
[0113] Specifically, each pixel in the semantic segmentation map can be traversed to find the pixel whose pixel semantic information value is the target vehicle. The pixel semantic information value can be assigned to each pixel in the semantic segmentation process. After determining that all pixel semantic information values are the pixel of the target vehicle, the pixel corresponding to the vehicle contour of the target vehicle can be obtained by using image processing techniques such as edge detection or connectivity analysis. Finally, the corresponding pixel points are connected to construct a complete vehicle contour.
[0114] In practical applications, the vehicle contour can also be smoothed to reduce noise or irregular edges to obtain more accurate contour information.
[0115] Based on this, the above-mentioned vehicle contour extraction method is to use the information in the semantic segmentation map to determine the pixel points of the target vehicle, and then extract the vehicle contour through image processing technology to provide accurate vehicle contour information for subsequent vehicle line crossing detection tasks.
[0116] Based on the above embodiment, in another embodiment provided by the present disclosure, the above step S510 may further include the following steps:
[0117] Step S513: Obtain distribution information of pixel points in the vehicle outline.
[0118] In an embodiment, a pixel point in the vehicle outline can be used as the center, and a sliding window can be used to scan the pixels near the vehicle outline pixel point, and the number and distribution information of different semantic pixels can be counted. The semantic value of the pixel point can be assigned to each pixel point in the semantic segmentation process, thereby dividing different objects and areas, such as roads, target vehicles, pedestrians, traffic signs, etc.
[0119] Step S514: Determine the position of the wheel contact point of the target vehicle based on the distribution information, and use the position of the wheel contact point as the wheel position of the target vehicle.
[0120] In an embodiment, the number and distribution information of different semantic pixels near the vehicle outline pixel point can be analyzed to determine the wheel contact point of the target vehicle. For example, when there are only pixels with semantic information values of the target vehicle and pixels with semantic information values of the ground near the vehicle outline pixel point, it indicates that the vehicle outline pixel point may be the wheel contact point. The position of the wheel contact point can be represented by the pixel coordinates of the vehicle outline pixel point. In order to facilitate the subsequent vehicle line crossing detection task, the position of the wheel contact point can be used as the parking space position of the target vehicle.
[0121] Based on this, by analyzing the number and distribution information of different semantic pixels on the vehicle contour, the position of the wheel contact point of the target vehicle is accurately determined, thereby accurately extracting the position of the wheel. This wheel position extraction method not only improves the accuracy of wheel position extraction, but also improves the ability to resist noise interference during the wheel position extraction process.
[0122] Based on the above embodiment, in another embodiment provided by the present disclosure, the above step S512 may include:
[0123] Traverse the pixels in the semantic segmentation map.
[0124] Taking any pixel point in the semantic segmentation map as the center point, the distribution of pixels within the target range is obtained; wherein the distribution includes the pixel points of the target vehicle and the pixel points of the non-target vehicle in the semantic segmentation map.
[0125] A vehicle profile of the target vehicle is determined based on the distribution.
[0126] In an embodiment, any pixel point in the semantic segmentation map can be used as the center point to construct a target range. The number information and distribution of pixel points corresponding to different semantics in the target range are counted. The pixel points corresponding to the vehicle contour of the target vehicle are determined by the number information and distribution of pixel points corresponding to different semantics. All pixel points in the semantic segmentation map are traversed to determine the pixel points corresponding to all vehicle contours and the pixel coordinates of the corresponding pixel points. Finally, all pixel points are connected to extract the vehicle contour of the target vehicle. Among them, the pixel points corresponding to different semantics may include: pixel points corresponding to the target vehicle, and pixel points corresponding to non-target vehicles.
[0127] For example, a circular arc detection frame with a radius of R can be constructed with the currently traversed pixel point as the center, and the distribution of different semantic pixels on the circular arc of the circular arc detection frame is counted. In this embodiment, the circular arc on the circular arc detection frame is the target range.
[0128] For example, if there are N0 consecutive pixel points semantically defined as target vehicles on the arc segment, and there are N1 consecutive pixel points semantically positioned as non-target vehicles on another arc segment, the current pixel point is determined as the pixel point corresponding to the vehicle contour. According to the above method, each pixel point in the semantic segmentation map is traversed to find all the pixel points corresponding to the vehicle contour and record the corresponding pixel coordinates. Finally, the outer contour of the vehicle is extracted according to the pixel coordinates of all the vehicle contour pixels.
[0129] In practical applications, when the camera detects vehicles crossing the line within a fixed viewing range, the pixel size of the target vehicle will change with the viewing range of the camera. Therefore, in order to obtain reliable results, the values of N0 and N1 should be adjusted according to the actual monitoring range of the camera.
[0130] For example, according to the previous experimental results, N0 can be set to 12 pixels and N1 can be set to 18 pixels to ensure that the vehicle contour of the target vehicle is accurately captured and effective line-crossing detection is achieved.
[0131] Since noise points usually exist in the form of single points or discrete distribution, the pixels around the noise points often cannot meet the continuous statistical characteristics mentioned above. Therefore, the above method effectively suppresses noise interference while extracting the vehicle contour, solving the problem of many noise points commonly faced by current semantic segmentation technology. At the same time, the above method can more accurately extract the vehicle contour by considering the continuity of pixel points and the discreteness of background noise points, thereby improving the quality and accuracy of the semantic segmentation results.
[0132] Based on the above embodiment, in another embodiment provided by the present disclosure, the above step S514 may include:
[0133] Traverse the pixels on the vehicle outline.
[0134] Taking any target pixel point on the vehicle outline as the center, the number of pixel points corresponding to the target pixel point in the first preset direction and the second preset direction are obtained respectively.
[0135] The pixel points corresponding to the wheel contact points on the vehicle contour are determined based on the number of pixel points corresponding to the first preset direction and the second preset direction, and the position of the wheel contact point of the target vehicle is determined based on the position of the pixel points corresponding to the wheel contact points.
[0136] In an embodiment, the target pixel points on the acquired outer contour of the vehicle may be traversed to obtain the wheel contact points.
[0137] Specifically, taking any target pixel point on the vehicle contour as the center, the number information of pixel points corresponding to different semantics is obtained in two preset directions respectively. By analyzing the number information of pixel points corresponding to different semantics in the two preset directions, the target pixel point corresponding to the wheel contact point on the vehicle contour is determined, and then the position of the target pixel point is determined, and the position of the target pixel point is determined as the position of the wheel contact point of the target vehicle. Among them, the pixel points corresponding to different semantics may include: pixel points corresponding to the target vehicle, and pixel points corresponding to the non-target vehicle.
[0138] Exemplarily, the currently traversed target pixel point can be used as the center point to construct a square detection frame with a side length of N2, and the distribution of different semantic pixel points corresponding to the first preset direction and the second preset direction on the square detection frame can be counted respectively. In this embodiment, the first preset direction can be set as the top of the target pixel point, and the second preset direction can be set as the bottom of the target pixel point. If there are continuous but no more than N2 pixel points semantically defined as the target vehicle above the target pixel point, and there are continuous but no more than N2 pixel points semantically defined as the road surface below, then the target pixel point is confirmed to be the wheel contact point. At the same time, the pixel coordinates of the target pixel point are recorded, and the pixel coordinates of the target pixel point are determined as the position information of the wheel contact point.
[0139] For example, based on the previous experimental results, N2 can be set to 40 pixels to ensure accurate capture of the wheel contact point and achieve effective line pressure detection.
[0140] According to the above method, each target pixel point in the outer contour of the vehicle is traversed to find the wheel contact points corresponding to all wheels in the target vehicle, and the corresponding pixel coordinates are recorded.
[0141] Based on this, the distribution characteristics of pixel points are used to locate the wheel contact point, which has a strong anti-noise interference ability and can effectively filter out the noise points in the image, thereby improving the accuracy of wheel contact point positioning.
[0142] Based on the above embodiment, in another embodiment provided by the present disclosure, the above step S520 may include the following steps:
[0143] Step S521: multiple control points are set on the lane line, wherein the multiple control points divide the lane line into multiple line segments.
[0144] In an embodiment, a plurality of control points may be set for the lane line in the image to be detected, wherein each control point carries lane line information, such as curvature or direction change. The number of control points may be determined by the specific length of the lane line to ensure sufficiently fine modeling of the lane line. The role of these control points is not only to segment the lane line, but also to establish a smooth transition between different line segments to maintain the overall continuity and accuracy of the lane line.
[0145] For example, the control points can be represented as a preset control point sequence Where k represents the serial number of the line segment, i represents the serial number of the control point in each line segment, i=0,…3.
[0146] Exemplarily, a line segment may include a straight line and a curve, wherein a straight line may be determined using two control points, and a curve may be determined using more than two control points.
[0147] Step S522: performing lane line fitting processing according to multiple control points and controlling multiple line segments to obtain a lane line fitting curve.
[0148] In the embodiment, the lane line can be segmented and fitted according to the position information corresponding to the multiple control points, and finally the fitting curve of the entire lane line is obtained. During the fitting process, if the fitting result is not good, the curvature or shape of the corresponding line segment can be modified by adjusting the position of the control point, so that the line segment fitting result can better approximate the shape of the actual lane line. This method can accurately extract the curve characteristics of the lane line, especially when dealing with curved roads or complex road structures, and has important application value.
[0149] Exemplarily, the line segment may be a Bezier curve. Specifically, based on the image to be detected, a piecewise cubic Bezier curve may be used to fit the lane line, thereby accurately capturing the shape change of the lane line through the smoothness of the curve. Using the image to be detected taken by the roadside camera as prior information helps to more accurately adjust the control points of the Bezier curve to adapt to the actual road conditions.
[0150] For example, a Bezier curve can be constructed using the above formula (1).
[0151] Step S523: Determine the lane line position based on the position of the lane line fitting curve.
[0152] For example, the position of the lane line can be determined according to the position of the control point on the lane line fitting curve. Since each control point carries lane line information, such as curvature or inflection point position, etc., the position of the lane line can be determined by analyzing the position of the key control point on the lane line fitting curve.
[0153] For example, the position of the lane line can be determined according to the position of the lane line fitting curve. For example, in this embodiment, a segmented Bezier curve is used to fit the lane line, and the position information of the lane line can be obtained by calculating the equation of the Bezier curve model. The equation of the Bezier curve model can be expressed by the above formula (1).
[0154] Exemplarily, specific feature points, such as center line points and edge points of the lane line fitting curve, may be extracted from the lane line fitting curve, and then the position of the lane line may be determined based on the position of the feature points.
[0155] Based on this, the position of the lane line is determined according to the position of the control point or feature point on the lane line fitting curve, and the specific position of the lane line in the image to be detected can be inferred, including the center line position of the lane line and the width of the lane line. This information provides very important data support for subsequent vehicle line crossing detection. In addition, the position of the lane line is determined using the curve model equation of the lane line fitting curve, and the curvature or slope of the curve can be calculated to obtain information about the curvature and inclination direction of the lane line. This can more accurately describe the shape and position of the lane line, thereby providing a more accurate lane line fitting result.
[0156] In summary, this segmented lane extraction method helps to accurately describe the shape and position information of the lane, thereby improving the accuracy and reliability of lane detection and tracking. In addition, since each line segment can be analyzed and processed separately, using multiple line segments to describe lanes can also better handle complex situations such as curves, turns and intersections on the road, thereby improving the robustness of the lane fitting method.
[0157] Based on the above embodiment, in another embodiment provided by the present disclosure, the above step S530 may include the following steps:
[0158] Step S531: Based on the positions of the contact points of the multiple wheels and the positions of the lane lines, determine the relative position information of the multiple wheels and the lane lines.
[0159] In the embodiment, the positions of the multiple wheel contact points can be represented by the pixel coordinates P of the corresponding pixel points. w (u w ,v w ) indicates that the lane line position can be represented by the pixel coordinates of the control points on the lane line fitting curve. Based on the pixel coordinates corresponding to the contact points of multiple wheels and the pixel coordinates of the control points on the lane line fitting curve, the relative position information of multiple wheels and the lane line is obtained.
[0160] Specifically, first calculate the shortest distance between the front wheel of the vehicle and the lane curve. Based on the above formula (1), a binary search algorithm is used to calculate the shortest distance between a point and a curve. Assume that the front wheel contact point is P w , the specific calculation process may include the following steps:
[0161] Find the nearest curve segment: First, traverse the front wheel contact point P w The distance from the control points of all segmented curves, find the minimum distance d min The corresponding piecewise curve L M (M is d min The corresponding curve number).
[0162] Get L M Control point: Find the nearest curve segment L M After that, you can get L M Control Points and in is the starting point of the curve, and the corresponding pixel coordinates are is the first control point, and the corresponding pixel coordinates are is the second control point, and the corresponding pixel coordinates are is the end point of the curve, and the corresponding pixel coordinates are
[0163] Calculate the shortest distance: Calculate the front wheel contact point P respectively w The closest distance D to the above four control points min , and determine the corresponding control points.
[0164] Binary search: Based on the above calculation, use binary search to find the front wheel contact point P w With the current curve L M The closest distance.
[0165] Through the above method, the shortest distance between the front wheel of the vehicle and the lane curve can be efficiently calculated. After obtaining the shortest distance, the relative distribution of the front wheel of the vehicle in the corresponding segmented curve can be calculated. The specific calculation process may include the following steps:
[0166] First, obtain the position information of the front wheels of the vehicle. The position information of the front wheels can be expressed as w (u w ,v w )express.
[0167] Furthermore, it is necessary to And by solving the corresponding cubic equation, we can get the corresponding curve parameter t m .
[0168] Then, by comparing The sign characteristic of is used to obtain the relative distribution of the front wheels of the vehicle on the corresponding segmented curve. If the sign characteristic result is a positive number, it means that the front wheel is on the side above the convex hull of the curve. If the sign characteristic result is a negative number, it means that the front wheel is on the other side of the curve.
[0169] Step S532: When multiple wheels are located on both sides of the lane line, determine whether the target vehicle is crossing the lane line.
[0170] In the embodiment, according to the sign characteristic calculation result of the above step S531, by comprehensively analyzing the sign characteristic results of the two front wheels, it can be determined whether the vehicle crosses the lane. If the two front wheels are located on both sides of the lane curve (i.e., the sign characteristic result of one front wheel is a positive value and the sign characteristic result of the other front wheel is a negative value), it can be confirmed that the corresponding vehicle crosses the lane.
[0171] In the above manner, the relative position of the front wheels on the lane curve can be accurately calculated, and whether the vehicle crosses the line can be effectively determined.
[0172] Considering that the crossing of a line by a vehicle during driving is a continuous process, the present disclosure also proposes a vehicle crossing of a line reminder function, which may specifically include the following steps:
[0173] First, the distribution of the front and rear wheels of the vehicle on the lane curve is calculated. Then, the distance between the wheels and the lane curve is calculated and compared with the preset threshold δ.
[0174] If the front and rear wheels are on the same side of the lane curve and the distance between the wheels and the curve is less than a threshold value δ, this means that the vehicle may be about to cross the lane, and a lane crossing warning may be issued.
[0175] If the front and rear wheels are located on both sides of the lane curve, and the distance between any one of the wheels and the lane curve is less than a threshold value δ, it can be determined that the vehicle has crossed the lane, and a lane crossing warning can be issued.
[0176] For example, the specific value of the threshold δ can be adjusted according to different application scenarios and the actual situation of the vehicle, and can also depend on the determination accuracy required for the line pressing detection. In practical applications, the value of δ can be set to 5-8 pixels from the distance curve.
[0177] The judgment process of the vehicle crossing the line reminder function can not only provide more real-time crossing the line status monitoring, but also flexibly adjust the threshold according to actual conditions to ensure the safe driving and lane keeping of the vehicle.
[0178] One or more technical solutions provided in the exemplary embodiments of the present disclosure provide a method for detecting vehicle crossing the line. First, by constructing arc and square detection frames and counting the number information of different semantic pixels in the side length, the outer contour of the vehicle and the wheel contact point can be accurately extracted. This extraction method based on the distribution characteristics of semantic pixels has higher accuracy and exhibits strong anti-interference ability to environmental noise in the image. This method regards all backgrounds in the image except the vehicle as potential interference noise, and by comparing the statistical distribution characteristics of the semantic pixels around the current pixel with the distribution characteristics of the neighborhood pixels of the corresponding contour point, it can accurately estimate whether the current pixel belongs to the outer contour point of the vehicle and the wheel contact point.
[0179] Furthermore, a piecewise cubic Bezier curve is used to fit the lane line, so that the fitted curve has excellent approximation characteristics. The lane line information in the original road image is used as prior information to accurately control the segmentation of the spline curve to obtain an accurate approximation of the original lane line shape.
[0180] Finally, the shortest distance between the wheel contact point and the fitted lane line is estimated by analytical method, and the relative position relationship between the wheel and the lane line is determined by calculating the sign characteristics of the difference between the wheel contact point and the lane curve. By analyzing the relative position relationship between different wheels and lane lines, it is possible to determine whether the vehicle crosses the lane. This method can not only realize vehicle cross-lane warning, but also improve the accuracy of cross-lane detection. Since the curve parameters of the Bezier curve are based on the solution of the cubic equation, it has a highly accurate analytical solution form, thereby obtaining more accurate cross-lane detection results and higher cross-lane judgment accuracy. In addition, since the distance information between the wheel and the lane line and the distribution characteristics of the wheels on both sides of the lane line are integrated, false alarms and missed reports caused by noise interference can be effectively filtered out.
[0181] Therefore, the vehicle lane crossing detection method provided in the exemplary embodiment of the present disclosure can show strong anti-interference ability to noise points in the image, and can accurately fit lane lines with different curvatures, thereby improving the accuracy and precision of the lane crossing detection results.
[0182] The above mainly introduces the solution provided by the embodiment of the present disclosure from the perspective of the method. It can be understood that in order to achieve the above functions, the device corresponding to the method of the exemplary embodiment of the present disclosure includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present disclosure.
[0183] The embodiments of the present disclosure may divide the server into functional units according to the above method examples. For example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The above integrated modules may be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiments of the present disclosure is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0184] In the case of dividing each functional module according to each function, an exemplary embodiment of the present disclosure provides a vehicle crossing line detection device, which may be a server or a chip applied to a server. Figure 6 FIG. 1 shows a schematic block diagram of functional modules of a vehicle wire crossing detection device according to an exemplary embodiment of the present disclosure. Figure 6 As shown, the vehicle wire crossing detection device 600 includes:
[0185] The data acquisition module 610 is used to extract the vehicle contour of the target vehicle in the image to be detected, and determine the wheel position of the target vehicle based on the vehicle contour.
[0186] The data acquisition module 610 is further used to acquire the position of the lane line in the image to be detected.
[0187] The data processing module 620 is used to determine whether the target vehicle crosses the lane based on the wheel position and the lane line position.
[0188] In another embodiment provided by the present disclosure, the data acquisition module 610 is further used to perform semantic segmentation on the image to be detected to obtain a semantic segmentation map; and extract the vehicle contour of the target vehicle based on the semantic segmentation map.
[0189] In another embodiment provided in the present disclosure, the data acquisition module 610 is also used to obtain distribution information of pixel points in the vehicle contour; determine the position of the wheel contact point of the target vehicle based on the distribution information, and use the position of the wheel contact point as the wheel position of the target vehicle.
[0190] In another embodiment provided by the present disclosure, the data acquisition module 610 is also used to traverse the pixel points in the semantic segmentation map; taking any pixel point in the semantic segmentation map as the center point, obtain the distribution of pixel points within the target range; wherein the distribution includes pixel points of the target vehicle and pixel points of non-target vehicles in the semantic segmentation map; and determine the vehicle contour of the target vehicle based on the distribution.
[0191] In another embodiment provided in the present disclosure, the data acquisition module 610 is also used to traverse the pixel points on the vehicle contour; with any target pixel point on the vehicle contour as the center, obtain the number of pixel points corresponding to the target pixel point in the first preset direction and the second preset direction respectively; determine the pixel point corresponding to the wheel contact point on the vehicle contour based on the number of pixel points, and determine the position of the wheel contact point of the target vehicle based on the position of the pixel point corresponding to the wheel contact point.
[0192] In another embodiment provided by the present disclosure, the data acquisition module 610 is also used to set multiple control points on the lane line; the multiple control points divide the lane line into multiple line segments; the multiple control points control the multiple line segments to perform fitting processing on the lane line to obtain a lane line fitting curve; and the lane line position is determined based on the position of the lane line fitting curve.
[0193] In another embodiment provided by the present disclosure, the data processing module 620 is further used to determine the relative position information of multiple wheels and the lane line based on the positions of multiple wheel contact points and the position of the lane line fitting curve; and to determine that the target vehicle is crossing the lane line when the multiple wheels are respectively located on both sides of the lane line.
[0194] Figure 7 Schematic block diagram of a chip according to an exemplary embodiment of the present disclosure is shown. Figure 7 As shown, the chip 700 includes one or more (including two) processors 701 and a communication interface 702. The communication interface 702 can support the server to execute the data sending and receiving steps in the above method, and the processor 701 can support the server to execute the data processing steps in the above method.
[0195] Optional, such as Figure 7 As shown, the chip 700 also includes a memory 703, which may include a read-only memory and a random access memory, and provides operation instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory (NVRAM).
[0196] In some embodiments, Figure 7 As shown, the processor 701 performs corresponding operations by calling the operation instructions stored in the memory (the operation instructions may be stored in the operating system). The processor 701 controls the processing operations of any one of the terminal devices, and the processor may also be called a central processing unit (CPU). The memory 703 may include a read-only memory and a random access memory, and provides instructions and data to the processor. A portion of the memory 703 may also include NVRAM. For example, in an application, the memory, the communication interface, and the memory are coupled together through a bus system, wherein the bus system may include a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, in Figure 7 Various buses are labeled as bus system 704 .
[0197] The method disclosed in the above embodiment of the present invention can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, a digital signal processor (digital signal processing, DSP), an ASIC, a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0198] The exemplary embodiment of the present disclosure also provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program that can be executed by the at least one processor, and the computer program is used to cause the electronic device to perform the method according to the embodiment of the present disclosure when executed by the at least one processor.
[0199] The exemplary embodiments of the present disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to perform the method according to the embodiments of the present disclosure.
[0200] The exemplary embodiments of the present disclosure further provide a computer program product, including a computer program, wherein when the computer program is executed by a processor of a computer, the computer is used to enable the computer to perform the method according to the embodiments of the present disclosure.
[0201] refer to Figure 8, a block diagram of an electronic device 800 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0202] like Figure 8 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0203] A plurality of components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, an output unit 807, a storage unit 808, and a communication unit 809. The input unit 806 may be any type of device capable of inputting information to the electronic device 800, and the input unit 806 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 807 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 808 may include, but is not limited to, a disk, an optical disk. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0204] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (PU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above. Each of the methods described above may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via the ROM 802 and / or the communication unit 809.
[0205] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0206] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0207] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0208] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0209] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0210] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
[0211] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the embodiment of the present disclosure is executed in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a terminal, a user device or other programmable device. The computer program or instruction may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instruction may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, for example, a floppy disk, a hard disk, a tape; it may also be an optical medium, for example, a digital video disc (DVD); it may also be a semiconductor medium, for example, a solid state drive (SSD).
[0212] Although the present disclosure has been described in conjunction with specific features and embodiments thereof, it is apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the present disclosure. Accordingly, this specification and the drawings are merely exemplary illustrations of the present disclosure as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present disclosure. Obviously, those skilled in the art may make various modifications and variations to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is also intended to include these modifications and variations.
Claims
1. A vehicle line crossing detection method, characterized in that: The method comprises: Extracting a vehicle profile of a target vehicle in the image to be detected, and determining a wheel position of the target vehicle based on the vehicle profile; Obtaining the lane line position in the image to be detected; Determine whether the target vehicle crosses the lane based on the wheel position and the lane line position.
2. The method according to claim 1, characterized in that The step of extracting a vehicle contour of a target vehicle in an image to be detected comprises: Performing semantic segmentation on the image to be detected to obtain a semantic segmentation map; A vehicle contour of the target vehicle is extracted based on the semantic segmentation map.
3. The method according to claim 1, characterized in that The determining the wheel position of the target vehicle based on the vehicle profile comprises: Obtaining distribution information of pixel points in the vehicle outline; The position of the wheel contact point of the target vehicle is determined based on the distribution information, and the position of the wheel contact point is used as the wheel position of the target vehicle.
4. The method according to claim 2, characterized in that: The extracting the vehicle contour of the target vehicle based on the semantic segmentation map includes: Traversing the pixel points in the semantic segmentation map; Taking any pixel point in the semantic segmentation map as the center point, obtaining the distribution of the pixel points within the target range; wherein the distribution includes the pixel points of the target vehicle and the pixel points of the non-target vehicle in the semantic segmentation map; A vehicle profile of the target vehicle is determined based on the distribution.
5. The method according to claim 3, characterized in that: The step of determining the position of the wheel contact point of the target vehicle based on the distribution information comprises: Traversing the pixel points on the vehicle outline; Taking any target pixel point on the vehicle outline as the center, respectively obtaining the number of pixel points corresponding to the target pixel point in the first preset direction and the second preset direction; Based on the number of corresponding pixels in the first preset direction and the second preset direction respectively, the pixel points corresponding to the wheel contact points on the vehicle contour are determined, and the position of the wheel contact points of the target vehicle is determined based on the positions of the pixel points corresponding to the wheel contact points.
6. The method according to claim 1, characterized in that The obtaining the lane line position in the image to be detected includes: A plurality of control points are set on the lane line; the plurality of control points divide the lane line into a plurality of line segments; Controlling the multiple line segments according to the multiple control points to perform a lane line fitting process to obtain a lane line fitting curve; The lane line position is determined based on the position of the lane line fitting curve.
7. The method according to claim 5 or 6, characterized in that: The determining whether the target vehicle crosses the lane based on the wheel position and the lane line position includes: Determining relative position information of the plurality of wheels and the lane line based on the positions of the plurality of wheel contact points and the lane line position; When the multiple wheels are respectively located on both sides of the lane line, it is determined that the target vehicle crosses the lane.
8. A vehicle wire crossing detection device, characterized in that: include: A data acquisition module, used to extract the vehicle contour of the target vehicle in the image to be detected, and determine the wheel position of the target vehicle based on the vehicle contour; The data acquisition module is further used to acquire the lane line position in the image to be detected; A data processing module is used to determine whether the target vehicle crosses the lane based on the wheel position and the lane line position.
9. An electronic device, characterized in that: include: processor; as well as, A memory for storing programs; The program includes instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, characterized in that The non-transitory computer-readable storage medium stores computer instructions for causing the computer to execute the method according to any one of claims 1-7.
Citation Information
Cited By
Lane line information determination method and device, medium, program product and vehicle
CN120198880A
Lane information determination methods, equipment, media, program products and vehicles
CN120198880B