A lane departure warning method for a simulated robot Android platform
By implementing a five-step lane departure warning method on the Android platform, combining gradient direction and line detection, the problem of resource requirements and poor results of lane departure warning system on the Android platform on the rearview mirror is solved, and the road without markings is realized Stabilized lane line detection and early warning in situations of limited resources.
Patent Information
- Application Number
- CN201910711496.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-02
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2039-08-02
AI Technical Summary
The existing lane departure warning system has strict resource requirements and poor results on the Android platform with rearview mirrors. It is difficult to process distorted images when angle changes, and its application range is limited, so it cannot be effectively applied to unmarked roads.
A lane departure warning method for the Android platform of simulation robot is adopted. Through five steps: initialization parameter list, lane line detection based on gradient direction, update parameter list, lane line detection based on line scanning lines and deviation warning method, combined with simulated lane Line detection and filtering modules provide stable lane line detection and early warning.
Achieve a good lane departure warning effect on the vehicle rearview mirror. It is suitable for unmanned autonomous driving and safe assisted driving. It is suitable for equipment with sensitive CPU occupancy or uncertain installation location. It can be blocked or partially damaged on the road. Provide stable detection information in the case.
Smart Images

Figure CN110633492B_ABST
Abstract
Description
Technical field:
[0001] The invention relates to a lane departure warning method for a simulation robot Android platform. Background technology:
[0002] Lane Departure Warning System (LDWS) is an important component of the vehicle's assisted driving system, which provides timely reminders to the driver to prevent lane departure accidents caused by driver negligence.
[0003] According to the installation method of the sensor, it can be divided into a top-view system and a front-view system.
[0004] Among the bird's-eye view systems, the most representative one is the AURORA system; the system consists of a color camera with a wide-angle lens, a digitizer, and a portable workstation. After the system performs a secondary standardized template technology on each frame of the image to identify the lane markings, it calculates the lateral position of the vehicle and then uses a suitable warning trigger criterion. The advantage of the bird's-eye view system is that the method is simple and easy to implement, the execution efficiency is high on structured roads such as highways, and it is easy to obtain high positioning accuracy; but its disadvantage is that the scope of application is limited and it is only suitable for structured roads with clear markings.
[0005] Representative forward-looking systems include the AutoVue system, AWSTM system and decision support DSS system. The AutoVue system consists of a camera installed on the rear of the windshield inside the car, road marking line recognition and tracking software, 2 stereo speakers, a small display device and a control unit. The camera monitors the position of the vehicle in the current lane in real time, calculates the distance from the vehicle to the lane marking line, and then compares it with the set alarm distance to determine whether to issue an early warning. The AWS system is based on the research results of Intel Mobileye. It uses a single camera installed on the front windshield to monitor the lane marking line and measure and monitor the distance between the vehicle and the road boundary. The system can detect different lane markings such as solid continuous lines, dotted lines, etc. Its lane departure warning module detects the road boundary, calculates the position of the vehicle relative to the lane and the lateral movement of the vehicle to predict the time when the vehicle will cross the lane marking. When the time is lower than the set threshold, visual warnings and sound warnings are triggered to enable the driver to respond appropriately to different dangerous conditions and reduce the occurrence of accidents. The DSS system consists of a small shear torque CCD camera, a speed sensor, and visual and auditory warning devices such as indicators and alarm buzzers. The CCD camera installed in the rearview mirror is used to identify the lane line through image processing. The controller calculates the deviation between the actual driving trajectory of the current vehicle and the expected driving trajectory, determines the relative distance and speed between the vehicle and the lane line to determine whether the vehicle has begun to deviate from its lane, calculates the crossing time, and determines whether to issue an alarm. The forward-looking system can use more road information and can also be used on roads without road markings. The disadvantage is that some image feature points used to locate the lateral position of the vehicle may be interfered with by other vehicles or pedestrians.
[0006] The existing technical methods have strict requirements on installation and equipment, and it is difficult to achieve good results for the resource requirements of the current rearview mirrors (Android platform) and the distorted images caused by angle changes. Summary of the invention:
[0007] The purpose of the present invention is to provide a lane departure warning method for a simulated robot Android platform by acquiring continuous images transmitted from a camera in a rearview mirror.
[0008] The above purpose is achieved through the following technical solutions:
[0009] A lane departure warning method for a simulated robot Android platform includes five steps: the first step is to initialize a parameter list, the second step is to detect lane lines based on gradient directions, the third step is to update the parameter list, the fourth step is to detect lane lines based on row scan lines, and the fifth step is a deviation warning method.
[0010] The lane departure warning method of the simulated robot Android platform, the first step of initializing the parameter list is that the lane departure warning system is installed at the position of the rearview mirror, the camera shoots the road surface at an inclined angle, and the road surface information of the image is obtained; the pixel width of the input image is set to W, the height is set to H, and in the initialization parameters, the detection width range is [W / 5, 4*W / 5], the height range is [H / 3, 7*H / 8]; the vanishing point coordinates are (W / 2, H / 2), the far field line ordinate is y1=H / 2+d, the near field line ordinate is y3=7*H / 8d, where d is an adjustable threshold, and the empirical range is [20, 50]; the middle field line ordinate is y2=(y3+2*y2) / 3.
[0011] In the lane departure warning method for a simulated robot Android platform, the second step of lane line detection based on gradient direction is lane line detection V1.
[0012] (a) Feature extraction V1,
[0013] The lane edge characteristics can be measured using first-order or second-order derivatives. The first-order derivative can be measured using the gradient express:
[0014] and With amplitude and direction F(x, y) = g y / g x ;
[0015] Positive and negative edge line type discrimination: first exclude edge pixels with nearly horizontal gradient angles, then take out a row of pixels in the edge gradient image, judge the pixel gradient values from left to right, and judge the pixels with gradient directions toward the right side of the image as rising edges; Positive and negative edge candidate pair discrimination: for each positive edge, there is a negative edge within a valid range on the right side (corresponding to a reasonable line width in the experiment), and the difference between the gradient direction angle of the positive edge and the gradient direction angle of the negative edge satisfies the angle threshold, then the two edges are considered to constitute a positive and negative edge candidate pair;
[0016] Neighborhood discrimination: For each positive and negative edge candidate pair, if the average gray value of the left neighborhood of the positive edge is greater than T i,lane , then the background of the positive edge is considered to be consistent; if the average gray value of the right neighborhood of the negative edge is greater than T i,lane , then the background of the negative edge is considered to be consistent; if the positive and negative edge candidate pairs satisfy the background consistency at the same time, then the positive and negative edge candidate pairs are considered to pass the domain discrimination;
[0017] (b) Model fitting V1,
[0018] The features are sorted vertically by image position, and an unused pixel is selected from the sorted list as a seed point. The region growing algorithm will be used to generate a region. Recursively, the unused neighboring pixels of the pixel are used for testing, and pixels whose angles are within 22.5 of the regional angle will be added to the region. Each time a new pixel is added to the region, the regional angle is updated. This process continues until no pixels can be added to the rectangular region.
[0019] The lane departure warning method for a simulated robot Android platform, the third step of updating the parameter list is to detect lane lines V1, and when the number of straight lines is greater than 2, count the intersection positions V of the two straight lines. i The straight line (x, y) near the vanishing point P(x, y) is stored in the g_vps set, that is,
[0020]
[0021] The lane departure warning method for a simulated robot Android platform, wherein the lane line detection based on the line scanning line in the fourth step is that the lane line detection V2 adds a lane line filtering module compared to the lane line detection V1, and is optimized;
[0022] A fast extraction method based on line scanning was selected for extraction; the positive edge of the lane line e p and negative edge e v The following conditions are met,
[0023]
[0024] And the average gray value The linear model was used for parameter fitting and the least squares method was used for the fitting algorithm.
[0025] The lane departure warning method of the Android platform of the simulation robot, the fifth step of the departure warning method is based on the lateral deviation of the vehicle in the current position of the lane to warn; when the vehicle approaches or remains near the edge of the lane, a warning is given; the current position of the vehicle in the lane is obtained in real time by the lane line detection algorithm; x represents the distance between the center of the vehicle and the center of the lane, assuming that the vehicle is parallel to the lane, the vehicle width is P, and the lane width is W, then the current position of the front wheel of the vehicle relative to the left and right lane edges is as follows:
[0026]
[0027] The simulated lane of the lane departure warning method of the simulated robot Android platform comprises: a simulated left track and a simulated right track, the simulated left track is provided with a left track groove, a group of left fixing holes are provided at the bottom of the left track groove, the left fixing holes are connected to the left reaming holes, a left fixing rod is inserted into the left fixing holes through interference fit, the bottom of the left fixing rod is a conical tip, a left oblique threaded hole is provided on one side of the left fixing rod, the left oblique threaded hole is connected to the left oblique screw, a left opposite oblique threaded hole is provided on the other side of the left fixing rod, the left opposite oblique threaded hole is connected to the left opposite oblique screw, the angle between the left fixing rod and the left opposite oblique screw is less than 90°, the left fixing rod, the The left oblique screw, the left opposite oblique screw and the conical tip are all inserted into the ground; the simulated right track is provided with a right track groove, a group of right fixing holes are provided at the bottom of the right track groove, the right fixing holes are connected to the right reaming holes, the right fixing rod is inserted into the right fixing holes through interference fit, the bottom of the right fixing rod is a conical tip, a right oblique threaded hole is provided on one side of the right fixing rod, the right oblique threaded hole is connected to the right oblique screw, a right opposite oblique threaded hole is provided on the other side of the right fixing rod, the right opposite oblique threaded hole is connected to the right opposite oblique screw, the angle between the right fixing rod and the right opposite oblique screw is less than 90°, the right fixing rod, the right oblique screw, the right opposite oblique screw and the conical tip are all inserted into the ground.
[0028] The simulated lane of the lane departure warning method of the simulated robot Android platform, the top of the left fixed rod is connected to the left cap plate, the left cap plate is inserted into the left expanded hole, the top of the right fixed rod is connected to the right cap plate, the right cap plate is inserted into the right expanded hole, the left track groove is filled with white lime powder, and the right track groove is filled with white lime powder.
[0029] Beneficial effects:
[0030] 1. The present invention is used in technical fields such as unmanned autonomous driving and safety assisted driving. It fully considers the strict requirements of the algorithm on resource utilization and realizes the lane departure warning standard. It has been well verified on the vehicle rearview mirror.
[0031] 2. The present invention is applicable to devices that are sensitive to the CPU occupancy rate or have uncertain installation locations, and has a very good use effect.
[0032] 3. The present invention can provide stable lane line detection information, which is suitable for situations where the road line is blocked or partially damaged.
[0033] 4. The present invention provides a lane departure warning algorithm for a rear-mounted rearview mirror system. Description of the drawings:
[0034] AttachedFigure 1 It is a flow chart of the implementation of the lane departure warning system of the present invention.
[0035] Attached Figure 2 It is a flow chart of the lane departure warning system implemented based on the Android platform of the present invention.
[0036] Attached Figure 3 It is a framework diagram of the lane departure warning system algorithm implementation based on the Android platform of the present invention.
[0037] Attached Figure 4 It is a diagram of the region of interest and field of view setting (initialization parameter setting) of the present invention.
[0038] Attached Figure 5 It is a diagram of the region of interest and the field of view setting (region of interest) of the present invention.
[0039] Attached Figure 6 It is a flow chart of updating parameter list of the present invention.
[0040] Attached Figure 7 It is a diagram showing an embodiment of the straight line intersection situation of the present invention.
[0041] Attached Figure 8 It is another embodiment diagram of the straight line intersection situation of the present invention.
[0042] Attached Fig. 9 It is another embodiment diagram of the straight line intersection situation of the present invention.
[0043] Attached Fig.10 It is a schematic diagram of determining the vanishing point using the neighborhood search method of the present invention.
[0044] Attached Fig.11 It is a diagram of the lane line detection method based on line scanning of the present invention.
[0045] Attached Fig.12 It is a schematic diagram of the lane departure calculation method of the present invention.
[0046] Attached Fig.13 It is an embodiment diagram of the real-time warning result of the method of the present invention on the rearview mirror.
[0047] Attached Fig.14 It is another embodiment diagram of the real-time warning result of the method of the present invention on the rearview mirror.
[0048] Attached Fig.15 It is another embodiment diagram of the real-time warning result of the method of the present invention on the rearview mirror.
[0049] Attached Fig.16 It is another embodiment diagram of the real-time warning result of the method of the present invention on the rearview mirror.
[0050] Attached Fig.17 It is the simulated track diagram of the present invention. Specific implementation method:
[0051] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings of the present invention.
[0052] Embodiment 1:
[0053] A lane departure warning method for a simulated robot Android platform includes five steps: the first step is to initialize a parameter list; the second step is lane line detection based on gradient direction (lane line detection V1); the third step is to update the parameter list; the fourth step is lane line detection based on row scan lines; and the fifth step is a deviation warning method.
[0054] Embodiment 2:
[0055] In the lane departure warning method of a simulated robot Android platform described in Example 1, the first step of initializing the parameter list is that the lane departure warning system is installed at the position of the rearview mirror, the camera shoots the road surface at a certain tilt angle, and most of the acquired image is road surface information; the pixel width of the input image is W, and the height is H. In the initialization parameters, the detection width range is [W / 5, 4*W / 5], and the height range is [H / 3, 7*H / 8];
[0056] The coordinates of the vanishing point are (W / 2, H / 2), the ordinate of the far field line is y1=H / 2+d, and the ordinate of the near field line is y3=7*H / 8-d, where d is an adjustable threshold with an empirical range of [20, 50]; the ordinate of the middle field line is y2=(y3+2*y2) / 3.
[0057] Therefore, after the above initialization, we know that the detected area of interest is as follows Figure 5 shown.
[0058] Embodiment 3:
[0059] In the lane departure warning method for a simulated robot Android platform described in Example 1, the second step of lane line detection based on gradient direction is lane line detection V1, which is a lane line detection method based on gradient direction. The algorithm flow is as shown in the attached figure. Figure 6 The goal of this part is to detect the camera installation tilt or the error in specifying the detection area (ROI), which specifically involves the feature extraction V1 and model fitting V1 submodules.
[0060] (a) Feature extraction V1.
[0061] The lane edge characteristics can be measured using first-order or second-order derivatives. The first-order derivative can be measured using the gradient express:
[0062] and With amplitude and direction F(x, y) = g y / g x ;
[0063] g x and g y The edge detection Sobel is used to obtain it. The horizontal and vertical Soble operators can accurately represent the gradients that are similar to their own directions, but the gradients with large direction differences have large errors. In order to emphasize the edges along the 45-degree direction, the Soble operator in the 45-degree direction is used, and the gradient vector with the largest amplitude is taken as the final value.
[0064] The gradient amplitude threshold used to measure whether it is a lane edge is also closely related to the image contrast. The present invention designs a high threshold for local non-maximum suppression. and low threshold where β H , β L are the adjustment coefficients of the high threshold and the low threshold respectively. In the experiment, β is set H / β L =3 has a better effect; σ i is the grayscale variance of the i-th statistical window image. The statistical window in the present invention refers to the area range for calculating grayscale characteristics, and the grayscale variance calculation formula is as follows:
[0065]
[0066] Among them I i [j] is the i-th grayscale value of the j-th statistical window.
[0067] After extracting the lane line edge, the following criteria are used to identify the lane line features.
[0068] Positive and negative edge line type discrimination: first exclude edge pixels with nearly horizontal gradient angles, then take out a row of pixels in the edge gradient image, determine the pixel gradient values from left to right, and judge the pixels with the gradient direction biased to the right side of the image as rising edges, which are abbreviated as positive edges; similarly, the pixels with the gradient direction biased to the left side of the image are falling edges, which are recorded as negative edges.
[0069] Positive and negative edge candidate pair identification: For each positive edge, if there is a negative edge within a valid range on the right (corresponding to a reasonable line width in the experiment), and the difference between the positive edge gradient direction angle and the negative edge gradient direction angle satisfies the angle threshold (set to 20 in the experiment), then the two edges are considered to constitute a positive and negative edge candidate pair;
[0070] Neighborhood discrimination: For each positive and negative edge candidate pair, if the average gray value of the left neighborhood of the positive edge (set to 2 pixels) is greater than T i,lane , then the background of the positive edge is considered to be consistent; if the average gray value of the right neighborhood of the negative edge (set to 2 pixels) is greater than T i,lane , then the background of the negative edge is considered to be consistent; if the positive and negative edge candidate pairs both meet the background consistency, then the positive and negative edge candidate pairs are considered to pass the domain discrimination. i,lane Is the set background grayscale value.
[0071] After the above judgment, the center position of the coordinate position of the center edge is taken as the center feature position of the lane line, and the feature extraction work is completed.
[0072] (b) Model fitting V1.
[0073] The features are sorted vertically by image position, and an unused pixel is selected from the sorted list as a seed point. The region growing algorithm will be used to generate a region. Recursively, the unused neighboring pixels of the pixel are used for testing, and pixels whose angles are within 22.5 of the regional angle will be added to the region. Each time a new pixel is added to the region, the regional angle is updated. This process continues until no pixels can be added to the rectangular region. The point column in the rectangular region is extracted, and the least squares method is used to fit the data to generate a straight line when the data meets 10 and the point spacing is less than 50 pixels.
[0074] Embodiment 4:
[0075] In the lane departure warning method for a simulated robot Android platform described in Example 1, the third step of updating the parameter list is to update the parameter list after the lane line detection V1 as shown in the attached figure. Figure 7 When the number of lines that meet the requirement is greater than 2, the lines that meet the requirement that the intersection point of the two lines Vi(x, y) is near the vanishing point P(x, y) are counted and stored in the g_vps set, that is,
[0076]
[0077] In the experiment, Tx = 100, Ty = 100. When the number of g_vps sets is greater than AutoNum / 3 (AutoNum is the number of frames for automatic calibration), we designed an algorithm to perform "weighted clustering method" to screen out credible vanishing points.
[0078] Ideally, parallel lines in space have similar inclination angles after being projected onto the image plane and intersect at one point. However, in reality, there are always some errors in the projection process and line extraction process of spatial lines on the image plane. These errors make the intersection point of parallel lines in space projected onto the image plane not unique, but form a relatively dense point cluster, as shown in the figure below. Figure 7 As shown, ideally, all straight lines intersect at one point, but in most cases the intersection point is as shown in the figure below. Figure 8 As shown in the figure, they no longer intersect at one point but have multiple intersections, and the intersections are dense. However, when there is interference, the intersections are as shown in the figure. Fig. 9 As shown, many erroneous intersections will appear.
[0079] Through optimization selection, we select appropriate intersection points from each frame and aggregate them into a vanishing point candidate set N, classify the points through the neighborhood search method, and select the center point of the point set with the most classified data as the final vanishing point.
[0080] Traditionally, classification uses the traversal method to calculate the distance between each point and a certain point, and then compare it with a given threshold. The point that is less than the given value is the neighboring point of the point. If there are n points, the number of calculations is n(n-1) / 2, and the complexity is 0(n2). Analyzing the characteristics of point distribution, it can be seen that the points corresponding to the line cluster and the intersection of the central line are relatively concentrated, except for interference points, so the field search method can be used.
[0081] The domain search method takes each point as the center and searches within a neighborhood of the point to see if there are other points. If there are, these points are considered as the neighboring points of the point. When the neighborhood size is M*M, the number of searches is M2*n, the complexity of the algorithm is 0(n), and the number of searches is an order of magnitude faster than the traversal method.
[0082] The specific steps of the algorithm are as follows:
[0083] For each point i in N, if C(i) = 0, then n c =n c +1, C(i)=n c , and then execute sequentially; otherwise i=i+1, continue with step (1).
[0084] Consider each point j (j=1, 2, L, m(i)) in the set of neighboring points U(i) of i.
[0085] If m(j)>2 and C(j)=0, then C(j)=C(i), and then consider j’s neighboring point set U(j).
[0086] If m(j)≤2 and C(j)=0, then C(j)=C(i), and then consider the neighboring point set U(j+1) of j+1.
[0087] If m(j)≤2 and C(j)≠0, directly examine the neighboring point set U(j+1) of j+1.
[0088] After classifying each point, the sum of the weights of each point is used as the weight of the point after clustering, and the average value of the coordinates of each point is used as the final coordinate value.
[0089]
[0090] The weighted clustering method not only has a faster search speed, but also assigns different weight values to different intersection points, thereby enhancing the contribution of densely packed points to the final vanishing point, eliminating the influence of interference points, enhancing the robustness of vanishing point detection, and achieving good detection results.
[0091] When the updated vanishing point P i (x, y) is within a reasonable range of the vanishing point P(x, y), we update the lane line parameters as follows. Vanishing point, updated to P = P i .
[0092] ROI area and field of view. Assume that the pixel width of the input image is W and the height is H. In the dynamic parameters, the detection width range is [0, W] and the height range is [Vh, H]. The vanishing point coordinates are (V W , Vh), the ordinate of the far field line is y1=Vh+d, and the ordinate of the near field line is y3=Hd, where d is an adjustable threshold with an empirical range of [20, 50]. The ordinate of the middle field line is y2=(y3+2*y2) / 3.
[0093] Minimum lane width minWidth. The minimum lane width refers to the minimum pixel distance between two lane lines that at least meets the minimum pixel, which is initialized to a manually specified value (140pix in the experiment). The calculation method is the average of all distances in the g_vps set where the vanishing point meets the requirement and the distance between the two lines meets [minWidth / 2, 1.5*minWidth].
[0094] Embodiment 5:
[0095] In the lane departure warning method for a simulated robot Android platform described in Example 1, the lane line detection based on the line scanning line in the fourth step is lane line detection V2, which is a lane line detection method based on line scanning. The algorithm flow is as shown in the attached Fig.10 Compared with lane detection V1, a lane filter module is added, and optimization is performed to meet the resource requirements of the Android platform;
[0096] A fast extraction method based on line scanning was selected for feature extraction; the positive edge of the lane line e p and negative edge ev The following conditions are met.
[0097]
[0098] Where g(x, y) is the gray value of the coordinate point (x, y), and the average gray value The linear model was used for parameter fitting and the least squares method was used for the fitting algorithm.
[0099] Embodiment 6:
[0100] The lane departure warning method of the simulated robot Android platform described in Example 1 is characterized in that: the lane departure warning algorithm of the fifth step of the deviation warning method is based on the lateral deviation of the vehicle's current position in the lane to warn; a warning is given when the vehicle approaches or remains near the edge of the lane; the current position of the vehicle in the lane is obtained in real time by the lane line detection algorithm; as shown in the attached Fig.11 As shown, x represents the distance between the center of the vehicle and the center of the lane. Assuming that the vehicle is parallel to the lane, the vehicle width is P, and the lane width is W, the current position of the front wheel of the vehicle relative to the left and right lane edges is as follows:
[0101]
[0102] Where lane width W and vehicle width P are known quantities, x is the value calculated by the lane detection algorithm, and ΔL and ΔR represent the positions of the left and right wheels relative to the left and right lane boundaries, respectively.
[0103]
[0104] When ΔL>0 and ΔR>0, it indicates that the vehicle is in the lane and no warning is needed. When ΔL<0 and ΔR<0, the vehicle is considered to have deviated from the lane. When k>t1, it is considered to be left deviation, and k<t2 is considered to be right deviation. t1 and t2 can be the same, or the sensitivity can be adjusted according to the experiment. In the experiment, t1=t2=1.
[0105] Embodiment 7:
[0106] The lane departure warning method for a simulated robot Android platform described in the above embodiment, the lane departure warning obtains the road surface information of the current driving lane through a camera, processes and analyzes the road image information to obtain useful information therein, and then judges the current state of the vehicle. If it is determined that the vehicle has deviated from the lane at this time, a warning signal is sent to the driver to remind the driver to take relevant operations to correct the current state of the vehicle. If it is determined that the vehicle has not deviated, no warning signal is sent.
[0107] As attached Figure 1The flowchart of the lane departure warning system is shown in FIG. The present invention is a lane departure warning method based on the Android platform, which uses the camera built into Android to collect images, calls the algorithm of the system after obtaining the real-time video stream, outputs the warning signal and then displays it in real time on the Android platform. Figure 2 Shown is the implementation process of the present invention.
[0108] The two most important parts of this invention are lane detection and deviation discrimination. In order to obtain stable and real-time lane detection results, we need to perform image preprocessing, lane tracking and other correlation constraints. According to the requirements of the installation equipment, the system will run on the Android system platform. The installation location and environment are uncertain, so camera calibration cannot be applied to this scenario. The algorithm implementation framework is attached. Figure 3 shown.
[0109] Embodiment 8:
[0110] The simulated lane of the lane departure warning method of the simulated robot Android platform described in Example 1 comprises: a simulated left track 1 and a simulated right track 2, wherein the simulated left track is provided with a left track groove 3, a group of left fixing holes 4 are provided at the bottom of the left track groove, the left fixing holes are connected to the left reaming holes 5, a left fixing rod 6 is inserted into the left fixing holes by interference fit, the bottom of the left fixing rod is a conical tip 7, a left oblique threaded hole 8 is provided on one side of the left fixing rod, the left oblique threaded hole is connected to the left oblique screw 9, a left opposite oblique threaded hole 10 is provided on the other side of the left fixing rod, the left opposite oblique threaded hole is connected to the left opposite oblique screw 11, the angle between the left fixing rod and the left opposite oblique screw is less than 90°, the left fixing rod, the The left oblique screw, the left opposite oblique screw and the conical tip are all inserted into the ground; the simulated right track is provided with a right track groove 12, a group of right fixing holes 13 are provided at the bottom of the right track groove, the right fixing holes are connected to the right reaming holes 14, a right fixing rod 15 is inserted into the right fixing holes by interference fit, the bottom of the right fixing rod is a conical tip, a right oblique threaded hole 16 is provided on one side of the right fixing rod, the right oblique threaded hole is connected to a right oblique screw 17, a right opposite oblique threaded hole 18 is provided on the other side of the right fixing rod, the right opposite oblique threaded hole is connected to a right opposite oblique screw 19, the angle between the right fixing rod and the right opposite oblique screw is less than 90°, the right fixing rod, the right oblique screw, the right opposite oblique screw and the conical tip are all inserted into the ground.
[0111] The tops of the simulated left track and the simulated right track are on the same plane as the ground. When the simulation robot passes over the simulated left track and the simulated right track, if it deviates from the simulated left track and the simulated right track, the displacement of the white lime powder can be clearly seen and the traces are obvious.
[0112] Embodiment 9:
[0113] In the simulated lane of the lane departure warning method of a simulated robot Android platform described in Example 8, the top of the left fixed rod is connected to the left cap plate 20, and the left cap plate is inserted into the left expanded hole. The top of the right fixed rod is connected to the right cap plate 21, and the right cap plate is inserted into the right expanded hole. The left track groove is filled with white lime powder, and the right track groove is filled with white lime powder.
Claims
1. A lane departure warning method for a simulated robot Android platform, characterized by: : This warning method includes five steps: the first step is to initialize the parameter list, the second step is to detect the lane line based on the gradient direction, the third step is to update the parameter list, the fourth step is to detect the lane line based on the line scan line, and the fifth step is to deviate from the warning method; The first step of initializing the parameter list is that the lane departure warning system is installed at the position of the rearview mirror, and the camera shoots the road surface at an inclined angle to obtain the road surface information of the image; the pixel width of the input image is set to W, and the height is set to H. In the initialization parameters, the detection width range is [W / 5, 4*W / 5], and the height range is [H / 3, 7*H / 8]; the vanishing point coordinates are (W / 2, H / 2), the far field line ordinate is y1=H / 2+d, and the near field line ordinate is y3=7*H / 8-d, where d is an adjustable threshold, and the empirical range is [20, 50]; the middle field line ordinate is y2=(y3+2*y2) / 3; The second step of lane line detection based on gradient direction is lane line detection V1. (a) Feature extraction V1, The lane edge characteristics can be measured using first-order or second-order derivatives. The first-order derivative can be measured using the gradient express: and With amplitude and direction F(x,y)=g y g x ; Positive and negative edge line type discrimination: first exclude edge pixels with horizontal gradient angles, then take out the pixels in the previous row of edge gradient image, judge the pixel gradient values from left to right, and judge the pixels with gradient direction biased to the right side of the image as rising edges; Positive and negative edge candidate pair discrimination: for each positive edge, there is a negative edge within a line width range on the right, and the difference between the gradient direction angle of the positive edge and the gradient direction angle of the negative edge meets the angle threshold, then the two edges are considered to constitute a positive and negative edge candidate pair; Neighborhood discrimination: For each positive and negative edge candidate pair, if the average gray value of the left neighborhood of the positive edge is greater than T i,lane , then the background of the positive edge is considered to be consistent; if the average gray value of the right neighborhood of the negative edge is greater than T i,lane , then the background of the negative edge is considered to be consistent; if the positive and negative edge candidate pairs satisfy the background consistency at the same time, then the positive and negative edge candidate pairs are considered to pass the domain discrimination; where T i,lane is the set background gray value; (b) Model fitting V1, The features are sorted vertically by image position, and an unused pixel is selected from the sorted list as a seed point. The region growing algorithm will be used to generate a region. Recursively, the unused neighboring pixels of the pixel are used for testing, and pixels whose angles are within 22.5 degrees of the region angle will be added to the region. Each time a new pixel is added to the region, the region angle is updated. This process continues until no pixels can be added to the rectangular region. The third step of updating the parameter list is to detect lane lines V1, and when the number of straight lines is greater than 2, count the intersection points V of the two straight lines. i The straight line (x,y) near the vanishing point P(x,y) is stored in the set; The lane line detection based on the line scan line in the fourth step is that the lane line detection V2 adds a lane line filtering module compared to the lane line detection V1, and is optimized; A fast extraction method based on line scanning was selected for extraction; the positive edge of the lane line e p and negative edge e v The following conditions are met, And the average gray value The linear model was used for parameter fitting, and the least squares method was used for the fitting algorithm; The fifth step of the deviation warning method is to warn based on the lateral deviation of the vehicle's current position in the lane; to give a warning when the vehicle approaches or remains near the edge of the lane; The current position of the vehicle in the lane is obtained in real time by the lane detection algorithm; x represents the distance between the center of the vehicle and the center of the lane. Assuming that the vehicle is parallel to the lane, the vehicle width is P, and the lane width is W, the current position of the front wheel of the vehicle relative to the left and right lane edges is as follows:
2. The simulated lane of the lane departure warning method of the simulated robot Android platform according to claim 1 comprises: a simulated left track and a simulated right track, characterized in that : The simulated left track is provided with a left track groove, a group of left fixing holes are provided at the bottom of the left track groove, the left fixing holes are connected to the left reaming holes, the left fixing rod is inserted into the left fixing holes through interference fit, the bottom of the left fixing rod is a conical tip, a left oblique threaded hole is provided on one side of the left fixing rod, the left oblique threaded hole is connected to the left oblique screw, a left opposite oblique threaded hole is provided on the other side of the left fixing rod, the left opposite oblique threaded hole is connected to the left opposite oblique screw, the angle between the left fixing rod and the left opposite oblique screw is less than 90°, the left fixing rod, the left oblique screw, the left opposite oblique screw and the conical tip are all inserted into the ground The simulated right track is provided with a right track groove, a group of right fixing holes are provided at the bottom of the right track groove, the right fixing holes are connected to the right reaming holes, the right fixing rod is inserted into the right fixing holes through interference fit, the bottom of the right fixing rod is a conical tip, a right oblique threaded hole is provided on one side of the right fixing rod, the right oblique threaded hole is connected to the right oblique screw, a right opposite oblique threaded hole is provided on the other side of the right fixing rod, the right opposite oblique threaded hole is connected to the right opposite oblique screw, the angle between the right fixing rod and the right opposite oblique screw is less than 90°, the right fixing rod, the right oblique screw, the right opposite oblique screw and the conical tip are all inserted into the ground.
3. The simulated lane of the lane departure warning method of the simulated robot Android platform according to claim 2 is characterized by: : The top of the left fixed rod is connected to the left cap plate, and the left cap plate is inserted into the left expanded hole. The top of the right fixed rod is connected to the right cap plate, and the right cap plate is inserted into the right expanded hole. The left track groove is filled with white lime powder, and the right track groove is filled with white lime powder.
