# Efficient Filtering for Edge Extraction under Perspective Effect
## 3 Lane Marking Detection
### Parametric Model of Projective Lane Markings  
Once we parameterize the relative position between the lane markings and the vehicle, we can determine all of the possible appearances about the lane markings with varying relative poses and positions. This parameterized expression of the lane markings is the lane model. Although a variety of different lane-modeling techniques have been used, most of them can be divided into two categories. The first category involves modeling the lane markings themselves in the vehicle coordinates. [PERSON] and [PERSON] [30] assumed that the road markings would form parallel lines in an inverse-perspective-warped image. Others have used approximations of flat roads with piecewise constant curvatures. The second type of technique involves modeling the appearance of the lane marking directly in the frame buffer. For example, deformable contours, such as B-snakes [31], have been used to parameterize the appearance of the curved lanes. Because we need to parameterize the relative positions of the lane markings and the vehicle, we must model the lane markings in the vehicle coordinates using the values of the relative positions of the lane markings and the vehicle as parameters. Before we deduce the parametrical expression of lane markings in the frame buffer, we first provide definitions of coordinates. To illustrate the orientation of the camera in vehicle coordinate and the projection from 3D space to the 2D space in a simple way, we defined the following four coordinate systems: the frame buffer \((C,R)\) in pixels, the image coordinates \((X_{I},Y_{I})\) in \(m\), the camera coordinates \((X_{C},Y_{C},Z_{C})\) in \(m\), and the vehicle coordinates \((X_{V},Y_{V},Z_{V})\) in \(m\). Here, we use the ENU-system (east-north-up) as the positive direction of the vehicle coordinates. The origin is the intersection of the \(X_{V}\)-axis with the plane, which passes the origin of the camera coordinates and is perpendicular to the \(X_{V}\) axis. The definitions of other coordinates are straightforward. They are not given here. Definitions are shown in Figure 7.  
The appearance of the lane markings in the frame buffer can be determined as a transformation from the 3D Euclidean space on the vehicle coordinate to the 2D Euclidean space of the frame buffer. In practice, this type of transform can be divided into two stages: the first stage is the transformation from the world coordinate system to the camera coordinate system, and the second stage is the projection from the camera coordinate system to the image frame buffer. Figure 7: Definition of coordinates and illustration of the parametric model of lane markings. Usually, the onboard camera of the lane-detection system is carefully mounted on the vehicle. It is reasonable to assume that the offset of optical center \({}^{V}P_{C}\) in the vehicle coordinate is \((0,0,h)\) and the rotation angles form the vehicle coordinate to the camera coordinate to be \((\phi,pi/2+\theta,0)\), as illustrated in Figure 7. Furthermore, if we combine all of the steps of transformation into one transformation expression, the perspective projection from the 3D vehicle coordinate to the 2D frame buffer can be expressed as follows:  
\[ \begin{cases}c=^{B}C_{I}+\frac{x_{v}cos(\phi)+y_{v}sin(\phi)}{c_{f}((h-z_{c}) sin(\theta)+cos(\theta)(y_{v}cos(\phi)-x_{v}sin(\phi)))},\\ r=^{B}R_{I}+\frac{(h-z_{c})-sin(\theta)(y_{v}cos(\phi)-x_{v}sin(\phi))}{r_{f}( (h-z_{c})sin(\theta)+cos(\theta)(y_{v}cos(\phi)-x_{v}sin(\phi)))}.\end{cases}  \tag{17}\]  
Here, \(c_{f}=\frac{1}{N_{c}f}\) represents the real length of one pixel divided by the focus length and \(N_{c}\) is the distance between two adjacent pixels in the horizontal direction. \(r_{f}=\frac{1}{N_{c}f}\) represents the real width of one pixel, divided by the focus length, and \(N_{r}\) is the distance between two adjacent pixels in the vertical direction. \({}^{B}C_{I}\) and \({}^{B}R_{I}\) are the coordinate values of the optical center in the frame buffer.