Log In Sign Up

A Robust Lane Detection Associated with Quaternion Hardy Filter

by   Wenshan Bi, et al.
NetEase, Inc

In this article, a robust color-edge feature extraction method based on the Quaternion Hardy filter is proposed. The Quaternion Hardy filter is an emerging edge detection theory. It is along with the Poisson and conjugate Poisson smoothing kernels to handle various types of noise. Combining with the Quaternion Hardy filter, Jin's color gradient operator and Hough transform, the color-edge feature detection algorithm is proposed and applied to the lane marking detection. Experiments are presented to demonstrate the validity of the proposed algorithm. The results are accurate and robust with respect to the complex environment lane markings.


page 8

page 9

page 11


Robust Lane Marking Detection Algorithm Using Drivable Area Segmentation and Extended SLT

In this paper, a robust lane detection algorithm is proposed, where the ...

Color Image Edge Detection using Multi-scale and Multi-directional Gabor filter

In this paper, a color edge detection method is proposed where the multi...

Edge-detection applied to moving sand dunes on Mars

Here we discuss the application of an edge detection filter, the Sobel f...

Map-Enhanced Ego-Lane Detection in the Missing Feature Scenarios

As one of the most important tasks in autonomous driving systems, ego-la...

Semi-Local 3D Lane Detection and Uncertainty Estimation

We propose a novel camera-based DNN method for 3D lane detection with un...

Unifying Optimization Methods for Color Filter Design

Through optimization we can solve for a filter that when the camera view...

Layered Cost-Map-Based Traffic Management for Multiple Automated Mobile Robots via a Data Distribution Service

This letter proposes traffic management for multiple automated mobile ro...

1 Preliminaries

In order to mention the proposed method, some basic knowledge about quaternion algebra [30], quaternion Fourier transform [7, 14], quaternion Hardy space [24], Jin’s gradient operator [26] and Hough transform [41] are reviewed as follows.

1.1 Quaternion algebra and quaternion Fourier transform


denote the Hamiltonian skew field of quaternion


which is an associative anti-commutative four-dimensional algebra. A quaternion-valued function can be represented by


where .

1.2 Quaternion Hardy space

Let . Then the quaternion Fourier transform (QFT) [7, 17, 18] of is defined by


where denote the 2D angular frequencies. Furthermore, if is an integrable -valued function defined on , the inverse quaternion Fourier transform (IQFT) [7, 17, 18] of is defined by


Let , namely upper half complex plane and be the Hardy space on the upper half complex plane. Let . And a subset of is defined by The quaternion Hardy space consists of all functions satisfying [Hu1],


where , .

1.3 Jin’s gradient operator

Let be an color image that maps a point

to a vector

, , . Specifically, for color image , let , , denotes the red, the green, and the blue channel, respectively. Then the square of the variation of at the position with the distance in the direction is given by






Then the gradient magnitude of the Jin’s gradient operator is given by


The gradient direction is defined as the value that maximizes over


where , While , is undefined.

1.4 Hough transform

The Hough transform is done on a binary image, obtained after processing the original image by an edge detector [25, 41, 35]. This is an ingenious method that converts such global curve detection problem into an efficient peak detection problem in parameter space. In addition, Dorst et al [11, 10, 9, 8] studied the application of plane-based geometric algebra in the representation of straight lines. The basic idea of Hough transform is to use the duality relationship between the points and lines in the image domain and the parameter domain. In particular, the slope-intercept form is a classical parametric form for straight line detection, as is shown in Eq. (1.11):


where is the coordinate of the pixel being mapped, and the parameters and are the slop and y-intercept of the line respectively. It’s worth noting that this method is sensitive to the choice of coordinate axes on the image plane because both the parameters become unbounded when is infinite.

Duda and Hart [12] lucidly resolved the issue of unboundedness by mapping a point in image space to a sinusoidal curve in parameter space. Here we use HoughlinesP method to detect lines, which is based on statistics not only could detect the two endpoints of the straight lines but also have the advantage of high efficiency. and satisfy the following relationship:


where is the angle between the line and the -axis, is the distance from the origin to the line in the image coordinate, and .

