# Efficient Filtering for Edge Extraction under Perspective Effect
## 3 Lane Marking Detection
### Parametric Model of Projective Lane Markings
To obtain an explicit description of the appearance of the lane markings in the frame buffer, we require a lane model of the lane markings in the vehicle coordinate first. Here, we represent the lane markings in the vehicle coordinate as parameter function of a certain variable \(t\). This means the lane markings can be expressed as \((x_{v}(t),y_{v}(t),z_{v}(t))\). To analyze the lane markings of certain shapes, we expand this parameter function of the lane markings with the Taylor's series at the original point,  
\[ \begin{cases}x_{v}(t)=c_{0}+c_{1}t+c_{2}t^{2}+c_{3}t^{3}+O[t^{4}],\\ y_{v}(t)=l_{0}+l_{1}t+O[t^{2}],\\ z_{v}(t)=h_{0}+h_{1}t+O[t^{2}].\end{cases}  \tag{18}\]  
If we examine parameter \(t\) as the arc length along the running direction of the vehicle in a local area, it makes sense to express the \(x_{v}(t)\) with more items because we care more about the shape of the lane markings along the lateral direction. \(c_{0}\) is the lateral offset of the vehicle relative to the lane marking. \(c_{1}=tan(\phi_{v})\) is the tangent of the heading angle of the vehicle, relative to the local direction of the lane marking. \(c_{2}\) and \(c_{3}\) are the curvature parameters of the lane marking. If both \(c_{2}\) and \(c_{3}\) are zero, the lane markings modeled by Equation (20) are straight lines. If \(c_{3}\) is zero and \(c_{2}\) is non-zero, the curvature of the lane markings is constant. If both \(c_{2}\) and \(c_{3}\) are non-zero, the curvature of the lane markings is linearly variable as a function along the arc length \(t\). This is typical of lane markings [32]. \(l_{0}\) is the offset of the arc length of the lane marking in the vehicle coordinate. It makes sense to set \(l_{0}\) to 0 and \(l_{1}\) to 1 without a loss of generality. \(h_{0}\) is the variation in the vehicle's height due to the soft suspension system of the modern vehicles. \(h_{1}=tan(\theta_{v})\) is the tangent of the vehicle's pitch angle, which is also caused by the suspension system. In this way, we can rewrite the parameter function of the lane marking and omit the infinite items of higher orders,  
\[ \begin{cases}x_{v}(t)=c_{0}+tan(\phi_{v})t+c_{2}t^{2}+c_{3}t^{3},\\ y_{v}(t)=t,\\ z_{v}(t)=h_{0}+tan(\theta_{v})t.\end{cases}  \tag{19}\]  
To develop a simpler form of lane marking, the yaw angle and pitch angle of the vehicle can be combined with the corresponding angle of the camera, so the influence of those two items can be considered in the perspective projection transformation. The height of the vehicle can be combined with the height of the camera in the vehicle coordinates. The sum can be considered in the perspective projection transformation. In this way, we can determine the parameter function of the lane marking, as follows:\[ \begin{cases}x_{v}(t)=c_{0}+c_{2}t^{2}+c_{3}t^{3},\\ y_{v}(t)=t,\\ z_{v}(t)=0.\end{cases}  \tag{20}\]  
The refined perspective projection transformation from the 3D vehicle coordinate to the 2D image frame buffer is as follows:  
\[ \begin{cases}c=^{B}C_{I}+\frac{x_{c}cos(\phi+\phi_{p})+y_{v}sin(\phi+\phi_{p})}{ c_{f}((h+h_{0}-z_{v})sin(\theta+\phi_{p})+c(\theta+\theta_{v})(y_{c}cos(\phi+ \phi_{p})-x_{v}sin(\phi+\phi_{v}))}),\\ r=^{B}R_{I}+\frac{(h+h_{0}-z_{v})cos(\theta+\phi_{p})-sin(\theta+\phi_{p})(y_{c} cos(\phi+\phi_{p})-x_{v}sin(\phi+\phi_{p}))}{r(h+h_{0}-z_{v})sin(\theta+\phi_{p})+c( \theta+\theta_{v})(y_{c}cos(\phi+\phi_{p})-x_{v}sin(\phi+\phi_{p}))}.\end{cases}  \tag{21}\]  
We can rewrite the formula with \(h_{p}=h+h_{0}\), \(\phi_{p}=\phi+\phi_{v}\), \(\theta_{p}=\theta+\theta_{v}\). Under real conditions, the combined pitch angle \(\theta_{p}\) and the combined yaw angle \(\phi_{p}\) are very slight. It is common for them to be kept below 0.1 rads. Under these conditions, we can expand all the sinusoidal functions with Taylor's series and ignore all the items over the second orders. The simplified perspective projection transformation can be rewritten as follows:  
\[