# Research on Lane Detection Based on Global Search of Dynamic Region of Interest (DROI)
## 4 Lane Detection and Tracking
### Detection Principle of the DROI Global Research and Starting Point Design  
Considering the complex lane environment, the noise on the actual road, as well as the absence and discontinuity of lane lines, a global search method based on DROI is proposed to identify lane line feature points. In this section, the seed function of pixel recognition is employed to conduct a global search for DROI and realize the recognition of lane line feature points. After a series of preprocessing, such as graying, image enhancement and image segmentation, the binary lane line image matrix is obtained. In the image matrix, as shown in Figure 8b, the gray value of the lane line is 1, and the other parts are 0. The converted aerial view is shown in Figure 8a. The left and right lane lines are roughly distributed on both sides for lane line, so the starting point of the search can be set from the bottom. As shown in Figure 8a, the width of lane lines is about 10 pixels in the image. Because the lane lines are worn, they are not standard rectangles, and some edges are jagged. Furthermore, in order to fulfill a more efficient global search of DROI, firstly, the principle of DROI global is established. Next, a tilt line is set as the starting point of each line search. If the straight line of all points can meet separate left and right lane lines and the tilt does not have the intersection point with the lane line in the field of vision scope, this line satisfies the conditions. Then, in this section, the direction of the lane line in the previous frame is used as the tilt direction of the starting line, and the specific line is shifted to the right by the halves of the lane line width when it is determined by the  
Figure 8: Comparison picture of binarization: (**a**) Binary image; (**b**) Binary matrix. Figure 7: Lane line detection flow chart. lowest and highest points of the left lane line in the previous frame. Lastly, the equation used to search for the starting line can be obtained according to the two-point method and the image translation rules. The specific search starting line is shown in Figure 9 and the search process is shown in Table 1  
According to the DROI global search principle, the seed function is set as \(H(x,y)\)[21], and \(Z(x,y)\) refers to the part of image where the filter \(H(x,y)\) is applied. Therefore, the judging function is expressed as follows:  
\[\sigma(x,y)=Z(x,y)\times H(x,y) \tag{23}\]  
In order to judge whether the point is the lane line or not, if the judging function satisfies \(\sigma(x_{i},y_{i})\geq\lambda\), the point can be identified as the point on the lane line [23]. If the threshold requirement is not met, the search should be continued before reaching the ROI boundary. Since the image function is a matrix, the seed can be set as a template of structural elements to carry out dot product operation on the image matrix. The template of the seed function is as follows:  
\[seed=\left[ \begin{array}{ccc}s_{11}&s_{12}&s_{13}\\ s_{21}&s_{22}&s_{23}\\ s_{31}&s_{32}&s_{33}\end{array} \right], \tag{24}\]  
where \(s_{ij}\) is the element in the seed template, which can be selected according to the effect of the binary image. \(s_{ij}\) is set to:  
\[s_{ij}=1(i=1,2,3\ldots\ldots,j=1,2,3\ldots), \tag{25}\]  
In addition, threshold \(\lambda\) is set as 9 in this paper. The seed function is calculated with the original road image to obtain the value and judge the lane line position. Then, the data of the lane line feature point is determined.