The first step of Hough transform is initialize accumulator to all zeros, followed by the parameter space is quantized in intervals of and and corresponding accumulators are created to collect the evidence (or vote) of object pixels satisfying Eq.(1.12). Consider the (, )th accumulator corresponding to intervals [(, ) and [(, ) where . For each object pixel satisfying Eq.(1.12) with parameters in the above range, the vote in the (, )th accumulator is incremented by 1. In the peak detection phase, the accumulators having number of votes above a critical threshold correspond to straight lines in the image. Therefore, the line detection problem is converted to peak statistics problems.

2 Quaternion Hardy filter

The analytic signal [16] of a given real signal is defined by


where denotes the Hilbert transform [28] of . By a direct computation, the Fourier transform of is given by

Figure 1: The flowchart of the proposed lane detection method.

The analytic signal of can be regarded as the output signal of a filter with input . The system function of this filter is given by


Motivated by the success of analytic signal in the real signal processing, we try to use the alternative tool in the 2D signal processing.

Give a 2D quaternion-valued signal . The quaternion analytic signal [5] is defined by


where , are the partial Hilbert transforms with respect to respectively, while the 2D Hilbert transform. By a direct computation [Kou2], the quaternion Fourier transform of is written as


The quaternion analytic signal of can be regarded as the output signal of a filter with input . The system function of this filter is given by


By the inverse quaternion Fourier transform on the both side of (2.5), we obtain


In this paper, we apply quaternion Hardy filter as a lane detector of color image. The system function of quaternion Hardy filter is defined by


Based on the above analysis, we have the following theorem.

Figure 2: The first row is the original image in rainy night driving condition. The second row and the third row are the lane detection results which are captured by Jin’s algorithm and the the proposed algorithm, respectively.
Theorem 2.1

Let , and


Where is given by (2.8). Then .

The proof of Theorem 2.1 can be found in [QHF]. It states that the output signal of the quaternion Hardy filter belongs to the quaternion Hardy space .

Remark 2.2

The quaternion analytic signal is a special case of quaternion Hardy filter. That is, when in Theorem 2.1, the system function reduces to , and the signal reduces to which is defined by equation (2.7).

Remark 2.3

In image processing, quaternion Hardy filter can not only suppress the high frequency of image, but also enhance the edge feature. It’s worth noting that, the system function plays a key role in quaternion Hardy filter. It has the advantage of both Hilbert transform and low-pass filter. On the one hand, the factor in performs Hilbert transform on the input signal. It can enhance the edge feature. On the other hand, could improve the ability of noise immunity for the quaternion Hardy filter.

3 The proposed lane detection algorithm

The flowchart is shown in Fig. 1. In the following, let’s consider the details of the proposed algorithm. They are divided by the following steps.

  • Step 1. Input the road image . By quaternion representation, it can be written as


    where and represent the red, green and blue components of color image , respectively.

  • Step 2. Compute the discrete quaternion Fourier transform (DQFT) [37], , of the image from Step 1, we have

    Figure 3: The first row is the original image in snowy night driving condition. The second row and the third row are the lane detection results which are captured by Jin’s algorithm and the the proposed algorithm, respectively.
  • Step 3. For the fixed positive and , calculate by Eq. (2.8), we have

    Multiplying with , from Step 2 and 3, respectively. By Theorem 2.1, we have

  • Step 4. Compute the inverse DQFT of , from Step 3,


    We obtain .

  • Step 5. Extract the vector part of , we obtain


    where , are real-valued functions.

  • Step 6. Applying the Jin’s gradient operator [26] to .

  • Step 7. Furthermore, perform the Hough operator [3].

  • Step 8. Finally, we show the final result by placing the resulting lane lines on the original image.

4 Experiment

To verify the effectiveness of quaternion hardy filter-based lane detection algorithm, we conduct experiments on 27 video clips. The experiments are programmed in Matlab R2016b. The proposed algorithm is compared with previous work [39], [2], [27], [43], [32], [6], and [26]. Here, Jin [26] means that the proposed method without steps 2-4 and provides a baseline reference results. The previous work involved six different approaches that are typical of the field of lane line detection.
The video clips used in the experiment were from public dataset [1], which were shot using dashboard cameras in the US and Korea. This data set contains a total of 49 video clips, and 27 are randomly selected for this experiment. The 27 video clips consist of 44159 frame images which divided into 6 different weather conditions: day-clear (5), day-rainy (5), day-snowy (5), night-clear (5), night-rainy (5) and night-snowy (2). The number in parentheses after the weather label represent the number of video clips used in the experiment.

4.1 Visual results

Visual results including rain night and snow night are illustrate in Fig. 2 and Fig. 3, respectively. When car lights form bright lines on the road on a rainy night, the comparison method may fail. It affects the detection of lane lines. For example, in the second row and fourth column of Fig. 2, Jin’s method is obviously affected by the light, thus making a misjudgment of the lane line. In addition, Jin’s method (e.g., the second row and first column in Fig. 3) detects the boundary line of the navigation screen and ignores the actual lane line on the right. Gradient-based approaches [43] may preserve the boundary portion of the navigation screen while ignoring the actual lane lines when they are reflective navigation screens are present. In general, the proposed method can achieve satisfactory results under complex weather conditions and illumination conditions. The proposed method cannot, however, detect lane markings when affected by surrounding buildings or windshield wipers, as shown in Fig. 4.

4.2 Quantitative comparisons

For each image, two boundary lines are drawn on the long edge of the lane mark in the presence of the lane mark, and the real value of the ground is obtained manually. The detection rate is obtained by the following


where represents the number of images correctly detected and represents the total number of images participated in the detection.

Figure 4: The first row is the original image in complex driving condition. The second row and the third row are the false lane detection results which are captured by Jin’s algorithm and the the proposed algorithm, respectively.

We present a quantitative evaluation for seven methods in Table 2. It can be seen from Table 2 that all the algorithms can generate good results when lane images are captured with good conditions, as shown in clear days and nights. For clear day sets, QHF-based method achieves a 99.4% accuracy among the compared methods. For rain day and snow day sets, the proposed method keeps steady in the accuracy. On clear night sets, the accuracy of the proposed method is still in the Top three. In the rainy night data set, the accuracy of the proposed method was still 88.5%, despite the fact that raindrops falling on the windshield caused considerable interference with the lane lines in the image. For the snowy night data set, the other six methods were not considered, and the proposed method was accurate to 95.4%. We have to say that there are some situations that are hard to dealt with. Fig. 4 gives several failure samples. For those images affected by wipers, illuminations and weather conditions, our method faces challenges. A potential solution to solve this problem is to use ROI (region of interest) [6]. However, ROI-based lane detection method require much computation cost. Therefore, more optimization works needs to be done in the future.

DR (%) Son[39] Aly[2] Jung[27] Yoo[43] Liu[32] Lee[6] Jin[26] Ours
Clear-Day 93.1 96.3 8898 96.36 - 99 99.3 99.4
Rain-Day 89 - - 96.19 98.67 96.9 96.8 97
Snow-Day - - - - - 93 94.2 95.5
Clear-Night 94.3 - 87.7 96.5 94.06 98 95.7 96.1
Rain-Night 93 - - - - 93.6 79.4 88.5
Snow-Night - - - - - - 89.9 95.4
time/ 33 20 3.9 50 200 35.4 300 800
CPU Unknow Core 2 2.8GHz Unknow 2.3GHz A9 GHz 2.3GHz 2.3GHz
@2.4GHz @800MHz
Table 2: Comparison of detection rate of different algorithms for color image lane detection on 44159 images .

5 Conclusion and future work

In this paper, we proposed a QHF-based lane detection method for color image. It exploits quaternion Hardy filter to generate clear feature image, and it use Jin’s gradient operator and Hough transform to provided lane lines, which ensures accuracy lane lines. Our method could handle with multiple situations such as various weather conditions, illuminations and lane markings. Experiments conducted on the dataset indicate that the proposed method achieves satisfactory results. The results were accurate and robust with respect to the complex environment lane markings. Finally, we are interested in extending our proposed quaternion lane line detection idea to color video for lane line detection in the future. In order to optimize the algorithm, we will also consider fast algorithms [20] and algorithm optimization software [15].


This research was supported by Macao Science and Technology Development Fund (No. FDCT/085/2018/A2).